[Bug python/18339] New: gdb.FinishBreakpoint is broken for inline functions

martin.galvan at tallertechnologies dot com sourceware-bugzilla@sourceware.org
Mon Apr 27 12:51:00 GMT 2015


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.



More information about the Gdb-prs mailing list