From: Siva Chandra Reddy Date: Mon, 21 Jan 2013 21:44:57 +0000 (+0000) Subject: * python/lib/gdb/commands/explore.py X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa6199c69abb6e2cb00dff0d79985c8548db4b1c;p=binutils-gdb.git * python/lib/gdb/commands/explore.py (CompoundExplorer.explore_expr): Correct the name of a method being invoked. (ExploreTypeCommand.invoke): Add a missing 'return'. * testsuite/gdb.python/py-explore.exp: Improve a test --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6ef74bc4381..e5a767bce60 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2013-01-21 Siva Chandra Reddy + + * python/lib/gdb/commands/explore.py + (CompoundExplorer.explore_expr): Correct the name of a method + being invoked. + (ExploreTypeCommand.invoke): Add a missing 'return'. + 2013-01-21 Tom Tromey * gdb_obstack.h (obconcat): Move declaration here, from... diff --git a/gdb/python/lib/gdb/command/explore.py b/gdb/python/lib/gdb/command/explore.py index d5f09c1ffcb..dd77875dc1d 100644 --- a/gdb/python/lib/gdb/command/explore.py +++ b/gdb/python/lib/gdb/command/explore.py @@ -462,7 +462,7 @@ class CompoundExplorer(object): return True else: if is_child: - Explorer.returning_to_parent_value_message() + Explorer.return_to_parent_value() else: if is_child: Explorer.return_to_parent_value_prompt() @@ -747,6 +747,7 @@ class ExploreTypeCommand(gdb.Command): if value is not None: print ("'%s' is of type '%s'." % (arg_str, str(value.type))) Explorer.explore_type(str(value.type), value.type, False) + return raise gdb.GdbError(("'%s' is not a type or value in the current " "context." % arg_str)) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8b6562b1bb1..ff27d232f18 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2013-01-21 Siva Chandra Reddy + + * gdb.python/py-explore.exp: Improve a test + 2013-01-18  David Blaikie   * gdb.base/label.c (main): Correct the type of the second diff --git a/gdb/testsuite/gdb.python/py-explore.exp b/gdb/testsuite/gdb.python/py-explore.exp index 0fb67d3ecef..34333b5748a 100644 --- a/gdb/testsuite/gdb.python/py-explore.exp +++ b/gdb/testsuite/gdb.python/py-explore.exp @@ -164,15 +164,25 @@ gdb_test_multiple "explore cs" "" { gdb_test_multiple " " "end cs.s exploration" { -re ".*$enter_field_number_prompt" { pass "end cs.s exploration" - gdb_test_multiple "\0" "end cs exploration" { - -re "$gdb_prompt" { - pass "end cs exploration" - } - } } } } } + gdb_test_multiple "1" "explore cs.u" { + -re "[compound_description {cs.u} {union} {union SimpleUnion}].*.*[field_choices {i} {c} {f} {d}].*$enter_field_number_prompt" { + pass "explore cs.u" + gdb_test_multiple " " "end cs.u exploration" { + -re ".*$enter_field_number_prompt" { + pass "end cs.u exploration" + } + } + } + } + gdb_test_multiple "\0" "explore cs.u" { + -re "$gdb_prompt" { + pass "end cs exploration" + } + } } }