This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]