public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "bernd.edlinger at hotmail dot de" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-25987-4717-5BetEU7NN5@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25987-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=25987

--- Comment #3 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

      parent reply	other threads:[~2020-12-29  9:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 14:16 [Bug c++/25987] New: " brenorg at gmail dot com
2020-05-13 14:18 ` [Bug c++/25987] " brenorg at gmail dot com
2020-05-14 13:33 ` ssbssa at sourceware dot org
2020-12-29  9:15 ` bernd.edlinger at hotmail dot de
2020-12-29  9:28 ` bernd.edlinger at hotmail dot de [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-25987-4717-5BetEU7NN5@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).