This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
submission: dejagnu patch
- To: gdb-patches@sourceware.cygnus.com
- Subject: submission: dejagnu patch
- From: Jimmy Guo <guo@cup.hp.com>
- Date: Wed, 5 May 1999 17:07:12 -0700 (PDT)
Here is a patch to the dejagnu component of Cygnus GDB snapshot
19990422 from HP WDB development team. The corresponding FSF copyright
assignment is being arranged.
- Jimmy Guo, guo@cup.hp.com
ChangeLog
- Reflects log entries unique in HP's gdb source.
Makefile.in
- Allows instantiation of CFLAGS and CXXFLAGS by configure,
instead of hard-wired settings.
dejagnu/lib/target.exp
- Additional suppression of HP compiler / linker output
- Support for fortran77 compiler selection instead of
hard-wired g77
- Support for picking up compiler, assembler, and linker choices
from environment variables
dejagnu/lib/utils.exp
- Extends getdirs by allowing a -all option to return
all directory paths under a location.
dejagnu/runtest.exp
- Adds new '--directory (--di) <name>' option to run only tests
in directory <name>
- Extends multipass capability by allowing the specification
of multipass settings in '<name> <pass spec>' tuples.
This allows running the tests with multiple compilers by
controlling the TCL variables in each pass specification.
- Adds TCL variables ignoredirs, dir_to_run, and
cmdline_dir_to_run (via --directory command line option), and
support of filtering of test suite directories used in a test
pass specification.
- New capabilities of runtest as a result of the changes:
* make check OPTIONS="--dir=<dirname>"
Tells runtest to run only the tests that are inside
directory <dirname>.
Also allows running the tests that are more than 1 level
down inside the testsuite directory. For example if you only
want to run gdb.hp/gdb.objdebug, you could run:
* make check OPTIONS="--dir=gdb.hp/gdb.objdebug"
or, if gdb.objdebug has a unique name,
* make check OPTIONS="--dir=gdb.objdebug"
* make check TEST=<testfile.exp>
Allows running only the test named testfile.exp. Note that the
check-one make file target is the same with check, so running
check-one really runs check.
* make check PASS=(<number>|'<list of numbers separated by blanks>')
For a given test, this option controls in which pass the test
will be run. If a test file is to be run in the first and
second passes and you specify PASS=2, then the test is ignored
in the first pass.
You could use this option with both
OPTIONS="--dir=<dirname>" and TEST=<testfile.exp>. In the
case of a directory, the test files in that directory will
be run only in the passes that are specified in the PASS
variable.
Index: ChangeLog
/opt/gnu/bin/diff -c /home/debugger/proj/cygnus/snaps/gdb-19990422/gdb-19990422/ChangeLog ChangeLog
*** /home/debugger/proj/cygnus/snaps/gdb-19990422/gdb-19990422/ChangeLog Thu Apr 22 21:04:18 1999
--- ChangeLog Tue May 4 17:58:01 1999
***************
*** 250,255 ****
--- 250,260 ----
* Makefile.in: modify CC_FOR_TARGET and CXX_FOR_TARGET so that
they include winsup/include when it's a cygwin target.
+ Fri Nov 13 16:50:50 1998 Paul Sanville <sanville@cup.hp.com>
+
+ * config.guess: Allow all 9000/8?? model numbers when determining
+ the PA-RISC architecture type.
+
1998-11-12 Tom Tromey <tromey@cygnus.com>
* configure.in (host_tools): Added zip.
***************
*** 263,268 ****
--- 268,290 ----
Thu Nov 12 17:27:21 1998 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: lose "32" from comment about cygwin.
+
+ Tue Nov 10 17:33:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * config.sub (maybe_os): add CPU types for hppa2.0, hppa2.0w,
+ hppa2.0n, with and without company name.
+
+ * config.guess:
+
+ Hide warnings emitted by the HP linker when
+ generating a PA 2.0 object file. Contributed by Marcus Thiessel
+ <marcus@xemacs.org>.
+
+ Apply the sysconf(2) test to HP 9000/600-series,
+ 9000/802, 9000/804 and 9000/892 machines. Contributed by Pavel
+ Roskin <pavel.roskin@ecsoft.co.uk>.
+
+ Detect PA2.0 architecture.
Thu Nov 5 15:00:31 1998 Nick Clifton <nickc@cygnus.com>
Index: Makefile.in
/opt/gnu/bin/diff -c /home/debugger/proj/cygnus/snaps/gdb-19990422/gdb-19990422/Makefile.in Makefile.in
*** /home/debugger/proj/cygnus/snaps/gdb-19990422/gdb-19990422/Makefile.in Thu Apr 22 21:04:19 1999
--- Makefile.in Tue May 4 17:23:42 1999
***************
*** 81,88 ****
HOST_PREFIX_1 = loser-
# These flag values are normally overridden by the configure script.
! CFLAGS = -g
! CXXFLAGS = -g -O2
LIBCFLAGS = $(CFLAGS)
CFLAGS_FOR_TARGET = $(CFLAGS)
--- 81,88 ----
HOST_PREFIX_1 = loser-
# These flag values are normally overridden by the configure script.
! CFLAGS = @CFLAGS@
! CXXFLAGS = @CXXFLAGS@
LIBCFLAGS = $(CFLAGS)
CFLAGS_FOR_TARGET = $(CFLAGS)
Index: dejagnu/lib/target.exp
/opt/gnu/bin/diff -c /home/debugger/proj/cygnus/snaps/gdb-19990422/gdb-19990422/dejagnu/lib/target.exp dejagnu/lib/target.exp
*** /home/debugger/proj/cygnus/snaps/gdb-19990422/gdb-19990422/dejagnu/lib/target.exp Wed Apr 28 18:08:39 1999
--- dejagnu/lib/target.exp Tue May 4 17:25:07 1999
***************
*** 146,153 ****
# Ignore the compiler's warnings about PA incompatibility.
regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text
- regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text
-
# And the linker's +vcompatwarnings verbage.
regsub -all "(^|\n)\[^\n\]*Linker features were used that may not be supported\[^\n\]*.\[^\n\]*." $text "" text
--- 146,151 ----
***************
*** 189,194 ****
--- 187,204 ----
regsub -all "aCC .assigner.: Warning .*Could not satisfy instantiation request for \[^\n\]* contained in\[^\n\]*\n\t/lib/pa20_64/lib\[a-zA-Z0-9\]*.sl" $text "" text
}
+ # Remove the lines that are output by the HP F77 compiler to
+ # indicate the functions that are being compiled
+ upvar compiler_type compiler_type
+ if {[info exists compiler_type] && $compiler_type == "f77"} {
+ regsub -all "\[ \ta-zA-Z_0-9\./\]*:\[\r\n\]+" $text "" text
+ }
+
+ # Ignore the warnings about unknown options
+ regsub -all ".*warning \[0-9\]+: Unknown option.*ignored.*" $text "" text
+
+
+
# Ignore these.
regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text
***************
*** 272,277 ****
--- 282,288 ----
proc default_target_compile {source destfile type options} {
global target_triplet
global tool_root_dir
+ global env
global CFLAGS_FOR_TARGET
global compiler_flags
***************
*** 288,293 ****
--- 299,306 ----
if [info exists CFLAGS_FOR_TARGET] {
append add_flags " $CFLAGS_FOR_TARGET"
+ } elseif [info exists env(CFLAGS_FOR_TARGET)] {
+ append add_flags " $env(CFLAGS_FOR_TARGET)"
}
if [info exists target_info(host,name)] {
***************
*** 309,314 ****
--- 322,341 ----
set compiler [find_g++];
}
}
+
+ if {$i == "f77"} {
+ set compiler_type "f77"
+ if [board_info $dest exists f77flags] {
+ append add_flags " [target_info f77flags]"
+ }
+ # append add_flags " [f77_include_flags]";
+ if [board_info $dest exists f77compiler] {
+ set compiler [target_info f77compiler];
+ } else {
+ set compiler [find_g77];
+ }
+ }
+
if [regexp "^dest=" $i] {
regsub "^dest=" $i "" tmp
if [board_info $tmp exists name] {
***************
*** 359,379 ****
append add_flags " [board_info $host cflags_for_target]";
}
global CC_FOR_TARGET
global CXX_FOR_TARGET
if [info exists CC_FOR_TARGET] {
if { $compiler == ""} {
! set compiler $CC_FOR_TARGET;
}
}
if [info exists CXX_FOR_TARGET] {
if { $compiler_type == "c++"} {
! set compiler $CXX_FOR_TARGET;
}
}
if { $compiler == "" } {
set compiler [board_info $dest compiler];
if { $compiler == "" } {
--- 386,427 ----
append add_flags " [board_info $host cflags_for_target]";
}
+ global env
global CC_FOR_TARGET
global CXX_FOR_TARGET
+ global F77_FOR_TARGET
if [info exists CC_FOR_TARGET] {
+ if { $compiler == ""} {
+ set compiler $CC_FOR_TARGET
+ }
+ } elseif [info exists env(CC_FOR_TARGET)] {
if { $compiler == ""} {
! set compiler $env(CC_FOR_TARGET);
}
}
if [info exists CXX_FOR_TARGET] {
+ if {$compiler_type == "c++"} {
+ set compiler $CXX_FOR_TARGET
+ }
+ } elseif [info exists env(CXX_FOR_TARGET)] {
if { $compiler_type == "c++"} {
! set compiler $env(CXX_FOR_TARGET);
}
}
+ if [info exists F77_FOR_TARGET] {
+ if {$compiler_type == "f77"} {
+ set compiler $F77_FOR_TARGET
+ }
+ } elseif [info exists env(F77_FOR_TARGET)] {
+ if { $compiler_type == "f77"} {
+ set compiler $env(F77_FOR_TARGET);
+ }
+ }
+
+
if { $compiler == "" } {
set compiler [board_info $dest compiler];
if { $compiler == "" } {
***************
*** 381,387 ****
}
}
-
if ![is_remote host] {
if { [which $compiler] == 0 } {
return "default_target_compile: Can't find $compiler."
--- 429,434 ----
***************
*** 494,499 ****
--- 541,547 ----
}
verbose "doing compile"
+
set sources ""
if [is_remote host] {
foreach x $source {
***************
*** 579,589 ****
--- 627,640 ----
}
proc default_target_assemble { source destfile flags } {
+ global env
global AS_FOR_TARGET;
global ASFLAGS_FOR_TARGET;
if [info exists AS_FOR_TARGET] {
set AS "$AS_FOR_TARGET";
+ } elseif [info exists env(AS_FOR_TARGET)] {
+ set AS $env(AS_FOR_TARGET)
} else {
if ![board_info target exists assembler] {
set AS [find_gas];
***************
*** 594,599 ****
--- 645,652 ----
if [info exists ASFLAGS_FOR_TARGET] {
append flags " $ASFLAGS_FOR_TARGET";
+ } elseif [info exists env(ASFLAGS_FOR_TARGET)] {
+ append flags " $env(ASFLAGS_FOR_TARGET)"
}
if [is_remote host] {
***************
*** 627,637 ****
--- 680,693 ----
}
proc default_link { board objects destfile flags } {
+ global env
global LD_FOR_TARGET;
global LDFLAGS_FOR_TARGET;
if [info exists LD_FOR_TARGET] {
set LD "$LD_FOR_TARGET";
+ } elseif [info exists env(LD_FOR_TARGET)] {
+ set LD $env(LD_FOR_TARGET)
} else {
if ![board_info target exists linker] {
set LD [find_ld];
***************
*** 642,647 ****
--- 698,705 ----
if [info exists LDFLAGS_FOR_TARGET] {
append flags " $LDFLAGS_FOR_TARGET";
+ } elseif [info exists env(LDFLAGS_FOR_TARGET)] {
+ append flags " $env(LDFLAGS_FOR_TARGET)"
}
if [board_info $board exists ldflags] {
Index: dejagnu/lib/utils.exp
/opt/gnu/bin/diff -c /home/debugger/proj/cygnus/snaps/gdb-19990422/gdb-19990422/dejagnu/lib/utils.exp dejagnu/lib/utils.exp
*** /home/debugger/proj/cygnus/snaps/gdb-19990422/gdb-19990422/dejagnu/lib/utils.exp Wed Apr 28 18:08:39 1999
--- dejagnu/lib/utils.exp Tue May 4 17:25:16 1999
***************
*** 33,38 ****
--- 33,45 ----
# returns: a list of dirs or NULL
#
proc getdirs { args } {
+ if {[lindex $args 0] == "-all"} {
+ set alldirs 1
+ set args [lrange $args 1 end]
+ } else {
+ set alldirs 0
+ }
+
set path [lindex $args 0]
if { [llength $args] > 1} {
set pattern [lindex $args 1]
***************
*** 57,68 ****
default {
if [file readable $i] {
verbose "Found directory [file tail $i]" 3
! lappend dirs $i
}
}
}
}
! }
} else {
perror "$tmp"
return ""
--- 64,84 ----
default {
if [file readable $i] {
verbose "Found directory [file tail $i]" 3
! if {$alldirs} {
! set subdirs [getdirs -all $i $pattern]
! if {$subdirs != ""} {
! append dirs " $subdirs "
! } else {
! lappend dirs $i
! }
! } else {
! lappend dirs $i
! }
}
}
}
}
! }
} else {
perror "$tmp"
return ""
Index: dejagnu/runtest.exp
/opt/gnu/bin/diff -c /home/debugger/proj/cygnus/snaps/gdb-19990422/gdb-19990422/dejagnu/runtest.exp dejagnu/runtest.exp
*** /home/debugger/proj/cygnus/snaps/gdb-19990422/gdb-19990422/dejagnu/runtest.exp Wed Apr 28 18:08:29 1999
--- dejagnu/runtest.exp Tue May 4 17:25:21 1999
***************
*** 366,374 ****
send_user "USAGE: runtest \[options...\]\n"
send_user "\t--all (-a)\t\tPrint all test output to screen\n"
! send_user "\t--build \[string\]\t\tThe canonical config name of the build machine\n"
send_user "\t--host \[string\]\t\tThe canonical config name of the host machine\n"
! send_user "\t--host_board \[name\]\t\tThe host board to use\n"
send_user "\t--target \[string\]\tThe canonical config name of the target board\n"
send_user "\t--debug (-de)\t\tSet expect debugging ON\n"
send_user "\t--help (-he)\t\tPrint help text\n"
--- 366,374 ----
send_user "USAGE: runtest \[options...\]\n"
send_user "\t--all (-a)\t\tPrint all test output to screen\n"
! send_user "\t--build \[string\]\tThe canonical config name of the build machine\n"
send_user "\t--host \[string\]\t\tThe canonical config name of the host machine\n"
! send_user "\t--host_board \[name\]\tThe host board to use\n"
send_user "\t--target \[string\]\tThe canonical config name of the target board\n"
send_user "\t--debug (-de)\t\tSet expect debugging ON\n"
send_user "\t--help (-he)\t\tPrint help text\n"
***************
*** 378,387 ****
send_user "\t--reboot \[name\]\t\tReboot the target (if supported)\n"
send_user "\t--srcdir \[name\]\t\tThe test suite source code directory\n"
send_user "\t--strace \[number\]\tSet expect tracing ON\n"
! send_user "\t--target_board \[name(s)\]\t\tThe list of target boards to run tests on\n"
send_user "\t--tool\[name(s)\]\t\tRun tests on these tools\n"
! send_user "\t--tool_exec \[name\]\t\tThe path to the tool executable to test\n"
! send_user "\t--tool_opts \[options\]\t\tA list of additional options to pass to the tool\n"
send_user "\t--verbose (-v)\t\tEmit verbose output\n"
send_user "\t--version (-V)\t\tEmit all version numbers\n"
send_user "\t--D\[0-1\]\t\tTcl debugger\n"
--- 378,388 ----
send_user "\t--reboot \[name\]\t\tReboot the target (if supported)\n"
send_user "\t--srcdir \[name\]\t\tThe test suite source code directory\n"
send_user "\t--strace \[number\]\tSet expect tracing ON\n"
! send_user "\t--target_board \[name(s)\] The list of target boards to run tests on\n"
send_user "\t--tool\[name(s)\]\t\tRun tests on these tools\n"
! send_user "\t--tool_exec \[name\]\tThe path to the tool executable to test\n"
! send_user "\t--tool_opts \[options\]\tA list of additional options to pass to the tool\n"
! send_user "\t--directory (-di) name\tRun only the tests in directory 'name'\n"
send_user "\t--verbose (-v)\t\tEmit verbose output\n"
send_user "\t--version (-V)\t\tEmit all version numbers\n"
send_user "\t--D\[0-1\]\t\tTcl debugger\n"
***************
*** 436,441 ****
--- 437,443 ----
"--sr*" -
"--st*" -
"--ta*" -
+ "--di*" -
"--to*" {
incr i
set optarg [lindex $argv $i]
***************
*** 498,504 ****
set comm_line_tool $optarg;
continue
}
!
"--v" -
"--verb*" { # (--verbose) verbose output
incr verbose
--- 500,512 ----
set comm_line_tool $optarg;
continue
}
!
! "--di*" {
! set cmdline_dir_to_run $optarg
! puts "cmdline_dir_to_run = $cmdline_dir_to_run"
! continue
! }
!
"--v" -
"--verb*" { # (--verbose) verbose output
incr verbose
***************
*** 1586,1599 ****
--- 1594,1637 ----
# "{ name var1=value1 ... }" where `name' is a generic name for the pass and
# currently has no other meaning.
+ global env
+
if { [info exists MULTIPASS] } {
set multipass $MULTIPASS
+ } elseif {[info exists env(MULTIPASS)]} {
+ set multipass $env(MULTIPASS)
}
if { $multipass == "" } {
set multipass { "" }
}
+ # If PASS is specified, either as a TCL variable or in environment, we
+ # want to run only the tests specified. Its value should be a number
+ # or a list of numbers that specify the passes that we want to run.
+ if [info exists PASS] {
+ set pass $PASS
+ } elseif [info exists env(PASS)] {
+ set pass $env(PASS)
+ } else {
+ set pass ""
+ }
+
+ if {$pass != ""} {
+ set passes [list]
+ foreach p $pass {
+ foreach multipass_elem $multipass {
+ set multipass_name [lindex $multipass_elem 0]
+ if {$p == $multipass_name} {
+ lappend passes $multipass_elem
+ break;
+ }
+ }
+ }
+ set multipass $passes
+ }
+
foreach pass $multipass {
+
# multipass_name is set for `record_test' to use (see framework.exp).
if { [lindex $pass 0] != "" } {
set multipass_name [lindex $pass 0]
***************
*** 1621,1627 ****
# look for the top level testsuites. if $tool doesn't
# exist and there are no subdirectories in $srcdir, then
# we default to srcdir.
! set test_top_dirs [lsort [getdirs ${srcdir} "${tool}*"]]
if { ${test_top_dirs} == "" } {
set test_top_dirs ${srcdir}
}
--- 1659,1665 ----
# look for the top level testsuites. if $tool doesn't
# exist and there are no subdirectories in $srcdir, then
# we default to srcdir.
! set test_top_dirs [lsort [getdirs -all ${srcdir} "${tool}*"]]
if { ${test_top_dirs} == "" } {
set test_top_dirs ${srcdir}
}
***************
*** 1671,1676 ****
--- 1709,1762 ----
#
foreach dir "${test_top_dirs}" {
if { ${dir} != ${srcdir} } {
+ # Ignore this directory if is a directory to be
+ # ignored.
+ if {[info exists ignoredirs] && $ignoredirs != ""} {
+ set found 0
+ foreach directory $ignoredirs {
+ if [string match "*${directory}*" $dir] {
+ set found 1
+ break
+ }
+ }
+ if {$found} {
+ continue
+ }
+ }
+
+ # Run the test if dir_to_run was specified as a
+ # value (for example in MULTIPASS) and the test
+ # directory matches that directory.
+ if {[info exists dir_to_run] && $dir_to_run != ""} {
+ set found 0
+ foreach directory $dir_to_run {
+ if [string match "*${directory}*" $dir] {
+ set found 1
+ break
+ }
+ }
+ if {!$found} {
+ continue
+ }
+ }
+
+ # Run the test if cmdline_dir_to_run was specified
+ # by the user using --directory and the test
+ # directory matches that directory
+ if {[info exists cmdline_dir_to_run] \
+ && $cmdline_dir_to_run != ""} {
+ set found 0
+ foreach directory $cmdline_dir_to_run {
+ if [string match "*${directory}*" $dir] {
+ set found 1
+ break
+ }
+ }
+ if {!$found} {
+ continue
+ }
+ }
+
foreach test_name [lsort [find ${dir} *.exp]] {
if { ${test_name} == "" } {
continue
***************
*** 1681,1687 ****
continue
}
}
! # Get the path after the $srcdir so we know the subdir we're in.
set subdir [file dirname $test_name]
# We used to do
# regsub $srcdir [file dirname $test_name] "" subdir
--- 1767,1775 ----
continue
}
}
!
! # Get the path after the $srcdir so we know
! # the subdir we're in.
set subdir [file dirname $test_name]
# We used to do
# regsub $srcdir [file dirname $test_name] "" subdir