aboutsummaryrefslogtreecommitdiff
path: root/gas/doc/c-i386.texi
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2016-08-22 10:14:05 -0700
committerKevin Buettner <kevinb@redhat.com>2016-08-24 14:22:30 -0700
commitbb1fe4acb8927fc4d451402f3f5fc245144c987e (patch)
tree2dd0fdcd858fefa436a0277339ebc8f836678ae2 /gas/doc/c-i386.texi
parent0a1ddfa6b67201bb06f51fb47b56096e81bec5c0 (diff)
downloadgdb-bb1fe4acb8927fc4d451402f3f5fc245144c987e.zip
gdb-bb1fe4acb8927fc4d451402f3f5fc245144c987e.tar.gz
gdb-bb1fe4acb8927fc4d451402f3f5fc245144c987e.tar.bz2
Test case to detect recursive unwinding in Python-based unwinders.
This test case verifies that GDB will not attempt to invoke a python unwinder recursively. At the moment, the behavior exhibited by GDB looks like this: (gdb) source py-recurse-unwind.py Python script imported (gdb) b ccc Breakpoint 1 at 0x4004bd: file py-recurse-unwind.c, line 23. (gdb) run Starting program: py-recurse-unwind TestUnwinder: Recursion detected - returning early. TestUnwinder: Recursion detected - returning early. TestUnwinder: Recursion detected - returning early. TestUnwinder: Recursion detected - returning early. Breakpoint 1, ccc (arg=<unavailable>) at py-recurse-unwind.c:23 23 } (gdb) bt #-1 ccc (arg=<unavailable>) at py-recurse-unwind.c:23 Backtrace stopped: previous frame identical to this frame (corrupt stack?) [I've shortened pathnames for easier reading.] The desired / expected behavior looks like this: (gdb) source py-recurse-unwind.py Python script imported (gdb) b ccc Breakpoint 1 at 0x4004bd: file py-recurse-unwind.c, line 23. (gdb) run Starting program: py-recurse-unwind Breakpoint 1, ccc (arg=789) at py-recurse-unwind.c:23 23 } (gdb) bt #0 ccc (arg=789) at py-recurse-unwind.c:23 #1 0x00000000004004d5 in bbb (arg=456) at py-recurse-unwind.c:28 #2 0x00000000004004ed in aaa (arg=123) at py-recurse-unwind.c:34 #3 0x00000000004004fe in main () at py-recurse-unwind.c:40 Note that GDB's problems go well beyond the fact that it invokes the unwinder recursively. In the process it messes up some internal state (the frame stash) leading to display of (only) the sentinel frame in the backtrace. gdb/testsuite/ChangeLog: * gdb.python/py-recurse-unwind.c: New file. * gdb.python/py-recurse-unwind.py: New file. * gdb.python/py-recurse-unwind.exp: New file.
Diffstat (limited to 'gas/doc/c-i386.texi')
0 files changed, 0 insertions, 0 deletions