Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1481)

Unified Diff: gdb/testsuite/gdb.python/py-symtab.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.python/py-symbol.exp ('k') | gdb/testsuite/gdb.python/py-sync-interp.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
« no previous file with comments | « gdb/testsuite/gdb.python/py-symbol.exp ('k') | gdb/testsuite/gdb.python/py-sync-interp.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698