Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* FYI: fix 2 tests when glibc debuginfo is installed
@ 2011-10-14 16:05 Tom Tromey
  2011-10-14 19:37 ` Jan Kratochvil
  0 siblings, 1 reply; 12+ messages in thread
From: Tom Tromey @ 2011-10-14 16:05 UTC (permalink / raw)
  To: gdb-patches

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" {


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-10-25 19:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-14 16:05 FYI: fix 2 tests when glibc debuginfo is installed Tom Tromey
2011-10-14 19:37 ` Jan Kratochvil
2011-10-14 21:19   ` Pedro Alves
2011-10-14 21:25     ` Jan Kratochvil
2011-10-14 21:42       ` Pedro Alves
2011-10-15 14:52         ` Oleg Nesterov
2011-10-25 17:03           ` Pedro Alves
2011-10-25 17:38             ` Oleg Nesterov
2011-10-25 18:16               ` Pedro Alves
2011-10-25 18:38                 ` Oleg Nesterov
2011-10-25 19:50                   ` Pedro Alves
2011-10-16 16:41       ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox