-
- Downloads
Extend test gdb.python/py-recurse-unwind.exp
This patch modifies the unwinder (sniffer) defined in py-recurse-unwind.py so that, depending upon the value of one of its class variables, it will take different paths through the code, testing different functionality. The original test attempted to obtain the value of an undefined symbol. This somewhat expanded test checks to see if 'pc' can be read via gdb.PendingFrame.read_register() and also via gdb.parse_and_eval(). gdb/testsuite/ChangeLog: * gdb.python/py-recurse-unwind.c (main): Add loop. * gdb.python/py-recurse-unwind.py (TestUnwinder): Add calls to read_register() and gdb.parse_and_eval(). Make each code call a separate case that can be individually tested. * gdb.python/py-recurse-unwind.exp (cont_and_backtrace): New proc. Call cont_and_backtrace for each of the code paths that we want to test in the unwinder.
Showing
- gdb/testsuite/ChangeLog 10 additions, 0 deletionsgdb/testsuite/ChangeLog
- gdb/testsuite/gdb.python/py-recurse-unwind.c 5 additions, 1 deletiongdb/testsuite/gdb.python/py-recurse-unwind.c
- gdb/testsuite/gdb.python/py-recurse-unwind.exp 40 additions, 23 deletionsgdb/testsuite/gdb.python/py-recurse-unwind.exp
- gdb/testsuite/gdb.python/py-recurse-unwind.py 24 additions, 5 deletionsgdb/testsuite/gdb.python/py-recurse-unwind.py
Please register or sign in to comment