From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5B599383B82D; Wed, 30 Jun 2021 08:06:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B599383B82D From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/98776] DW_AT_low_pc is inconsistent with function entry address, when enabling -fpatchable-function-entry Date: Wed, 30 Jun 2021 08:06:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 08:06:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98776 --- Comment #6 from Richard Biener --- (In reply to Martin Li=C5=A1ka from comment #5) > (In reply to Richard Biener from comment #4) > > Martin, can you bisect what fixed it? >=20 > Sure. Please help me how to verify what is a correct output? Isn't that > related to DWARF 5 change done in GCC 11? It's consistent with -gdwarf-2 -gstrict-dwarf as well, so no. A broken executable will output a short disassembly from gdb: > gcc-10 t.c -g -O -fpatchable-function-entry=3D16 > gdb -ex 'disassemble foo' -batch ./a.out | wc -l 3 actual output is Dump of assembler code for function foo: 0x00000000004004a6 <+0>: ret=20=20=20=20 End of assembler dump. where a correctly working one is > gdb -ex 'disassemble foo' -batch ./a.out | wc -l 19 with output Dump of assembler code for function foo: 0x0000000000400476 <+0>: nop 0x0000000000400477 <+1>: nop 0x0000000000400478 <+2>: nop 0x0000000000400479 <+3>: nop 0x000000000040047a <+4>: nop 0x000000000040047b <+5>: nop 0x000000000040047c <+6>: nop 0x000000000040047d <+7>: nop 0x000000000040047e <+8>: nop 0x000000000040047f <+9>: nop 0x0000000000400480 <+10>: nop 0x0000000000400481 <+11>: nop 0x0000000000400482 <+12>: nop 0x0000000000400483 <+13>: nop 0x0000000000400484 <+14>: nop 0x0000000000400485 <+15>: nop 0x0000000000400486 <+16>: ret=20=20=20=20 End of assembler dump.=