Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Chastain <mec.gnu@mindspring.com>
To: kettenis@chello.nl, david.carlton@sun.com, carlton@bactrian.org
Cc: gdb-patches@sources.redhat.com
Subject: [rfc/testsuite/cp] make all srcfile look the same
Date: Mon, 09 Aug 2004 22:18:00 -0000	[thread overview]
Message-ID: <4117F80D.nailHFZ1LFOO4@mindspring.com> (raw)
In-Reply-To: <200408092022.i79KMQwm057980@elgar.kettenis.dyndns.org>

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."
 }
 


  reply	other threads:[~2004-08-09 22:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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       ` Michael Chastain [this message]
2004-08-15  9:21         ` [rfc/testsuite/cp] make all srcfile look the same Michael Chastain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4117F80D.nailHFZ1LFOO4@mindspring.com \
    --to=mec.gnu@mindspring.com \
    --cc=carlton@bactrian.org \
    --cc=david.carlton@sun.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@chello.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox