From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id 6B6CC385E019 for ; Wed, 30 Mar 2022 12:26:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6B6CC385E019 Received: from [2001:470:142:3::e] (port=32794 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZXP6-00014P-3S; Wed, 30 Mar 2022 08:26:24 -0400 Received: from [87.69.77.57] (port=5000 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZXP5-0007xe-Ii; Wed, 30 Mar 2022 08:26:23 -0400 Date: Wed, 30 Mar 2022 15:26:31 +0300 Message-Id: <838rsr8w3s.fsf@gnu.org> From: Eli Zaretskii To: Lancelot SIX Cc: gdb-patches@sourceware.org, lsix@lancelotsix.com In-Reply-To: <20220330093458.148497-3-lancelot.six@amd.com> (message from Lancelot SIX via Gdb-patches on Wed, 30 Mar 2022 10:34:58 +0100) Subject: Re: [PATCH v2 2/2] gdb: Add support for DW_LNS_set_prologue_end in line-table References: <20220330093458.148497-1-lancelot.six@amd.com> <20220330093458.148497-3-lancelot.six@amd.com> X-Spam-Status: No, score=1.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2022 12:26:27 -0000 > Date: Wed, 30 Mar 2022 10:34:58 +0100 > From: Lancelot SIX via Gdb-patches > Cc: lsix@lancelotsix.com, Lancelot SIX > > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -8,6 +8,17 @@ > * Remove support for building against Python 2, it is now only possible to > build GDB against Python 3. > > +* GDB now honours the DWARF prologue_end line-table entry flag the compiler can > + emit to indicate where a breakpoint should be placed to break in a function > + past its prologue. > + > +* Changed commands > + > +maintenance info line-table > + Add a PROLOGUE-END column to the output which indicates that an > + entry corresponds to an address where a breakpoint should be placed > + to be at the first instruction past a function's prologue. > + > * Python API > This part is OK. > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -19794,6 +19794,33 @@ line 1574. > List the @code{struct linetable} from all @code{struct symtab} > instances whose name matches @var{regexp}. If @var{regexp} is not > given, list the @code{struct linetable} from all @code{struct symtab}. > +For example: > + > +@smallexample > +(@value{GDBP}) maint info line-table > +objfile: /home/gnu/build/a.out ((struct objfile *) 0x6120000e0d40) > +compunit_symtab: simple.cpp ((struct compunit_symtab *) 0x6210000ff450) > +symtab: /home/gnu/src/simple.cpp ((struct symtab *) 0x6210000ff4d0) > +linetable: ((struct linetable *) 0x62100012b760): > +INDEX LINE ADDRESS IS-STMT PROLOGUE-END > +0 3 0x0000000000401110 Y > +1 4 0x0000000000401114 Y Y > +2 9 0x0000000000401120 Y > +3 10 0x0000000000401124 Y Y > +4 10 0x0000000000401129 > +5 15 0x0000000000401130 Y > +6 16 0x0000000000401134 Y Y > +7 16 0x0000000000401139 > +8 21 0x0000000000401140 Y > +9 22 0x000000000040114f Y Y > +10 22 0x0000000000401154 > +11 END 0x000000000040115a Y > +@end smallexample > +@noindent This is also OK, but please fix this: > +The @samp{IS-STMT} column indicates if the address is a recommended breakpoint > +location to represent a line or a statement. The @samp{PROLOGUE-END} column > +indicates that a given address is an adequate to place a breakpoint at the ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ That should be "is an adequate place to set a breakpoint". Thanks.