From: Jimmy Guo <guo@cup.hp.com>
To: gdb-patches@sourceware.cygnus.com
Subject: (patch) hpjyg17: gdb testsuite compiler.c(c)
Date: Tue, 09 Nov 1999 12:23:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.10.9911091211540.1872-100000@hpcll168.cup.hp.com> (raw)
This patch moves compiler.c / compiler.cc to testsuite/lib/, and
modifies gdb.exp (get_compiler_info) to locate these two files from
$srcdir/lib/ instead of $srcdir/$subdir.
The reason for this change is to eliminate multiple copies of these two
files from existing (or future) test suite directories.
When applying this patch, please also remove existing compiler.c(c)
files from testsuite/gdb.* and testsuite/gdb.*/gdb.*/. Thanks.
ChangeLog
1999-11-09 Jimmy Guo <guo@cup.hp.com>
* gdb.exp (get_compiler_info): pick up compiler.c compiler.cc
from $srcdir/lib/.
* compiler.c,compiler.cc: New files, moved from gdb.base/ and
gdb.c++/.
Index: gdb/testsuite/lib/gdb.exp
/opt/gnu/bin/diff -r -c -N /view/guo.import//CLO/Components/WDB/Src/gnu/gdb/testsuite/lib/gdb.exp gdb/testsuite/lib/gdb.exp
*** /view/guo.import//CLO/Components/WDB/Src/gnu/gdb/testsuite/lib/gdb.exp Tue Nov 9 11:19:29 1999
--- gdb/testsuite/lib/gdb.exp Tue Nov 9 12:15:19 1999
***************
*** 901,913 ****
if {![istarget "hppa*-*-hpux*"]} {
if { [llength $args] > 0 } {
if {$args == "c++"} {
! if { [gdb_compile "${srcdir}/${subdir}/compiler.cc" "${binfile}.ci" preprocess {}] != "" } {
perror "Couldn't make ${binfile}.ci file"
return 1;
}
}
} else {
! if { [gdb_compile "${srcdir}/${subdir}/compiler.c" "${binfile}.ci" preprocess {}] != "" } {
perror "Couldn't make ${binfile}.ci file"
return 1;
}
--- 901,913 ----
if {![istarget "hppa*-*-hpux*"]} {
if { [llength $args] > 0 } {
if {$args == "c++"} {
! if { [gdb_compile "${srcdir}/lib/compiler.cc" "${binfile}.ci" preprocess {}] != "" } {
perror "Couldn't make ${binfile}.ci file"
return 1;
}
}
} else {
! if { [gdb_compile "${srcdir}/lib/compiler.c" "${binfile}.ci" preprocess {}] != "" } {
perror "Couldn't make ${binfile}.ci file"
return 1;
}
***************
*** 916,922 ****
if { [llength $args] > 0 } {
if {$args == "c++"} {
if { [eval gdb_preprocess \
! [list "${srcdir}/${subdir}/compiler.cc" "${binfile}.ci"] \
$args] != "" } {
perror "Couldn't make ${binfile}.ci file"
return 1;
--- 916,922 ----
if { [llength $args] > 0 } {
if {$args == "c++"} {
if { [eval gdb_preprocess \
! [list "${srcdir}/lib/compiler.cc" "${binfile}.ci"] \
$args] != "" } {
perror "Couldn't make ${binfile}.ci file"
return 1;
***************
*** 924,930 ****
}
} elseif { $args != "f77" } {
if { [eval gdb_preprocess \
! [list "${srcdir}/${subdir}/compiler.c" "${binfile}.ci"] \
$args] != "" } {
perror "Couldn't make ${binfile}.ci file"
return 1;
--- 924,930 ----
}
} elseif { $args != "f77" } {
if { [eval gdb_preprocess \
! [list "${srcdir}/lib/compiler.c" "${binfile}.ci"] \
$args] != "" } {
perror "Couldn't make ${binfile}.ci file"
return 1;
Index: gdb/testsuite/lib/compiler.c
/opt/gnu/bin/diff -r -c -N /view/guo.import//CLO/Components/WDB/Src/gnu/gdb/testsuite/lib/compiler.c gdb/testsuite/lib/compiler.c
*** /view/guo.import//CLO/Components/WDB/Src/gnu/gdb/testsuite/lib/compiler.c Tue Nov 9 12:22:00 1999
--- gdb/testsuite/lib/compiler.c Fri Oct 16 14:01:54 1998
***************
*** 0 ****
--- 1,31 ----
+ /* Often the behavior of any particular test depends upon what compiler was
+ used to compile the test. As each test is compiled, this file is
+ preprocessed by the same compiler used to compile that specific test
+ (different tests might be compiled by different compilers, particularly
+ if compiled at different times), and used to generate a *.ci (compiler
+ info) file for that test.
+
+ I.E., when callfuncs is compiled, a callfuncs.ci file will be generated,
+ which can then be sourced by callfuncs.exp to give callfuncs.exp access
+ to information about the compilation environment.
+
+ TODO: It might be a good idea to add expect code that tests each
+ definition made with 'set" to see if one already exists, and if so
+ warn about conflicts if it is being set to something else. */
+
+ /* This needs to be kept in sync with whatis.c and gdb.exp(get_compiler_info).
+ If this ends up being hairy, we could use a common header file. */
+
+ #if defined (__STDC__) || defined (_AIX)
+ set signed_keyword_not_used 0
+ #else
+ set signed_keyword_not_used 1
+ #endif
+
+ #if defined (__GNUC__)
+ set gcc_compiled __GNUC__
+ #else
+ set gcc_compiled 0
+ #endif
+
+ return 0
Index: gdb/testsuite/lib/compiler.cc
/opt/gnu/bin/diff -r -c -N /view/guo.import//CLO/Components/WDB/Src/gnu/gdb/testsuite/lib/compiler.cc gdb/testsuite/lib/compiler.cc
*** /view/guo.import//CLO/Components/WDB/Src/gnu/gdb/testsuite/lib/compiler.cc Tue Nov 9 12:22:00 1999
--- gdb/testsuite/lib/compiler.cc Tue Oct 27 17:24:59 1998
***************
*** 0 ****
--- 1,34 ----
+ /* Often the behavior of any particular test depends upon what compiler was
+ used to compile the test. As each test is compiled, this file is
+ preprocessed by the same compiler used to compile that specific test
+ (different tests might be compiled by different compilers, particularly
+ if compiled at different times), and used to generate a *.ci (compiler
+ info) file for that test.
+
+ I.E., when callfuncs is compiled, a callfuncs.ci file will be generated,
+ which can then be sourced by callfuncs.exp to give callfuncs.exp access
+ to information about the compilation environment.
+
+ TODO: It might be a good idea to add expect code that tests each
+ definition made with 'set" to see if one already exists, and if so
+ warn about conflicts if it is being set to something else. */
+
+ #if defined(__GNUC__) && __GNUC__ >= 2 && __GNUC_MINOR__ >= 6
+ set supports_template_debugging 1
+ #else
+ set supports_template_debugging 0
+ #endif
+
+ #if defined(__cplusplus)
+ set supports_template_debugging 1
+ #else
+ set supports_template_debugging 0
+ #endif
+
+ #if defined (__GNUC__)
+ set gcc_compiled __GNUC__
+ #else
+ set gcc_compiled 0
+ #endif
+
+ return 0
next reply other threads:[~1999-11-09 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-09 12:23 Jimmy Guo [this message]
1999-11-10 21:19 ` Stan Shebs
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=Pine.LNX.4.10.9911091211540.1872-100000@hpcll168.cup.hp.com \
--to=guo@cup.hp.com \
--cc=gdb-patches@sourceware.cygnus.com \
/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