* python/lib/gdb/commands/explore.py
authorSiva Chandra Reddy <sivachandra@sourceware.org>
Mon, 21 Jan 2013 21:44:57 +0000 (21:44 +0000)
committerSiva Chandra Reddy <sivachandra@sourceware.org>
Mon, 21 Jan 2013 21:44:57 +0000 (21:44 +0000)
(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

gdb/ChangeLog
gdb/python/lib/gdb/command/explore.py
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-explore.exp

index 6ef74bc4381678290d3cab1b7461d4ff1bf20ef1..e5a767bce60c86e9aa7bff4e8b503359e1d9328a 100644 (file)
@@ -1,3 +1,10 @@
+2013-01-21  Siva Chandra Reddy  <sivachandra@google.com>
+
+       * 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  <tromey@redhat.com>
 
        * gdb_obstack.h (obconcat): Move declaration here, from...
index d5f09c1ffcb6e5af9d37df58df330788e7e6de41..dd77875dc1d2d55f5245e98679e09da5f66f6f27 100644 (file)
@@ -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))
index 8b6562b1bb1c53a424f63990e59f7ce90b96dc69..ff27d232f186ba76fd14c863ad3ab4ad0db19864 100644 (file)
@@ -1,3 +1,7 @@
+2013-01-21  Siva Chandra Reddy  <sivachandra@google.com>
+
+       * gdb.python/py-explore.exp: Improve a test
+
 2013-01-18  David Blaikie  <dblaikie@gmail.com>
 
        * gdb.base/label.c (main): Correct the type of the second
index 0fb67d3ecef437d07ad81fad14190f7c96ee3e4a..34333b5748a53a9ef2008a4fe6000c94c35e9fcc 100644 (file)
@@ -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"
+            }
+        }
     }
 }