From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ECE3538350A7; Tue, 29 Dec 2020 09:28:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECE3538350A7 From: "bernd.edlinger at hotmail dot de" To: gdb-prs@sourceware.org Subject: [Bug c++/25987] Wrong line for code containing inlined functions Date: Tue, 29 Dec 2020 09:28:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: bernd.edlinger at hotmail dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot 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://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 09:28:31 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25987 --- Comment #3 from Bernd Edlinger --- The test case is interesting, as it contains an empty inlined subroutine ptr::get() : <2><11c>: Abbrev Number: 17 (DW_TAG_inlined_subroutine) <11d> DW_AT_abstract_origin: <0x18a> <121> DW_AT_entry_pc : 0x40113f <129> DW_AT_GNU_entry_view: 2 <12a> DW_AT_low_pc : 0x40113f <132> DW_AT_high_pc : 0x0 <13a> DW_AT_call_file : 1 <13b> DW_AT_call_line : 11 <13c> DW_AT_call_column : 18 <13d> DW_AT_sibling : <0x14f> The call instruction is immediately after this empty inline block, when the call stack is printed, the line table finds the stmt line 3 followed by non-stmt line 11. My patch modifies the logic in find_pc_sect_line if a line at the end of the subroutine is found, but the PC is larger than that, the non-stmt line 11 following the subroutine is preferred. --=20 You are receiving this mail because: You are on the CC list for the bug.=