This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: fix up new test cases


I'm checking this in.

I forgot that some new test cases I wrote for my recent Python patches
relied on a patch I haven't yet committed.  So, they all failed.

This fixes the problem.

Tom

2012-02-08  Tom Tromey  <tromey@redhat.com>

	* gdb.python/py-symbol.exp: Use lookup_global_symbol for tests
	before inferior is started.

Index: gdb.python/py-symbol.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-symbol.exp,v
retrieving revision 1.13
diff -u -r1.13 py-symbol.exp
--- gdb.python/py-symbol.exp	7 Feb 2012 19:47:16 -0000	1.13
+++ gdb.python/py-symbol.exp	8 Feb 2012 19:57:15 -0000
@@ -42,17 +42,18 @@
 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"
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]