aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-parameter.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.python/py-parameter.exp')
-rw-r--r--gdb/testsuite/gdb.python/py-parameter.exp15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-parameter.exp b/gdb/testsuite/gdb.python/py-parameter.exp
index 0508544..9a36e63 100644
--- a/gdb/testsuite/gdb.python/py-parameter.exp
+++ b/gdb/testsuite/gdb.python/py-parameter.exp
@@ -203,3 +203,18 @@ foreach kind {PARAM_ZUINTEGER PARAM_ZUINTEGER_UNLIMITED} {
"check that PARAM_ZUINTEGER value is -1 after setting"
}
}
+
+gdb_py_test_multiple "Throwing gdb parameter" \
+ "python" "" \
+ "class TestThrowParam (gdb.Parameter):" "" \
+ " def __init__ (self, name):" "" \
+ " super (TestThrowParam, self).__init__ (name, gdb.COMMAND_DATA, gdb.PARAM_STRING)" "" \
+ " self.value = True" "" \
+ " def get_set_string (self):" "" \
+ " raise gdb.GdbError('Ordinary gdb error')" "" \
+ "test_throw_param = TestThrowParam ('print test-throw-param')" ""\
+ "end"
+
+gdb_test "set print test-throw-param whoops" \
+ "Ordinary gdb error" \
+ "gdb.GdbError does not show Python stack"