2011-03-17 Phil Muldoon <pmuldoon@redhat.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.python / py-symtab.exp
index d22811d167986e169a6576f3e5029131dbaacae9..c52f5efe39ed80d0168d1f3a8463c8ce0167601c 100644 (file)
@@ -57,8 +57,16 @@ gdb_py_test_silent_cmd "python symtab = sal.symtab" "Get block" 0
 gdb_test "python print sal.symtab" "gdb/testsuite/gdb.python/py-symbol.c.*" "Test symtab"
 gdb_test "python print sal.pc" "${decimal}" "Test sal.pc"
 gdb_test "python print sal.line" "42" "Test sal.line"
+gdb_test "python print sal.is_valid()" "True" "Test sal.is_valid"
 
 # Test symbol table.
 gdb_test "python print symtab.filename" "testsuite/gdb.python/py-symbol.c.*" "Test symtab.filename"
 gdb_test "python print symtab.objfile" "<gdb.Objfile object at ${hex}>" "Test symtab.objfile"
 gdb_test "python print symtab.fullname()" "testsuite/gdb.python/py-symbol.c.*" "Test symtab.fullname"
+gdb_test "python print symtab.is_valid()" "True" "Test symtab.is_valid()"
+
+# Test is_valid when the objfile is unloaded.  This must be the last
+# test as it unloads the object file in GDB.
+gdb_unload
+gdb_test "python print sal.is_valid()" "False" "Test sal.is_valid"
+gdb_test "python print symtab.is_valid()" "False" "Test symtab.is_valid()"
This page took 0.025643 seconds and 4 git commands to generate.