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 backtrace/15558] New: "set backtrace limit" can cause assertion failure


http://sourceware.org/bugzilla/show_bug.cgi?id=15558

            Bug ID: 15558
           Summary: "set backtrace limit" can cause assertion failure
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: backtrace
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at redhat dot com

"set backtrace limit" can cause an assertion failure.
If the limit is reached at an inline frame, then this
assertion in inline_frame_this_id will fail:

  gdb_assert (frame_id_p (*this_id));

One simple workaround is to change get_prev_frame to ignore the
backtrace limit for INLINE_FRAME.  This isn't completely ideal,
though.

Pedro suggests that most internals code should use get_prev_frame_1
instead, and bypass all the checks that correspond to user settings.
E.g., gcore.c or infrun.c:stepped_in_from.  The idea would be to
use get_prev_frame only in cases like "bt" or the MI equivalent.

Another wrinkle is that the Python code should probably use
the _1 variant -- but then this will mean that "backtrace limit"
won't be in effect when a Python frame filter is found.  So, some
extra code will be needed here.

-- 
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]