]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Extend test gdb.python/py-recurse-unwind.exp
authorKevin Buettner <kevinb@redhat.com>
Mon, 26 Sep 2016 22:00:37 +0000 (15:00 -0700)
committerKevin Buettner <kevinb@redhat.com>
Wed, 16 Nov 2016 18:37:11 +0000 (11:37 -0700)
commit1a2f3d7ff1d79b1290704e48c71e905b987393a6
tree9408ebf33f18ab82dcc7872ca0e1dc2996a95e33
parent4cb771f214ed6a2102e37bce255c6be5d0642f3a
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.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-recurse-unwind.c
gdb/testsuite/gdb.python/py-recurse-unwind.exp
gdb/testsuite/gdb.python/py-recurse-unwind.py