aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-unwind.py
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.python/py-unwind.py')
-rw-r--r--gdb/testsuite/gdb.python/py-unwind.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-unwind.py b/gdb/testsuite/gdb.python/py-unwind.py
index 8e65a1a..0faccf2 100644
--- a/gdb/testsuite/gdb.python/py-unwind.py
+++ b/gdb/testsuite/gdb.python/py-unwind.py
@@ -267,4 +267,24 @@ class validating_unwinder(Unwinder):
return None
+class bad_object_unwinder(Unwinder):
+ def __init__(self, name):
+ super().__init__(name)
+
+ def __call__(self, pending_frame):
+
+ if pending_frame.level() != 1:
+ return None
+
+ class Blah:
+ def __init__(self):
+ pass
+
+ @property
+ def __class__(self):
+ raise RuntimeError("error in Blah.__class__")
+
+ return Blah()
+
+
print("Python script imported")