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 2 tests when glibc debuginfo is installed


I'm checking this in.

I found a couple of tests that work by accident when glibc debuginfo is
installed.

First, when running attach-stopped.exp:

    break 30
    Breakpoint 1 at 0x3a160d2d30: file ../sysdeps/unix/syscall-template.S, line 63. (7 locations)

This is not what is intended:

    # This breakpoint is there for old/non-x86 kernels not restarting syscalls.
    gdb_breakpoint [gdb_get_line_number "Second sleep"]

Second, attachstop-mt.exp:

    break 30
    Breakpoint 1 at 0x3a160d2d30: file ../sysdeps/unix/syscall-template.S, line 63. (7 locations)

Again:

    gdb_breakpoint [gdb_get_line_number "cut the sleep time"]

The fix is to add $srcfile to the linespec.

Tom

2011-10-14  Tom Tromey  <tromey@redhat.com>

	* gdb.threads/attachstop-mt.exp: Add $srcfile to the linespecs.
	* gdb.threads/attach-stopped.exp (corefunc): Add $srcfile to the
	linespec.

Index: gdb.threads/attach-stopped.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/attach-stopped.exp,v
retrieving revision 1.6
diff -u -r1.6 attach-stopped.exp
--- gdb.threads/attach-stopped.exp	1 Jan 2011 15:33:50 -0000	1.6
+++ gdb.threads/attach-stopped.exp	14 Oct 2011 16:03:49 -0000
@@ -78,7 +78,7 @@
 	gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach2 to stopped bt"
     }
     # This breakpoint is there for old/non-x86 kernels not restarting syscalls.
-    gdb_breakpoint [gdb_get_line_number "Second sleep"]
+    gdb_breakpoint $srcfile:[gdb_get_line_number "Second sleep"]
     set test "$threadtype: attach2 continue"
     gdb_test_multiple "continue" "continue ($test)" {
 	-re "Continuing" {
Index: gdb.threads/attachstop-mt.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/attachstop-mt.exp,v
retrieving revision 1.7
diff -u -r1.7 attachstop-mt.exp
--- gdb.threads/attachstop-mt.exp	1 Jan 2011 15:33:50 -0000	1.7
+++ gdb.threads/attachstop-mt.exp	14 Oct 2011 16:03:49 -0000
@@ -208,8 +208,8 @@
 gdb_test "bt" ".*sleep.*(func|main).*" "attach4 to stopped bt"
 
 # RHEL3U8 kernel-2.4.21-47.EL will not return SIGINT but only shorten the sleep.
-gdb_breakpoint [gdb_get_line_number "Ridiculous time"]
-gdb_breakpoint [gdb_get_line_number "cut the sleep time"]
+gdb_breakpoint $srcfile:[gdb_get_line_number "Ridiculous time"]
+gdb_breakpoint $srcfile:[gdb_get_line_number "cut the sleep time"]
 set test "attach4 continue"
 gdb_test_multiple "continue" "continue ($test)" {
     -re "Continuing" {


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