diff options
Diffstat (limited to 'gdb/testsuite/gdb.python/py-arch.exp')
-rw-r--r-- | gdb/testsuite/gdb.python/py-arch.exp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-arch.exp b/gdb/testsuite/gdb.python/py-arch.exp index 7413b44..174b151 100644 --- a/gdb/testsuite/gdb.python/py-arch.exp +++ b/gdb/testsuite/gdb.python/py-arch.exp @@ -26,6 +26,14 @@ if ![runto_main] { return -1 } +# Test python/15461. Invalid architectures should not trigger an +# internal GDB assert. +gdb_py_test_silent_cmd "python empty = gdb.Architecture()" "get empty arch" 0 +gdb_test "python print(empty.name())" ".*Architecture is invalid.*" \ + "Test empty architecture.name does not trigger an assert" +gdb_test "python print(empty.disassemble())" ".*Architecture is invalid.*" \ + "Test empty architecture.disassemble does not trigger an assert" + gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "get frame" 0 gdb_py_test_silent_cmd "python arch = frame.architecture()" "get arch" 0 gdb_py_test_silent_cmd "python pc = frame.pc()" "get pc" 0 |