From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23296 invoked by alias); 6 Nov 2012 17:44:15 -0000 Received: (qmail 23281 invoked by uid 22791); 6 Nov 2012 17:44:14 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Nov 2012 17:44:07 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MD200M00UL70900@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Tue, 06 Nov 2012 19:44:05 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MD200LZ0ULEM980@a-mtaout20.012.net.il>; Tue, 06 Nov 2012 19:44:02 +0200 (IST) Date: Tue, 06 Nov 2012 17:44:00 -0000 From: Eli Zaretskii Subject: Re: Add fullname field in disassembly output In-reply-to: <5098FEF0.60503@broadcom.com> To: Andrew Burgess Cc: palves@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83d2zq39un.fsf@gnu.org> References: <506DB4B8.5030001@broadcom.com> <5085B9D5.80508@broadcom.com> <50913B7F.10707@redhat.com> <5093A785.3060103@broadcom.com> <5093E786.2090909@redhat.com> <5098FEF0.60503@broadcom.com> X-IsSubscribed: yes 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: 2012-11/txt/msg00122.txt.bz2 > Date: Tue, 6 Nov 2012 12:13:36 +0000 > From: "Andrew Burgess" > cc: gdb-patches@sourceware.org, "Eli Zaretskii" > > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -64,6 +64,9 @@ py [command] > async record "=record-started" and "=record-stopped". > ** Memory changes are now notified using new async record > "=memory-changed". > + ** The data-disassemble command response will include a "fullname" field > + containing the absolute file name when gdb can determine it and source > + has been requested. This part is OK, except that I believe we use "GDB", not "gdb". > +The result of the -data-disassemble command will be a list named "-data-disassemble" should be in @code. > +@samp{asm_insns}, the contents of this list depend on the @var{mode} > +used with the -data-disassemble command. Same here. > +For modes 1 and 3 the @samp{asm_insns} list contains tuples names ^^^^^ "named", I guess. > +@samp{src_and_asm_line}, each of which has the following fields: > + > +@table @code > +@item line > +The line number within @samp{file}. > + > +@item file > +The file name from the compilation unit. This might be an absolute > +file name or a relative file name depending on the compile command > +used. > + > +@item fullname > +This field is optional. If it is present it will contain an absolute > +file name to @samp{file}. If this field is not present then gdb was ^^ ^^^ "of", not "to", and "@value{GDBN}" instead of "gdb". > +-data-disassemble in @var{mode} 0 and 2, so @samp{address}, ^^^^^^^^^^^^^^^^^ @code The patch for the manual is OK with these changes. > +file="../../../src/gdb/testsuite/gdb.mi/basics.c", > +fullname="/absolute/path/to/src/gdb/testsuite/gdb.mi/basics.c", > +line_asm_insn=[@{address="0x000107bc", > +func-name="main",offset="0",inst="save %sp, -112, %sp"@}]@}, > src_and_asm_line=@{line="32", > -file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \ > - testsuite/gdb.mi/basics.c",line_asm_insn=[ > -@{address="0x000107c0",func-name="main",offset="4", > -inst="mov 2, %o0"@}, > +file="../../../src/gdb/testsuite/gdb.mi/basics.c", > +fullname="/absolute/path/to/src/gdb/testsuite/gdb.mi/basics.c", > +line_asm_insn=[@{address="0x000107c0", > +func-name="main",offset="4",inst="mov 2, %o0"@}, > @{address="0x000107c4",func-name="main",offset="8", > inst="sethi %hi(0x11800), %o2"@}]@}] > (gdb) Why do we sometimes use names with a hyphen, like func-name, and sometimes with underscores, like line_asm_insn? Shouldn't we pick one and use it consistently? Thanks.