From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25344 invoked by alias); 14 Oct 2011 16:05:01 -0000 Received: (qmail 25328 invoked by uid 22791); 14 Oct 2011 16:04:59 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Oct 2011 16:04:37 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9EG4axE012383 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Oct 2011 12:04:36 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9EG4aWa022177; Fri, 14 Oct 2011 12:04:36 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p9EG4ZMK008402; Fri, 14 Oct 2011 12:04:35 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Subject: FYI: fix 2 tests when glibc debuginfo is installed Date: Fri, 14 Oct 2011 16:05:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00416.txt.bz2 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 * 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" {