public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/18339] New: gdb.FinishBreakpoint is broken for inline functions
@ 2015-04-27 12:51 martin.galvan at tallertechnologies dot com
  0 siblings, 0 replies; only message in thread
From: martin.galvan at tallertechnologies dot com @ 2015-04-27 12:51 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 18339
           Summary: gdb.FinishBreakpoint is broken for inline functions
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: martin.galvan at tallertechnologies dot com
                CC: tromey at redhat dot com
  Target Milestone: ---

If I step into an inline function and try to set a gdb.FinishBreakpoint, it'll
set it at the PC I'm currently at. For instance:

(gdb) print $pc
$1 = 0x28e <some_func>
(gdb) python gdb.FinishBreakpoint()
Temporary breakpoint 1 at 0x28e

This probably happens because the current stack frame is the same as the
caller's, thus the caller's PC is the same as the current one instead of
pointing at the return address of my function.

Even worse: if I try to step, the finishBreakpoint will be ignored (because
it's at the same PC I stopped at) and the out_of_scope callback will be
triggered because I'll be ahead of where it's set at.

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-27 12:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-27 12:51 [Bug python/18339] New: gdb.FinishBreakpoint is broken for inline functions martin.galvan at tallertechnologies dot com

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).