* [patch/testsuite] lib/gdb.exp: native tcl gdb_get_line_number
@ 2004-08-08 16:14 Michael Chastain
2004-08-09 17:55 ` Mark Kettenis
0 siblings, 1 reply; 6+ messages in thread
From: Michael Chastain @ 2004-08-08 16:14 UTC (permalink / raw)
To: gdb-patches
Here is the rewrite of gdb_get_line_number.
Tested on:
native i686-pc-linux-gnu, gcc 2.95.3 3.3.4 3.4.1, dwarf-2 and stabs+,
tcl 8.4.6, expect 5.4.1, dejagnu 1.4.4
native i686-pc-linux-gnu, gcc 2.95.3 3.3.4 3.4.1, dwarf-2 and stabs+,
sourceware tcl+expect+dejagnu
native hppa2.0w-hp-hpux11.11, hp ansi c B.11.11.28706.GP and hp ac++ A.03.45,
tcl 8.4.6, expect 5.4.1, dejagnu 1.4.4
I am committing this now.
After this I can start writing patches for gdb.mi/*.exp to call
gdb_get_line_number. I'm open to guidance on how to organize those
patches.
Michael C
2004-08-08 Michael Chastain <mec.gnu@mindspring.com>
* lib/gdb.exp (gdb_get_line_number): Rewrite with native tcl
rather than asking gdb to search.
Index: gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.52
diff -c -3 -p -r1.52 gdb.exp
*** gdb.exp 14 Jun 2004 15:29:30 -0000 1.52
--- gdb.exp 8 Aug 2004 10:46:24 -0000
*************** proc gdb_step_for_stub { } {
*** 1793,1858 ****
}
}
! ### gdb_get_line_number TEXT [FILE]
! ###
! ### Search the source file FILE, and return the line number of a line
! ### containing TEXT. Use this function instead of hard-coding line
! ### numbers into your test script.
! ###
! ### Specifically, this function uses GDB's "search" command to search
! ### FILE for the first line containing TEXT, and returns its line
! ### number. Thus, FILE must be a source file, compiled into the
! ### executable you are running. If omitted, FILE defaults to the
! ### value of the global variable `srcfile'; most test scripts set
! ### `srcfile' appropriately at the top anyway.
! ###
! ### Use this function to keep your test scripts independent of the
! ### exact line numbering of the source file. Don't write:
! ###
! ### send_gdb "break 20"
! ###
! ### This means that if anyone ever edits your test's source file,
! ### your test could break. Instead, put a comment like this on the
! ### source file line you want to break at:
! ###
! ### /* breakpoint spot: frotz.exp: test name */
! ###
! ### and then write, in your test script (which we assume is named
! ### frotz.exp):
! ###
! ### send_gdb "break [gdb_get_line_number "frotz.exp: test name"]\n"
! ###
! ### (Yes, Tcl knows how to handle the nested quotes and brackets.
! ### Try this:
! ### $ tclsh
! ### % puts "foo [lindex "bar baz" 1]"
! ### foo baz
! ### %
! ### Tcl is quite clever, for a little stringy language.)
!
! proc gdb_get_line_number {text {file /omitted/}} {
! global gdb_prompt;
! global srcfile;
!
! if {! [string compare $file /omitted/]} {
! set file $srcfile
! }
!
! set result -1;
! gdb_test "list ${file}:1,1" ".*" ""
! send_gdb "search ${text}\n"
! gdb_expect {
! -re "\[\r\n\]+(\[0-9\]+)\[ \t\].*${text}.*$gdb_prompt $" {
! set result $expect_out(1,string)
! }
! -re ".*$gdb_prompt $" {
! fail "find line number containing \"${text}\""
! }
! timeout {
! fail "find line number containing \"${text}\" (timeout)"
! }
}
! return $result;
}
# gdb_continue_to_end:
--- 1793,1899 ----
}
}
! # gdb_get_line_number TEXT [FILE]
! #
! # Search the source file FILE, and return the line number of the
! # first line containing TEXT. If no match is found, return -1.
! #
! # TEXT is a string literal, not a regular expression.
! #
! # The default value of FILE is "$srcdir/$subdir/$srcfile". If FILE is
! # specified, and does not start with "/", then it is assumed to be in
! # "$srcdir/$subdir". This is awkward, and can be fixed in the future,
! # by changing the callers and the interface at the same time.
! # In particular: gdb.base/break.exp, gdb.base/condbreak.exp,
! # gdb.base/ena-dis-br.exp.
! #
! # Use this function to keep your test scripts independent of the
! # exact line numbering of the source file. Don't write:
! #
! # send_gdb "break 20"
! #
! # This means that if anyone ever edits your test's source file,
! # your test could break. Instead, put a comment like this on the
! # source file line you want to break at:
! #
! # /* breakpoint spot: frotz.exp: test name */
! #
! # and then write, in your test script (which we assume is named
! # frotz.exp):
! #
! # send_gdb "break [gdb_get_line_number "frotz.exp: test name"]\n"
! #
! # (Yes, Tcl knows how to handle the nested quotes and brackets.
! # Try this:
! # $ tclsh
! # % puts "foo [lindex "bar baz" 1]"
! # foo baz
! # %
! # Tcl is quite clever, for a little stringy language.)
! #
! # ===
! #
! # The previous implementation of this procedure used the gdb search command.
! # This version is different:
! #
! # . It works with MI, and it also works when gdb is not running.
! #
! # . It operates on the build machine, not the host machine.
! #
! # . For now, this implementation fakes a current directory of
! # $srcdir/$subdir to be compatible with the old implementation.
! # This will go away eventually and some callers will need to
! # be changed.
! #
! # . The TEXT argument is literal text and matches literally,
! # not a regular expression as it was before.
! #
! # . State changes in gdb, such as changing the current file
! # and setting $_, no longer happen.
! #
! # After a bit of time we can forget about the differences from the
! # old implementation.
! #
! # --chastain 2004-08-05
!
! proc gdb_get_line_number { text { file "" } } {
! global srcdir
! global subdir
! global srcfile
!
! if { "$file" == "" } then {
! set file "$srcfile"
! }
! if { ! [regexp "^/" "$file"] } then {
! set file "$srcdir/$subdir/$file"
! }
!
! if { [ catch { set fd [open "$file"] } message ] } then {
! perror "$message"
! return -1
! }
!
! set found -1
! for { set line 1 } { 1 } { incr line } {
! if { [ catch { set nchar [gets "$fd" body] } message ] } then {
! perror "$message"
! return -1
! }
! if { $nchar < 0 } then {
! break
! }
! if { [string first "$text" "$body"] >= 0 } then {
! set found $line
! break
! }
! }
!
! if { [ catch { close "$fd" } message ] } then {
! perror "$message"
! return -1
}
!
! return $found
}
# gdb_continue_to_end:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch/testsuite] lib/gdb.exp: native tcl gdb_get_line_number
2004-08-08 16:14 [patch/testsuite] lib/gdb.exp: native tcl gdb_get_line_number Michael Chastain
@ 2004-08-09 17:55 ` Mark Kettenis
2004-08-09 19:47 ` Michael Chastain
0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2004-08-09 17:55 UTC (permalink / raw)
To: mec.gnu; +Cc: gdb-patches
Date: Sun, 08 Aug 2004 12:14:36 -0400
From: Michael Chastain <mec.gnu@mindspring.com>
2004-08-08 Michael Chastain <mec.gnu@mindspring.com>
* lib/gdb.exp (gdb_get_line_number): Rewrite with native tcl
rather than asking gdb to search.
This causes problems if you configure using a relative pathname, i.e.
../src/configure --enable-gdb-build-warnings=,-Werror
Because relative pathnames don't start with /, gdb_get_line_number
will prepend the source directory yet another time. That won't work.
The attached patch fixes things for me, but can somebody please check
whether i've escaped the dot correctly?
Index: testsuite/ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* lib/gdb.exp: Recognize relative path names as well as absolute
ones.
Index: testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.54
diff -u -p -r1.54 gdb.exp
--- testsuite/lib/gdb.exp 9 Aug 2004 13:16:15 -0000 1.54
+++ testsuite/lib/gdb.exp 9 Aug 2004 17:54:47 -0000
@@ -1874,7 +1874,7 @@ proc gdb_get_line_number { text { file "
if { "$file" == "" } then {
set file "$srcfile"
}
- if { ! [regexp "^/" "$file"] } then {
+ if { ! [regexp "^(/|\\.)" "$file"] } then {
set file "$srcdir/$subdir/$file"
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch/testsuite] lib/gdb.exp: native tcl gdb_get_line_number
2004-08-09 17:55 ` Mark Kettenis
@ 2004-08-09 19:47 ` Michael Chastain
2004-08-09 20:22 ` Mark Kettenis
0 siblings, 1 reply; 6+ messages in thread
From: Michael Chastain @ 2004-08-09 19:47 UTC (permalink / raw)
To: kettenis; +Cc: gdb-patches
Mark Kettenis <kettenis@chello.nl> wrote:
> This causes problems if you configure using a relative pathname, i.e.
>
> ../src/configure --enable-gdb-build-warnings=,-Werror
Oof. I forgot all about relative pathnames.
> The attached patch fixes things for me, but can somebody please check
> whether i've escaped the dot correctly?
I'm going to think about this problem a bit. I don't really like that
compatibility kludge in the first place, and I'd rather bust some heads
in the callers and de-kludge this rather then en-kludge it some more.
So this patch is not approved. (If I don't get the problem fixed pretty
quick then I'll have to accept it though).
Which files are causing problems on your system? On my system,
the intersection between gdb_get_line_number and ${srcfile*} with
a "/" in them is:
gdb.cp/ctti.exp
gdb.cp/m-static.exp
So I would have to change two callers.
In the long run I want to go further and change all the callers to
explicitly specify a filename and then kill off the kludge.
But that's not suitable for right now.
Michael C
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch/testsuite] lib/gdb.exp: native tcl gdb_get_line_number
2004-08-09 19:47 ` Michael Chastain
@ 2004-08-09 20:22 ` Mark Kettenis
2004-08-09 22:18 ` [rfc/testsuite/cp] make all srcfile look the same Michael Chastain
0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2004-08-09 20:22 UTC (permalink / raw)
To: mec.gnu; +Cc: gdb-patches
Date: Mon, 09 Aug 2004 15:47:53 -0400
From: Michael Chastain <mec.gnu@mindspring.com>
> The attached patch fixes things for me, but can somebody please check
> whether i've escaped the dot correctly?
I'm going to think about this problem a bit. I don't really like that
compatibility kludge in the first place, and I'd rather bust some heads
in the callers and de-kludge this rather then en-kludge it some more.
So this patch is not approved. (If I don't get the problem fixed pretty
quick then I'll have to accept it though).
OK.
Which files are causing problems on your system? On my system,
the intersection between gdb_get_line_number and ${srcfile*} with
a "/" in them is:
gdb.cp/ctti.exp
gdb.cp/m-static.exp
So I would have to change two callers.
Looks like you're right. Here's a diff of the testsuite resuults:
--- ../testresults/20040808/gdb.sum Mon Aug 9 22:05:51 2004
+++ gdb/testsuite/gdb.sum Mon Aug 9 22:13:51 2004
@@ -1,4 +1,4 @@
-Test Run By kettenis on Mon Aug 9 22:00:30 2004
+Test Run By kettenis on Mon Aug 9 22:09:33 2004
Native configuration is i386-unknown-freebsd4.7
=== gdb tests ===
@@ -7027,10 +7026,11 @@
PASS: gdb.cp/cplusfuncs.exp: info function for "operator()("
PASS: gdb.cp/cplusfuncs.exp: info function for "operator char \*("
Running ../../../src/gdb/testsuite/gdb.cp/ctti.exp ...
-PASS: gdb.cp/ctti.exp: continue to breakpoint: marker add1
-PASS: gdb.cp/ctti.exp: print c
-PASS: gdb.cp/ctti.exp: print f
-PASS: gdb.cp/ctti.exp: print i
+ERROR: couldn't open "../../../src/gdb/testsuite/gdb.cp/../../../src/gdb/testsuite/gdb.cp/cttiadd.cc": no such file or directory
+UNRESOLVED: gdb.cp/ctti.exp: continue to breakpoint: marker add1
+FAIL: gdb.cp/ctti.exp: print c
+FAIL: gdb.cp/ctti.exp: print f
+FAIL: gdb.cp/ctti.exp: print i
Running ../../../src/gdb/testsuite/gdb.cp/demangle.exp ...
PASS: gdb.cp/demangle.exp: lucid: set demangle-style
PASS: gdb.cp/demangle.exp: lucid: check demangling style
@@ -8104,23 +8104,24 @@
PASS: gdb.cp/m-data.exp: shadowing member
PASS: gdb.cp/m-data.exp: shadowed global variable
Running ../../../src/gdb/testsuite/gdb.cp/m-static.exp ...
-PASS: gdb.cp/m-static.exp: continue to breakpoint: end of constructors
-PASS: gdb.cp/m-static.exp: simple object, static const bool
-PASS: gdb.cp/m-static.exp: simple object, static const int
-PASS: gdb.cp/m-static.exp: simple object, static long
-PASS: gdb.cp/m-static.exp: simple object, static enum
-PASS: gdb.cp/m-static.exp: derived template object, base static const bool
-PASS: gdb.cp/m-static.exp: derived template object, base static const int
-PASS: gdb.cp/m-static.exp: derived template object, base static long
-PASS: gdb.cp/m-static.exp: derived template object, base static enum
-PASS: gdb.cp/m-static.exp: derived template object, static enum
-PASS: gdb.cp/m-static.exp: template object, static const bool
-PASS: gdb.cp/m-static.exp: template object, static const int
-PASS: gdb.cp/m-static.exp: template object, static long
-PASS: gdb.cp/m-static.exp: template object, static enum
-PASS: gdb.cp/m-static.exp: template object, static derived enum
-PASS: gdb.cp/m-static.exp: static const int initialized elsewhere
-PASS: gdb.cp/m-static.exp: static const int initialized nowhere
+ERROR: couldn't open "../../../src/gdb/testsuite/gdb.cp/../../../src/gdb/testsuite/gdb.cp/m-static.cc": no such file or directory
+UNRESOLVED: gdb.cp/m-static.exp: continue to breakpoint: end of constructors
+FAIL: gdb.cp/m-static.exp: simple object, static const bool
+FAIL: gdb.cp/m-static.exp: simple object, static const int
+FAIL: gdb.cp/m-static.exp: simple object, static long
+FAIL: gdb.cp/m-static.exp: simple object, static enum
+FAIL: gdb.cp/m-static.exp: derived template object, base static const bool
+FAIL: gdb.cp/m-static.exp: derived template object, base static const int
+FAIL: gdb.cp/m-static.exp: derived template object, base static long
+FAIL: gdb.cp/m-static.exp: derived template object, base static enum
+FAIL: gdb.cp/m-static.exp: derived template object, static enum
+FAIL: gdb.cp/m-static.exp: template object, static const bool
+FAIL: gdb.cp/m-static.exp: template object, static const int
+FAIL: gdb.cp/m-static.exp: template object, static long
+FAIL: gdb.cp/m-static.exp: template object, static enum
+FAIL: gdb.cp/m-static.exp: template object, static derived enum
+FAIL: gdb.cp/m-static.exp: static const int initialized elsewhere
+FAIL: gdb.cp/m-static.exp: static const int initialized nowhere
Running ../../../src/gdb/testsuite/gdb.cp/maint.exp ...
PASS: gdb.cp/maint.exp: help maintenance cplus
PASS: gdb.cp/maint.exp: help maint cp
@@ -10523,10 +10524,11 @@
=== gdb Summary ===
-# of expected passes 9922
-# of unexpected failures 54
+# of expected passes 9901
+# of unexpected failures 72
# of expected failures 147
# of known failures 35
+# of unresolved testcases 2
# of untested testcases 4
# of unsupported tests 20
/home/kettenis/sandbox/gdb/obj/gdb/testsuite/../../gdb/gdb version 2004-08-09-cvs -nx
^ permalink raw reply [flat|nested] 6+ messages in thread
* [rfc/testsuite/cp] make all srcfile look the same
2004-08-09 20:22 ` Mark Kettenis
@ 2004-08-09 22:18 ` Michael Chastain
2004-08-15 9:21 ` Michael Chastain
0 siblings, 1 reply; 6+ messages in thread
From: Michael Chastain @ 2004-08-09 22:18 UTC (permalink / raw)
To: kettenis, david.carlton, carlton; +Cc: gdb-patches
Okay Mark, how about this patch?
It works for me. Tested on native i686-pc-linux-gnu with
tcl 8.4.6, expect 5.41, dejagnu 1.4.4, and some gcc v3's.
I tested with both relative and absolute patches:
../src/configure --enable-gdb-build-warnings=,-Werror
/berman/fsf/_current/source/gdb/HEAD/src/configure --prefix=/...
If it works for you, I'll go ahead and commit it.
Michael C
===
2004-08-09 Michael Chastain <mec.gnu@mindspring.com>
* gdb.cp/ctti.exp: Tweak srcfile and objfile to have no slashes.
* gdb.cp/m-static.exp: Likewise.
* gdb.cp/rtti.exp: Likewise.
Index: ctti.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/ctti.exp,v
retrieving revision 1.6
diff -u -r1.6 ctti.exp
--- ctti.exp 29 Feb 2004 22:29:15 -0000 1.6
+++ ctti.exp 9 Aug 2004 20:03:15 -0000
@@ -29,33 +29,33 @@
if { [skip_cplus_tests] } { continue }
set testfile "cttiadd"
-set srcfile "${srcdir}/${subdir}/${testfile}.cc"
-set srcfile1 "${srcdir}/${subdir}/${testfile}1.cc"
-set srcfile2 "${srcdir}/${subdir}/${testfile}2.cc"
-set srcfile3 "${srcdir}/${subdir}/${testfile}3.cc"
-set objfile "${objdir}/${subdir}/${testfile}.o"
-set objfile1 "${objdir}/${subdir}/${testfile}1.o"
-set objfile2 "${objdir}/${subdir}/${testfile}2.o"
-set objfile3 "${objdir}/${subdir}/${testfile}3.o"
+set srcfile "${testfile}.cc"
+set srcfile1 "${testfile}1.cc"
+set srcfile2 "${testfile}2.cc"
+set srcfile3 "${testfile}3.cc"
+set objfile "${testfile}.o"
+set objfile1 "${testfile}1.o"
+set objfile2 "${testfile}2.o"
+set objfile3 "${testfile}3.o"
set binfile "${objdir}/${subdir}/${testfile}"
-if { [gdb_compile "${srcfile}" "${objfile}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile" "$objdir/$subdir/$objfile" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile1" "$objdir/$subdir/$objfile1" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${srcfile2}" "${objfile2}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile2" "$objdir/$subdir/$objfile2" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${srcfile3}" "${objfile3}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile3" "$objdir/$subdir/$objfile3" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${objfile} ${objfile1} ${objfile2} ${objfile3}" "${binfile}" executable {debug c++}] != "" } {
+if { [gdb_compile "$objdir/$subdir/$objfile $objdir/$subdir/$objfile1 $objdir/$subdir/$objfile2 $objdir/$subdir/$objfile3" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
Index: rtti.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/rtti.exp,v
retrieving revision 1.5
diff -u -r1.5 rtti.exp
--- rtti.exp 5 Mar 2004 17:32:25 -0000 1.5
+++ rtti.exp 9 Aug 2004 20:03:15 -0000
@@ -40,25 +40,21 @@
set bug_id 0
set testfile "rtti"
-set srcfile1 "${srcdir}/${subdir}/${testfile}1.cc"
-set objfile1 "${objdir}/${subdir}/${testfile}1.o"
-set srcfile2 "${srcdir}/${subdir}/${testfile}2.cc"
-set objfile2 "${objdir}/${subdir}/${testfile}2.o"
-set binfile ${objdir}/${subdir}/${testfile}
-
-# gdb_get_line_number needs this to be called srcfile. Except that it
-# gets confused if the directories are included. :-(
-set srcfile "${testfile}1.cc"
+set srcfile1 "${testfile}1.cc"
+set objfile1 "${testfile}1.o"
+set srcfile2 "${testfile}2.cc"
+set objfile2 "${testfile}2.o"
+set binfile "${objdir}/${subdir}/${testfile}"
-if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile1" "$objdir/$subdir/$objfile1" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${srcfile2}" "${objfile2}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile2" "$objdir/$subdir/$objfile2" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${objfile1} ${objfile2}" "${binfile}" executable {debug c++}] != "" } {
+if { [gdb_compile "$objdir/$subdir/$objfile1 $objdir/$subdir/$objfile2" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
@@ -79,7 +75,7 @@
# First, run to after we've constructed the object:
-gdb_breakpoint [gdb_get_line_number "main-constructs-done"]
+gdb_breakpoint [gdb_get_line_number "main-constructs-done" "$srcfile1"]
gdb_continue_to_breakpoint "end of constructors in main"
gdb_test_multiple "print *e1" "print *e1" {
@@ -135,12 +131,12 @@
# Now we test the hack that's been implemented to get around some
# instances of PR gdb/1511.
-gdb_breakpoint [gdb_get_line_number "func-constructs-done"]
+gdb_breakpoint [gdb_get_line_number "func-constructs-done" "$srcfile1"]
gdb_continue_to_breakpoint "end of constructors in func"
gdb_test "print *obj" "\\$\[0-9\]* = {<n2::Base2> = .*}"
-gdb_breakpoint [gdb_get_line_number "func3-constructs-done"]
+gdb_breakpoint [gdb_get_line_number "func3-constructs-done" "$srcfile1"]
gdb_continue_to_breakpoint "end of constructors in func3"
gdb_test "print *obj3" "\\$\[0-9\]* = {<n2::C2> = .*}"
Index: m-static.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/m-static.exp,v
retrieving revision 1.2
diff -u -r1.2 m-static.exp
--- m-static.exp 6 Jan 2004 19:21:59 -0000 1.2
+++ m-static.exp 9 Aug 2004 20:03:15 -0000
@@ -33,21 +33,21 @@
set bug_id 0
set testfile "m-static"
-set srcfile "${srcdir}/${subdir}/${testfile}.cc"
-set srcfile1 "${srcdir}/${subdir}/${testfile}1.cc"
-set objfile "${objdir}/${subdir}/${testfile}.o"
-set objfile1 "${objdir}/${subdir}/${testfile}1.o"
+set srcfile "${testfile}.cc"
+set srcfile1 "${testfile}1.cc"
+set objfile "${testfile}.o"
+set objfile1 "${testfile}1.o"
set binfile "${objdir}/${subdir}/${testfile}"
-if { [gdb_compile "${srcfile}" "${objfile}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile" "$objdir/$subdir/$objfile" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
+if { [gdb_compile "$srcdir/$subdir/$srcfile1" "$objdir/$subdir/$objfile1" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-if { [gdb_compile "${objfile} ${objfile1}" "${binfile}" executable {debug c++}] != "" } {
+if { [gdb_compile "$objdir/$subdir/$objfile $objdir/$subdir/$objfile1" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [rfc/testsuite/cp] make all srcfile look the same
2004-08-09 22:18 ` [rfc/testsuite/cp] make all srcfile look the same Michael Chastain
@ 2004-08-15 9:21 ` Michael Chastain
0 siblings, 0 replies; 6+ messages in thread
From: Michael Chastain @ 2004-08-15 9:21 UTC (permalink / raw)
To: gdb-patches
Mark said that this patch works for him, so I committed it.
===
> 2004-08-09 Michael Chastain <mec.gnu@mindspring.com>
>
> * gdb.cp/ctti.exp: Tweak srcfile and objfile to have no slashes.
> * gdb.cp/m-static.exp: Likewise.
> * gdb.cp/rtti.exp: Likewise.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-08-15 9:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-08 16:14 [patch/testsuite] lib/gdb.exp: native tcl gdb_get_line_number Michael Chastain
2004-08-09 17:55 ` Mark Kettenis
2004-08-09 19:47 ` Michael Chastain
2004-08-09 20:22 ` Mark Kettenis
2004-08-09 22:18 ` [rfc/testsuite/cp] make all srcfile look the same Michael Chastain
2004-08-15 9:21 ` Michael Chastain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox