From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8222 invoked by alias); 25 Sep 2009 21:53:09 -0000 Received: (qmail 8212 invoked by uid 22791); 25 Sep 2009 21:53:08 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Sep 2009 21:53:05 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8PLr3L0029569 for ; Fri, 25 Sep 2009 17:53:03 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8PLr2xG021221; Fri, 25 Sep 2009 17:53:03 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n8PLr1LE001691; Fri, 25 Sep 2009 17:53:02 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 5337A37818C; Fri, 25 Sep 2009 15:53:01 -0600 (MDT) From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Roland McGrath Subject: Re: [rfc] Decode "is a variable with complex or multiple locations" (PR 8399) References: <20090916201132.366872766@magilla.sf.frob.com> <20090920205109.GA24360@host0.dyn.jankratochvil.net> Reply-To: tromey@redhat.com Date: Fri, 25 Sep 2009 21:53:00 -0000 In-Reply-To: <20090920205109.GA24360@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Sun, 20 Sep 2009 22:51:09 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00823.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> (b) It prints it in a human readable format so more complex Jan> expressions are still not decoded. Jan> GDB should probably reuse Jan> binutils/dwarf.c:decode_location_expression(). Jan> (b1) http://sources.redhat.com/ml/gdb/2003-07/msg00242.html Jan> discussion had no conclusion where the code should be placed Jan> (probably bfd/file-no-in-libbfd.a). Ask on the binutils list. I'm sure we can arrive at a place to store it. We can always make a new library in bfd/, or anywhere. Jan> (c) "a variable in register rsi" vs. "DW_OP_reg4": Jan> (c1) Extending the readelf<->gdb shared code to print register Jan> names (4->rsi) may not be acceptable for arch-independent readelf. We can add a callback that GDB would use to supply the register name. Jan> (c2) "in register SOMENAME" is more user friendly than "DW_OP_reg42". Jan> But too complex expression cannot be printed in a user friendly way. I think it is fine to show it in "assembly-like" form using the DW_OP names, because it is better to expose things for users who do understand them than to hide them from users who don't. If we get too many complaints, we can add an option.q Jan> (c3) Is it OK to break backward compatibility by printing Jan> "DW_OP_reg*" (either numerically or with register-names)? IMO, yes. Tom