aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-02-08 19:58:25 +0000
committerTom Tromey <tromey@redhat.com>2012-02-08 19:58:25 +0000
commit09fa21bd6f5064fa023e025c0bbf98682b3fee1a (patch)
treead7c10752b4cc50f9a8ecf1d9060a7750116a37c
parent1a119f3613c3094c82b127b735b9c69648a37387 (diff)
downloadgdb-09fa21bd6f5064fa023e025c0bbf98682b3fee1a.zip
gdb-09fa21bd6f5064fa023e025c0bbf98682b3fee1a.tar.gz
gdb-09fa21bd6f5064fa023e025c0bbf98682b3fee1a.tar.bz2
* gdb.python/py-symbol.exp: Use lookup_global_symbol for tests
before inferior is started.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.python/py-symbol.exp9
2 files changed, 10 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 4fd340c..556e7e0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-08 Tom Tromey <tromey@redhat.com>
+
+ * gdb.python/py-symbol.exp: Use lookup_global_symbol for tests
+ before inferior is started.
+
2012-02-07 Tom Tromey <tromey@redhat.com>
* gdb.python/py-symbol.exp: Test Symbol.needs_frame and
diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp
index 0f5eb3c..2f274af 100644
--- a/gdb/testsuite/gdb.python/py-symbol.exp
+++ b/gdb/testsuite/gdb.python/py-symbol.exp
@@ -42,17 +42,18 @@ gdb_py_test_silent_cmd "python main_func = gdb.lookup_global_symbol(\"main\")" "
gdb_test "python print main_func.is_function" "True" "Test main_func.is_function"
gdb_test "python print gdb.lookup_global_symbol(\"junk\")" "None" "Test lookup_global_symbol(\"junk\")"
-gdb_test "python print gdb.lookup_symbol('main')\[0\].value()" "$hex .main." \
+gdb_test "python print gdb.lookup_global_symbol('main').value()" "$hex .main." \
"print value of main"
set qq_line [gdb_get_line_number "line of qq"]
-gdb_test "python print gdb.lookup_symbol('qq')\[0\].line" "$qq_line" \
+gdb_test "python print gdb.lookup_global_symbol('qq').line" "$qq_line" \
"print line number of qq"
-gdb_test "python print gdb.lookup_symbol('qq')\[0\].value()" "72" \
+gdb_test "python print gdb.lookup_global_symbol('qq').value()" "72" \
"print value of qq"
-gdb_test "python print gdb.lookup_symbol('qq')\[0\].needs_frame" "False" \
+gdb_test "python print gdb.lookup_global_symbol('qq').needs_frame" \
+ "False" \
"print whether qq needs a frame"