aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/call-ar-st.exp4
-rw-r--r--gdb/testsuite/gdb.base/call-rt-st.exp8
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.c24
-rw-r--r--gdb/testsuite/gdb.base/charset.c1
-rw-r--r--gdb/testsuite/gdb.base/completion.exp6
-rw-r--r--gdb/testsuite/gdb.base/constvars.exp22
-rw-r--r--gdb/testsuite/gdb.base/cvexpr.c36
-rw-r--r--gdb/testsuite/gdb.base/dump.c2
-rw-r--r--gdb/testsuite/gdb.base/environ.exp15
-rw-r--r--gdb/testsuite/gdb.base/fileio.c5
-rw-r--r--gdb/testsuite/gdb.base/fileio.exp18
-rw-r--r--gdb/testsuite/gdb.base/freebpcmd.c20
-rw-r--r--gdb/testsuite/gdb.base/freebpcmd.exp4
-rw-r--r--gdb/testsuite/gdb.base/funcargs.exp35
-rw-r--r--gdb/testsuite/gdb.base/huge.c2
-rw-r--r--gdb/testsuite/gdb.base/maint.exp3
-rw-r--r--gdb/testsuite/gdb.base/nodebug.exp4
-rw-r--r--gdb/testsuite/gdb.base/scope.exp6
-rw-r--r--gdb/testsuite/gdb.base/sect-cmd.exp16
-rw-r--r--gdb/testsuite/gdb.base/setvar.exp7
-rw-r--r--gdb/testsuite/gdb.base/structs.exp23
-rw-r--r--gdb/testsuite/gdb.base/volatile.exp22
22 files changed, 161 insertions, 122 deletions
diff --git a/gdb/testsuite/gdb.base/call-ar-st.exp b/gdb/testsuite/gdb.base/call-ar-st.exp
index a7ea5cf..1431bc5 100644
--- a/gdb/testsuite/gdb.base/call-ar-st.exp
+++ b/gdb/testsuite/gdb.base/call-ar-st.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2000, 2001
+# Copyright 1998, 1999, 2000, 2001, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -89,8 +89,6 @@ proc set_lang_c {} {
}
}
-source ${binfile}.ci
-
# Start with a fresh gdb.
gdb_exit
diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp
index 39242fd..4a912fc 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.exp
+++ b/gdb/testsuite/gdb.base/call-rt-st.exp
@@ -1,4 +1,5 @@
-# Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -91,11 +92,6 @@ proc set_lang_c {} {
}
}
-
-
-source ${binfile}.ci
-
-
# Start with a fresh gdb.
gdb_exit
diff --git a/gdb/testsuite/gdb.base/callfuncs.c b/gdb/testsuite/gdb.base/callfuncs.c
index 9917e78..a52b2b1 100644
--- a/gdb/testsuite/gdb.base/callfuncs.c
+++ b/gdb/testsuite/gdb.base/callfuncs.c
@@ -1,3 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2004
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
/* Support program for testing gdb's ability to call functions
in the inferior, pass appropriate arguments to those functions,
and get the returned result. */
@@ -357,7 +379,7 @@ int a, b;
/* Gotta have a main to be able to generate a linked, runnable
executable, and also provide a useful place to set a breakpoint. */
-extern void * malloc() ;
+
int main ()
{
#ifdef usestubs
diff --git a/gdb/testsuite/gdb.base/charset.c b/gdb/testsuite/gdb.base/charset.c
index ece684a..a7b7123 100644
--- a/gdb/testsuite/gdb.base/charset.c
+++ b/gdb/testsuite/gdb.base/charset.c
@@ -2,6 +2,7 @@
Jim Blandy <jimb@cygnus.com> --- December 2001 */
#include <stdio.h>
+#include <string.h>
/* X_string is a null-terminated string in the X charset whose
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 9f5435d..ccf00cf 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1998, 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -710,10 +710,10 @@ gdb_expect {
send_gdb "set follow-fork-mode \t\t"
sleep 1
gdb_expect {
- -re "ask.*child.*parent.*$gdb_prompt set follow-fork-mode $"\
+ -re "child.*parent.*$gdb_prompt set follow-fork-mode $"\
{ send_gdb "\n"
gdb_expect {
- -re "Requires an argument.*ask.*child.*parent.*$gdb_prompt $"\
+ -re "Requires an argument.*child.*parent.*$gdb_prompt $"\
{ pass "complete 'set follow-fork-mode'"}
-re "Ambiguous item \"\"\\..*$gdb_prompt $"\
{ pass "complete 'set follow-fork-mode'"}
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp
index 9008624..6873286 100644
--- a/gdb/testsuite/gdb.base/constvars.exp
+++ b/gdb/testsuite/gdb.base/constvars.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -48,23 +48,10 @@ if [get_compiler_info ${binfile}] {
return -1;
}
-if {$hp_aCC_compiler || $hp_cc_compiler} {
- set lang "c++"
-} else {
- set lang ""
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug $lang]] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug ] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info ${binfile}] {
- return -1;
-}
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
@@ -88,6 +75,11 @@ proc local_compiler_xfail_check { } {
setup_xfail "*-*-*"
}
}
+
+ global hp_cc_compiler
+ if { $hp_cc_compiler } {
+ setup_xfail "hppa*-*-hpux*"
+ }
}
send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
diff --git a/gdb/testsuite/gdb.base/cvexpr.c b/gdb/testsuite/gdb.base/cvexpr.c
index 5871209..afbcd31 100644
--- a/gdb/testsuite/gdb.base/cvexpr.c
+++ b/gdb/testsuite/gdb.base/cvexpr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -409,26 +409,26 @@ int main ()
use (&v_boolean2);
use (&v_misordered);
- use (v_char_func);
- use (v_signed_char_func);
- use (v_unsigned_char_func);
+ use (&v_char_func);
+ use (&v_signed_char_func);
+ use (&v_unsigned_char_func);
- use (v_short_func);
- use (v_signed_short_func);
- use (v_unsigned_short_func);
+ use (&v_short_func);
+ use (&v_signed_short_func);
+ use (&v_unsigned_short_func);
- use (v_int_func);
- use (v_signed_int_func);
- use (v_unsigned_int_func);
+ use (&v_int_func);
+ use (&v_signed_int_func);
+ use (&v_unsigned_int_func);
- use (v_long_func);
- use (v_signed_long_func);
- use (v_unsigned_long_func);
+ use (&v_long_func);
+ use (&v_signed_long_func);
+ use (&v_unsigned_long_func);
- use (v_long_long_func);
- use (v_signed_long_long_func);
- use (v_unsigned_long_long_func);
+ use (&v_long_long_func);
+ use (&v_signed_long_long_func);
+ use (&v_unsigned_long_long_func);
- use (v_float_func);
- use (v_double_func);
+ use (&v_float_func);
+ use (&v_double_func);
}
diff --git a/gdb/testsuite/gdb.base/dump.c b/gdb/testsuite/gdb.base/dump.c
index 784edf6..bc68778 100644
--- a/gdb/testsuite/gdb.base/dump.c
+++ b/gdb/testsuite/gdb.base/dump.c
@@ -1,3 +1,5 @@
+#include <string.h>
+
#define ARRSIZE 32
int intarray[ARRSIZE], intarray2[ARRSIZE];
diff --git a/gdb/testsuite/gdb.base/environ.exp b/gdb/testsuite/gdb.base/environ.exp
index 55ff0a0..b00052b 100644
--- a/gdb/testsuite/gdb.base/environ.exp
+++ b/gdb/testsuite/gdb.base/environ.exp
@@ -1,5 +1,4 @@
-# Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
-
+# Copyright 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -39,11 +38,19 @@ if ![istarget "hppa*-*-hpux*"] then {
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit
diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c
index 591b3b6..4fda0fd 100644
--- a/gdb/testsuite/gdb.base/fileio.c
+++ b/gdb/testsuite/gdb.base/fileio.c
@@ -103,7 +103,7 @@ test_open ()
close (ret);
/* Open for write but no write permission */
errno = 0;
- ret = open (NOWRITE, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR);
+ ret = open (NOWRITE, O_CREAT | O_RDONLY, S_IRUSR);
if (ret >= 0)
{
close (ret);
@@ -479,6 +479,9 @@ strerrno (int err)
#ifdef ENOTEMPTY
case ENOTEMPTY: return "ENOTEMPTY";
#endif
+#ifdef EBUSY
+ case EBUSY: return "EBUSY";
+#endif
default: return "E??";
}
}
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
index 128cbb6..2a717bf 100644
--- a/gdb/testsuite/gdb.base/fileio.exp
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003
+# Copyright 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -216,9 +216,19 @@ gdb_test continue \
"Renaming a file to existing directory returns EISDIR"
send_gdb "tbreak 388\n" ; gdb_expect -re "$gdb_prompt $"
-gdb_test continue \
- "Continuing\\..*rename 3:.*(ENOTEMPTY|EEXIST).*test_rename \\(\\) at.*$srcfile:388.*" \
-"Renaming a directory to a non-empty directory returns ENOTEMPTY or EEXIST"
+set test "Renaming a directory to a non-empty directory returns ENOTEMPTY or EEXIST"
+gdb_test_multiple continue "${test}" {
+ -re "Continuing\\..*rename 3:.*(ENOTEMPTY|EEXIST).*test_rename \\(\\) at.*$srcfile:388.*$gdb_prompt $" {
+ pass "${test}"
+ }
+ -re "Continuing\\..*rename 3:.*EBUSY.*test_rename \\(\\) at.*$srcfile:388.*$gdb_prompt $" {
+ # At least version <= 2.6/2004-01-08 of the Linux Kernel gets
+ # this wrong (reporting EBUSY) when the file system is NFS
+ # mounted.
+ setup_xfail *-*-*linux* gdb/1502
+ fail "${test}"
+ }
+}
send_gdb "tbreak 393\n" ; gdb_expect -re "$gdb_prompt $"
gdb_test continue \
diff --git a/gdb/testsuite/gdb.base/freebpcmd.c b/gdb/testsuite/gdb.base/freebpcmd.c
index 52d9f30..765e12d 100644
--- a/gdb/testsuite/gdb.base/freebpcmd.c
+++ b/gdb/testsuite/gdb.base/freebpcmd.c
@@ -1,3 +1,23 @@
+/* Test program for GDB crashes while doing bp commands that continue inferior.
+ Copyright 2003 Free Software Foundation, Inc.
+
+ This file is part of the gdb testsuite.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
int
main (int argc, char **argv)
{
diff --git a/gdb/testsuite/gdb.base/freebpcmd.exp b/gdb/testsuite/gdb.base/freebpcmd.exp
index f952139..fed067f 100644
--- a/gdb/testsuite/gdb.base/freebpcmd.exp
+++ b/gdb/testsuite/gdb.base/freebpcmd.exp
@@ -110,12 +110,12 @@ if {$i >= [llength $lines]} {
gdb_run_cmd
gdb_test_multiple "" "run program with breakpoint commands" {
-re "warning: Invalid control type in command structure" {
- fail "run program with breakpoint commands"
+ kfail "gdb/1489" "run program with breakpoint commands"
}
-re "$gdb_prompt $" {
pass "run program with breakpoint commands"
}
eof {
- fail "run program with breakpoint commands (GDB died)"
+ kfail "gdb/1489" "run program with breakpoint commands (GDB died)"
}
}
diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp
index 38949f1..f3284c0 100644
--- a/gdb/testsuite/gdb.base/funcargs.exp
+++ b/gdb/testsuite/gdb.base/funcargs.exp
@@ -1,5 +1,5 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003,
+# 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -162,7 +162,6 @@ proc float_and_integral_args {} {
global gdb_prompt
global det_file
global gcc_compiled
- global hp_cc_compiler
delete_breakpoints
@@ -178,8 +177,6 @@ proc float_and_integral_args {} {
# Run; should stop at call2a and print actual arguments.
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
- # The debug info. for "f" is not correct. It's a known bug.
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
gdb_run_cmd
gdb_expect {
-re ".* call2a \\(c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5\\) .*$gdb_prompt $" { pass "run to call2a" }
@@ -190,55 +187,46 @@ proc float_and_integral_args {} {
# Print each arg as a double check to see if we can print
gdb_test "print c" ".* = 97 'a'" "print c after run to call2a"
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
gdb_test "print f1" ".* = 4" "print f1 after run to call2a"
gdb_test "print s" ".* = 1" "print s after run to call2a"
gdb_test "print d1" ".* = 5" "print d1 after run to call2a"
gdb_test "print i" ".* = 2" "print i after run to call2a"
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
gdb_test "print f2" ".* = 4" "print f2 after run to call2a"
gdb_test "print l" ".* = 3" "print l after run to call2a"
gdb_test "print d2" ".* = 5" "print d2 after run to call2a"
setup_xfail "rs6000-*-*"
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix*" }
# Continue; should stop at call2b and print actual arguments.
if [gdb_test "cont" ".* call2b \\(f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a'\\) .*" "continue to call2b"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2c and print actual arguments.
if [gdb_test "cont" ".* call2c \\(s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4\\) .*" "continue to call2c"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2d and print actual arguments.
if [gdb_test "cont" ".* call2d \\(d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1\\) .*" "continue to call2d"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2e and print actual arguments.
if [gdb_test "cont" ".* call2e \\(i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5\\) .*" "continue to call2e"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2f and print actual arguments.
if [gdb_test "cont" ".* call2f \\(f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2\\) .*" "continue to call2f"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2g and print actual arguments.
if [gdb_test "cont" ".* call2g \\(l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4\\) .*" "continue to call2g"] {
gdb_suppress_tests;
}
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2h and print actual arguments.
if [gdb_test "cont" ".* call2h \\(d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3\\) .*" "continue to call2h"] {
gdb_suppress_tests;
@@ -249,7 +237,6 @@ proc float_and_integral_args {} {
delete_breakpoints
gdb_breakpoint call2i
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
# Continue; should stop at call2i and print actual arguments.
if [gdb_test "cont" ".* call2i \\(c1=97 'a', f1=4, c2=97 'a', c3=97 'a', d1=5, c4=97 'a', c5=97 'a', c6=97 'a', f2=4, s=1, c7=97 'a', d2=5\\) .*" "continue to call2i"] {
gdb_suppress_tests;
@@ -445,7 +432,6 @@ proc discard_and_shuffle {} {
global decimal
global det_file
global gcc_compiled
- global hp_cc_compiler
delete_breakpoints
@@ -474,8 +460,6 @@ proc discard_and_shuffle {} {
setup_xfail "mips-sgi-irix5*"
}
- # The debug info. for "f" is not correct. It's a known bug.
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
gdb_expect {
-re "backtrace 100\[\r\n\]+
@@ -505,7 +489,6 @@ $gdb_prompt $" {
gdb_continue call6b
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6b" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -520,7 +503,6 @@ $gdb_prompt $" {
gdb_continue call6c
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6c" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -535,7 +517,6 @@ $gdb_prompt $" {
gdb_continue call6d
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6d" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -552,7 +533,6 @@ $gdb_prompt $" {
gdb_continue call6e
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6e" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -570,7 +550,6 @@ $gdb_prompt $" {
gdb_continue call6f
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6f" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -589,7 +568,6 @@ $gdb_prompt $" {
gdb_continue call6g
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6g" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
@@ -609,7 +587,6 @@ $gdb_prompt $" {
gdb_continue call6h
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6h" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6h \\(us=6, ui=7, ul=8\\) "
@@ -637,7 +614,6 @@ $gdb_prompt $" {
gdb_continue call6i
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6i" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6i \\(ui=7, ul=8\\) "
@@ -659,7 +635,6 @@ $gdb_prompt $" {
gdb_continue call6j
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6j" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6j \\(ul=8\\) "
@@ -681,7 +656,6 @@ $gdb_prompt $" {
# Print backtrace.
gdb_continue call6k
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
if [gdb_expect_list "backtrace from call6k" ".*$gdb_prompt $" {
".*\[\r\n\]#0 .* call6k \\(\\) "
@@ -713,7 +687,6 @@ proc shuffle_round_robin {} {
global decimal
global det_file
global gcc_compiled
- global hp_cc_compiler
delete_breakpoints
@@ -739,8 +712,6 @@ proc shuffle_round_robin {} {
}
if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
- # The debug info. for "f" is not correct. It's a known bug.
- if {$hp_cc_compiler} {setup_xfail hppa2.0w-*-*}
send_gdb "backtrace 100\n"
gdb_expect {
-re "backtrace 100\[\r\n\]+
@@ -1183,8 +1154,6 @@ gdb_load ${binfile}
if [istarget "mips*tx39-*"] {
set timeout 300
-} elseif [istarget "hppa*-hp-hpux*"] then {
- set timeout 240
} else {
set timeout 60
}
diff --git a/gdb/testsuite/gdb.base/huge.c b/gdb/testsuite/gdb.base/huge.c
index 419b92c..446bb18 100644
--- a/gdb/testsuite/gdb.base/huge.c
+++ b/gdb/testsuite/gdb.base/huge.c
@@ -2,6 +2,8 @@
* Test GDB's ability to read a very large data object from target memory.
*/
+#include <string.h>
+
/* A value that will produce a target data object large enough to
crash GDB. 0x200000 is big enough on GNU/Linux, other systems may
need a larger number. */
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 4864164..3e98c00 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -400,6 +400,7 @@ gdb_expect {
-re ".*bss.*$gdb_prompt $" { fail "maint info sections .text" }
-re ".*data.*$gdb_prompt $" { fail "maint info sections .text" }
-re ".* .text .*$gdb_prompt $" { pass "maint info sections .text" }
+ -re ".*$gdb_prompt $" { fail "maint info sections .text" }
timeout { fail "(timeout) maint info sections .text" }
}
@@ -409,6 +410,7 @@ send_gdb "maint info sections CODE\n"
gdb_expect {
-re ".* .data .*$gdb_prompt $" { fail "maint info sections CODE" }
-re ".* .text .*$gdb_prompt $" { pass "maint info sections CODE" }
+ -re ".*$gdb_prompt $" { fail "maint info sections CODE" }
timeout { fail "(timeout) maint info sections CODE" }
}
@@ -418,6 +420,7 @@ send_gdb "maint info sections DATA\n"
gdb_expect {
-re ".* .text .*$gdb_prompt $" { fail "maint info sections DATA" }
-re ".* .data .*$gdb_prompt $" { pass "maint info sections DATA" }
+ -re ".*$gdb_prompt $" { fail "maint info sections DATA" }
timeout { fail "(timeout) maint info sections DATA" }
}
diff --git a/gdb/testsuite/gdb.base/nodebug.exp b/gdb/testsuite/gdb.base/nodebug.exp
index 836ff86..fc96074 100644
--- a/gdb/testsuite/gdb.base/nodebug.exp
+++ b/gdb/testsuite/gdb.base/nodebug.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1999 Free Software Foundation, Inc.
+# Copyright 1997, 1999, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -39,8 +39,6 @@ if [get_compiler_info ${binfile}] {
return -1;
}
-source ${binfile}.ci
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp
index 266e0e3..3749d23 100644
--- a/gdb/testsuite/gdb.base/scope.exp
+++ b/gdb/testsuite/gdb.base/scope.exp
@@ -1,5 +1,5 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003,
+# 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -112,7 +112,6 @@ proc test_at_main {} {
# Print scope1.c::filelocal, which is 2
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
if [gdb_test "print 'scope1.c'::filelocal" "\\\$$decimal = 2" "print 'scope1.c'::filelocal" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal"] {
gdb_suppress_tests ;
}
@@ -121,7 +120,6 @@ proc test_at_main {} {
# Print scope1.c::filelocal_bss, which is 102
if { [test_compiler_info gcc-*-*] } then { setup_xfail "rs6000-*-*" }
- if {$hp_cc_compiler} then { setup_xfail "hppa2.0w-*-*" 11747CLLbs}
if [gdb_test "print 'scope1.c'::filelocal_bss" "\\\$$decimal = 102" "print 'scope1.c'::filelocal_bss" "No symbol \"scope1.c\" in current context.*" "print '$srcdir/$subdir/scope1.c'::filelocal_bss"] {
gdb_suppress_tests ;
}
diff --git a/gdb/testsuite/gdb.base/sect-cmd.exp b/gdb/testsuite/gdb.base/sect-cmd.exp
index 10c0e74..0b86b79 100644
--- a/gdb/testsuite/gdb.base/sect-cmd.exp
+++ b/gdb/testsuite/gdb.base/sect-cmd.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -40,9 +40,19 @@ if ![istarget "hppa*-*-hpux*"] then {
set testfile "break"
set srcfile ${testfile}.c
+set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit
diff --git a/gdb/testsuite/gdb.base/setvar.exp b/gdb/testsuite/gdb.base/setvar.exp
index e14ed5d..5f3b02c 100644
--- a/gdb/testsuite/gdb.base/setvar.exp
+++ b/gdb/testsuite/gdb.base/setvar.exp
@@ -1,4 +1,5 @@
-# Copyright 1997, 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -329,12 +330,8 @@ gdb_test "print *(v_signed_short_pointer+1)" ".\[0-9\]*.*=.*-456"
gdb_test "set v_unsigned_short_pointer=v_unsigned_short_array" ""
gdb_test "set variable *(v_unsigned_short_pointer)=123" ""
gdb_test "set variable *(v_unsigned_short_pointer+1)=-456" ""
-# DTS 10060CLLbs - bad type info from cc
-if {$hp_cc_compiler} {setup_xfail hppa*-*-*11* 10060CLLbs}
gdb_test "print v_unsigned_short_array" ".\[0-9\]* =.*\\{123,.*65080\\}" \
"set variable unsigned short pointer"
-# DTS 10060CLLbs - bad type info from cc
-if {$hp_cc_compiler} {setup_xfail hppa*-*-*11* 10060CLLbs}
gdb_test "print *(v_unsigned_short_pointer+1)" ".\[0-9\]* = 65080"
#
# test "set variable" for type "int *"
diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp
index 7ff54c9..4d282d2 100644
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -1,6 +1,6 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 1996, 1997, 1999, 2003 Free Software Foundation, Inc.
+# Copyright 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -81,6 +81,7 @@ proc start_structs_test { types } {
}
# Start with a fresh gdb.
+ gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
@@ -218,6 +219,9 @@ proc test_struct_calls { n } {
# Call fun${n}, checking the printed return-value.
setup_kfails structs-*tld* i*86-*-* gdb/1447
+ setup_kfails structs-*tld* sparc64-*-* gdb/1447
+ setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-*tld* x86_64-*-* gdb/1447
setup_compiler_kfails structs-tc-* gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
gdb_test "p/c fun${n}()" "[foo ${n}]" "p/c fun<n>(); ${tests}"
@@ -230,6 +234,9 @@ proc test_struct_calls { n } {
gdb_test "call Fun${n}(foo${n})" "" "call Fun<n>(foo<n>); ${tests}"
setup_kfails structs-*tld* i*86-*-* gdb/1447
+ setup_kfails structs-*tld* sparc64-*-* gdb/1447
+ setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-*tld* x86_64-*-* gdb/1447
setup_compiler_kfails structs-tc-* gcc-3-3 "DWARF 2" i*86-*-* gdb/1455
gdb_test "p/c L${n}" [foo ${n}] "p/c L<n>; ${tests}"
}
@@ -284,7 +291,10 @@ proc test_struct_returns { n } {
# Check that the program invalidated the relevant global.
setup_kfails structs-tld i*86-*-* gdb/1447
- gdb_test "p/c L${n}" " = [zed $n]" "zed L<n> for return; ${tests} .${testfile}."
+ setup_kfails structs-tld sparc64-*-* gdb/1447
+ setup_kfails structs-tld sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-tld x86_64-*-* gdb/1447
+ gdb_test "p/c L${n}" " = [zed $n]" "zed L<n> for return; ${tests}"
# Force the "return". This checks that the return is always
# performed, and that GDB correctly reported this to the user.
@@ -333,6 +343,9 @@ proc test_struct_returns { n } {
set test "value foo<n> returned; ${tests}"
setup_kfails structs-*tld* i*86-*-* gdb/1447
+ setup_kfails structs-*tld* sparc64-*-* gdb/1447
+ setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-*tld* x86_64-*-* gdb/1447
gdb_test_multiple "p/c L${n}" "${test}" {
-re " = [foo ${n}].*${gdb_prompt} $" {
if $return_value_unknown {
@@ -384,6 +397,9 @@ proc test_struct_returns { n } {
# Check that the program invalidated the relevant global.
setup_kfails structs-tld i*86-*-* gdb/1447
+ setup_kfails structs-tld sparc64-*-* gdb/1447
+ setup_kfails structs-tld sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-tld x86_64-*-* gdb/1447
gdb_test "p/c L${n}" " = [zed $n]" "zed L<n> for finish; ${tests}"
# Finish the function, set 'finish_value_unknown" to non-empty if the
@@ -406,6 +422,9 @@ proc test_struct_returns { n } {
# check that the variable was cleared, is printed.
set test "value foo<n> finished; ${tests}"
setup_kfails structs-*tld* i*86-*-* gdb/1447
+ setup_kfails structs-*tld* sparc64-*-* gdb/1447
+ setup_kfails structs-*tld* sparc*-*-solaris2* gdb/1447
+ setup_kfails structs-*tld* x86_64-*-* gdb/1447
gdb_test_multiple "p/c" "${test}" {
-re "[foo ${n}]\[\r\n\]+${gdb_prompt} $" {
if $finish_value_unknown {
diff --git a/gdb/testsuite/gdb.base/volatile.exp b/gdb/testsuite/gdb.base/volatile.exp
index faf62b9..c12e3d8 100644
--- a/gdb/testsuite/gdb.base/volatile.exp
+++ b/gdb/testsuite/gdb.base/volatile.exp
@@ -1,4 +1,4 @@
-# Copyright 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -55,28 +55,15 @@ if [get_compiler_info ${binfile}] {
return -1;
}
-if {$hp_aCC_compiler || $hp_cc_compiler} {
- set lang "c++"
-} else {
- set lang ""
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug $lang]] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug ] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
-remote_exec build "rm -f ${binfile}.ci"
-if [get_compiler_info ${binfile}] {
- return -1
-}
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-source ${binfile}.ci
-
#
# set it up at a breakpoint so we can play with the variable values
#
@@ -94,6 +81,11 @@ proc local_compiler_xfail_check { } {
setup_xfail "*-*-*"
}
}
+
+ global hp_cc_compiler
+ if { $hp_cc_compiler } {
+ setup_xfail "hppa*-*-hpux*"
+ }
}
send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"