This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: fix up gdb.stabs
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 26 Jun 2012 11:32:22 -0600
- Subject: FYI: fix up gdb.stabs
I'm checking this in.
This applies the standard_* cleanup to gdb.stabs.
It also removes some long-dead code to check whether the gdb.stabs
directory was created.
Regtested on x86-64 Fedora 16.
Tom
2012-06-26 Tom Tromey <tromey@redhat.com>
* gdb.stabs/weird.exp: Remove directory-checking code. Use
standard_output_file.
* gdb.stabs/exclfwd.exp: Use standard_testfile,
prepare_for_testing. Remove directory-checking code.
Index: gdb.stabs/exclfwd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.stabs/exclfwd.exp,v
retrieving revision 1.12
diff -u -r1.12 exclfwd.exp
--- gdb.stabs/exclfwd.exp 16 Jan 2012 16:21:52 -0000 1.12
+++ gdb.stabs/exclfwd.exp 26 Jun 2012 17:31:13 -0000
@@ -16,36 +16,17 @@
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@gnu.org
-# If the test directory was not created by configure then skip
-# this test.
-if ![file isdirectory ${objdir}/${subdir}] then {
- return 0
-}
-
#
# test running programs
#
-set testfile exclfwd
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile exclfwd1.c exclfwd2.c
-foreach file {exclfwd1 exclfwd2} {
- if {[gdb_compile "${srcdir}/${subdir}/${file}.c" "${file}.o" object {debug}] != ""} {
- untested exclfwd.exp
- return -1
- }
+if {[prepare_for_testing $testfile.exp $testfile \
+ [list $srcfile $srcfile2] debug]} {
+ return -1
}
-if {[gdb_compile "exclfwd1.o exclfwd2.o" ${binfile} executable {debug}] != "" } {
- untested exclfwd.exp
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
if ![runto_main] then {
perror "couldn't run to breakpoint"
continue
Index: gdb.stabs/weird.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.stabs/weird.exp,v
retrieving revision 1.24
diff -u -r1.24 weird.exp
--- gdb.stabs/weird.exp 21 Jun 2012 20:46:24 -0000 1.24
+++ gdb.stabs/weird.exp 26 Jun 2012 17:31:13 -0000
@@ -17,16 +17,10 @@
# Test that GDB properly ignores invalid stabs.
# Also test that GDB can debug a .o file, and that it doesn't mind
# a file that's more minimal than what a compiler normally puts out.
-# If the test directory was not created by configure then skip
-# this test.
-if ![file isdirectory ${objdir}/${subdir}] then {
- return 0
-}
-
set testfile weird
-set srcfile ${objdir}/${subdir}/weird.s
-set binfile ${objdir}/${subdir}/weirdx.o
+set srcfile [standard_output_file weird.s]
+set binfile [standard_output_file weirdx.o]
if { [ get_compiler_info ] } {
return -1