diff options
author | Tom Tromey <tromey@redhat.com> | 2011-01-06 21:10:53 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2011-01-06 21:10:53 +0000 |
commit | d8e227793f4a8ce420f2b4a068844b5b6ec39490 (patch) | |
tree | afc91da0a4286a456cde5288ec85184acbf3f61e /gdb/testsuite | |
parent | a255712f6589e84469ad702e4f9a53bec250fb9f (diff) | |
download | gdb-d8e227793f4a8ce420f2b4a068844b5b6ec39490.zip gdb-d8e227793f4a8ce420f2b4a068844b5b6ec39490.tar.gz gdb-d8e227793f4a8ce420f2b4a068844b5b6ec39490.tar.bz2 |
gdb
PR python/12367:
* NEWS: Add item.
* python/python.c (GdbMethods): Add "newest_frame" method.
* python/python-internal.h (gdbpy_newest_frame): Declare.
* python/py-frame.c (gdbpy_newest_frame): New function.
gdb/doc
* gdb.texinfo (Frames In Python): Document gdb.newest_thread.
gdb/testsuite
* gdb.python/py-frame.exp: Test gdb.newest_frame.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-frame.exp | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3675e27..7ba15ac 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-01-06 Tom Tromey <tromey@redhat.com> + + * gdb.python/py-frame.exp: Test gdb.newest_frame. + 2011-01-06 Joel Brobecker <brobecker@adacore.com> * gdb.ada/array_bounds.exp, gdb.ada/array_return.exp, diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp index 0956398..e3b5629 100644 --- a/gdb/testsuite/gdb.python/py-frame.exp +++ b/gdb/testsuite/gdb.python/py-frame.exp @@ -73,11 +73,18 @@ gdb_test "python print bf1.read_var(\"i\", sb).type" "int" "test int i" gdb_breakpoint "f2" gdb_continue_to_breakpoint "breakpoint at f2" +gdb_py_test_silent_cmd "python bframe = gdb.selected_frame()" \ + "get bottommost frame" 0 gdb_test "up" ".*" "" gdb_py_test_silent_cmd "python f1 = gdb.selected_frame ()" "get second frame" 0 gdb_py_test_silent_cmd "python f0 = f1.newer ()" "get first frame" 0 +gdb_test "python print f1 == gdb.newest_frame()" False \ + "selected frame -vs- newest frame" +gdb_test "python print bframe == gdb.newest_frame()" True \ + "newest frame -vs- newest frame" + gdb_test "python print 'result =', f0 == f1" " = False" "test equality comparison (false)" gdb_test "python print 'result =', f0 == f0" " = True" "test equality comparison (true)" gdb_test "python print 'result =', f0 != f1" " = True" "test inequality comparison (true)" |