public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "palves at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/26523] New: advance/until to inline frames
Date: Sat, 22 Aug 2020 20:10:00 +0000	[thread overview]
Message-ID: <bug-26523-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 26523
           Summary: advance/until to inline frames
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: palves at redhat dot com
  Target Milestone: ---

If you do "tbreak LINENO; c" to advance to an inlined function, GDB
presents the stop at the inline frame instead of at the non-artificial
stack frame:

 (gdb) list 21
 18      static inline __attribute__ ((always_inline)) int
 19      inline_func (int i)
 20      {
 21        return i + 1;
 22      }

 (gdb) tbreak 21
 Temporary breakpoint 3 at 0x55555555516f: advance.cc:21.
 (gdb) c
 Continuing.

 Temporary breakpoint 3, inline_func (i=0) at advance.cc:21
 21        return i + 1; /* multiple locations here */

If however, you do "advance LINENO" or "until LINENO" instead, GDB
presents the stop at the non-artificial frame:

 (gdb) advance 21
 main () at advance.cc:43
 43        i = inline_func (i);
 (gdb)

"advance" and "until" should really behave like user breakpoints here, since
their location is also user-specified.

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

             reply	other threads:[~2020-08-22 20:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-22 20:10 palves at redhat dot com [this message]
2020-08-27 20:04 ` [Bug gdb/26523] " cvs-commit at gcc dot gnu.org
2020-08-27 20:04 ` cvs-commit at gcc dot gnu.org
2020-08-27 20:21 ` palves at redhat dot com
2020-08-27 20:21 ` palves at redhat dot com

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-26523-4717@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).