| Index: gdb/testsuite/gdb.python/py-symtab.exp
|
| diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp
|
| index da0c3e4be2947f6d6aa510e46d5b9072a86650bc..f5279b17c7bfec56692acaa4ff80787a56372540 100644
|
| --- a/gdb/testsuite/gdb.python/py-symtab.exp
|
| +++ b/gdb/testsuite/gdb.python/py-symtab.exp
|
| @@ -1,4 +1,4 @@
|
| -# Copyright (C) 2010-2012 Free Software Foundation, Inc.
|
| +# Copyright (C) 2010-2013 Free Software Foundation, Inc.
|
|
|
| # This program is free software; you can redistribute it and/or modify
|
| # it under the terms of the GNU General Public License as published by
|
| @@ -50,26 +50,29 @@ gdb_py_test_silent_cmd "step" "Step to the next line" 0
|
| gdb_py_test_silent_cmd "python new_pc = gdb.selected_frame().find_sal().pc" "Get new PC" 0
|
|
|
| # Test sal.
|
| -gdb_test "python print sal.symtab" ".*gdb.python/py-symbol.c.*" "Test symtab"
|
| -gdb_test "python print sal.pc" "${decimal}" "Test sal.pc"
|
| -gdb_test "python print sal.last == (new_pc - 1)" "True" "Test sal.last"
|
| -gdb_test "python print sal.line" "$line_no" "Test sal.line"
|
| -gdb_test "python print sal.is_valid()" "True" "Test sal.is_valid"
|
| +gdb_test "python print (sal.symtab)" ".*gdb.python/py-symbol.c.*" "Test symtab"
|
| +gdb_test "python print (sal.pc)" "${decimal}" "Test sal.pc"
|
| +gdb_test "python print (sal.last == (new_pc - 1))" "True" "Test sal.last"
|
| +gdb_test "python print (sal.line)" "$line_no" "Test sal.line"
|
| +gdb_test "python print (sal.is_valid())" "True" "Test sal.is_valid"
|
|
|
| # Test symbol table.
|
| -gdb_test "python print symtab.filename" ".*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()"
|
| -gdb_test "python print \"qq\" in global_symbols" "True" "Test qq in global symbols"
|
| -gdb_test "python print \"func\" in global_symbols" "True" "Test func in global symbols"
|
| -gdb_test "python print \"main\" in global_symbols" "True" "Test main in global symbols"
|
| -gdb_test "python print \"int\" in static_symbols" "True" "Test int in static symbols"
|
| -gdb_test "python print \"char\" in static_symbols" "True" "Test char in static symbols"
|
| -gdb_test "python print \"simple_struct\" in static_symbols" "True" "Test simple_struct in static symbols"
|
| +gdb_test "python print (symtab.filename)" ".*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()"
|
| +gdb_test "python print (\"qq\" in global_symbols)" "True" "Test qq in global symbols"
|
| +gdb_test "python print (\"func\" in global_symbols)" "True" "Test func in global symbols"
|
| +gdb_test "python print (\"main\" in global_symbols)" "True" "Test main in global symbols"
|
| +gdb_test "python print (\"int\" in static_symbols)" "True" "Test int in static symbols"
|
| +gdb_test "python print (\"char\" in static_symbols)" "True" "Test char in static symbols"
|
| +gdb_test "python print (\"simple_struct\" in static_symbols)" "True" "Test simple_struct in static symbols"
|
|
|
| # 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()"
|
| +gdb_test "python print (sal.is_valid())" "False" "Test sal.is_valid"
|
| +gdb_test "python print (symtab.is_valid())" "False" "Test symtab.is_valid()"
|
| +
|
| +gdb_test_no_output "python sal = None" "Test sal destructor"
|
| +gdb_test_no_output "python symtab = None" "Test symtab destructor"
|
|
|