-# Copyright (C) 2010-2016 Free Software Foundation, Inc.
+# Copyright (C) 2010-2018 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
standard_testfile py-symbol.c
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
set full_py_symbol_c [string_to_regexp testsuite/${subdir}/${srcfile}]
}
-gdb_test "python print (sal.symtab)" ".*${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)" ".*${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)" ".*${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())" ".*${full_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)" ".*${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())" ".*${full_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"
+gdb_test_no_output "python sal = None" "test sal destructor"
+gdb_test_no_output "python symtab = None" "test symtab destructor"