-# Copyright 1998, 1999, 2000, 2001
+# Copyright 1998, 1999, 2000, 2001, 2004, 2007, 2008, 2009
# 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
+# the Free Software Foundation; either version 3 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
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This file was written by Elena Zannoni (ezannoni@cygnus.com)
}
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."
+ untested "couldn't compile ${srcdir}/${subdir}/${srcfile}"
+ return -1
}
}
}
-source ${binfile}.ci
-
# Start with a fresh gdb.
gdb_exit
continue
}
+get_debug_format
+
#go -until 1209
gdb_test "tbreak 1209" \
- "Breakpoint \[0-9\]+.*file.*$srcfile, line 1209.*" \
+ "Temporary breakpoint \[0-9\]+.*file.*$srcfile, line 1209.*" \
"tbreakpoint line 1209"
gdb_test continue \
#go -until 1216
gdb_test "tbreak 1216" \
-"Breakpoint.*file.*$srcfile, line 1216.*" \
+"Temporary breakpoint.*file.*$srcfile, line 1216.*" \
"tbreakpoint line 1216"
if ![gdb_skip_stdio_test "continue to 1216"] {
#set timeout $oldtimeout
#go -until 1220
gdb_test "tbreak 1220" \
- "Breakpoint.* file .*$srcfile, line 1220.*" \
+ "Temporary breakpoint.* file .*$srcfile, line 1220.*" \
"tbreakpoint line 1220"
if {![gdb_skip_float_test "continuing to breakpoint 1220"] && \
#go -until 1236
gdb_test "tbreak 1236" \
-"Breakpoint.* file .*$srcfile, line 1236.*" \
+"Temporary breakpoint.* file .*$srcfile, line 1236.*" \
"tbreakpoint line 1236"
if {![gdb_skip_float_test "continuing to 1236"] && \
#go -until 1241
gdb_test "tbreak 1241" \
- "Breakpoint..* file .*$srcfile, line 1241.*" \
+ "Temporary breakpoint..* file .*$srcfile, line 1241.*" \
"tbreakpoint line 1241"
send_gdb "continue\n"
gdb_test "break sum_array_print" \
".*Breakpoint ${decimal}: file .*call-ar-st.c, line.*" \
"set breakpoint in sum_array_print"
+gdb_test "set print frame-arguments all" ""
gdb_test "continue" \
".*Breakpoint ${decimal}, sum_array_print \\(seed=10, linked_list1=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .4, 6, 8, 10, 12, 14, 16, 18, 20, 22., head = 0., linked_list2=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .8, 10, 12, 14, 16, 18, 20, 22, 24, 26., head = 0., linked_list3=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .10, 12, 14, 16, 18, 20, 22, 24, 26, 28., head = 0., linked_list4=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .20, 22, 24, 26, 28, 30, 32, 34, 36, 38., head = 0.\\) at .*call-ar-st.c:1105\[ \t\n\r\]+1105.*printf\\(.Sum of 4 arrays, by element \\(add in seed as well\\).*\\);.*" \
"check args of sum_array_print"
#go -until 1281
gdb_test "tbreak 1281" \
- "Breakpoint.* file .*call-ar-st.c, line 1281.*" \
+ "Temporary breakpoint.* file .*call-ar-st.c, line 1281.*" \
"tbreakpoint line 1281"
if ![gdb_skip_stdio_test "continuing to 1281"] {
#go -until 1286
gdb_test "tbreak 1286" \
- "Breakpoint .* file .*call-ar-st.c, line 1286.*" \
+ "Temporary breakpoint .* file .*call-ar-st.c, line 1286.*" \
"tbreakpoint line 1286"
gdb_test continue "Continuing\\..*main \\(.*\\) at.*call-ar-st.c:1286\[\t\r\n \]+1286.*print_long_arg_list \\( a, b, c, d, e, f, .struct1, .struct2, .struct3, .struct4,.*" "continue to 1286"
# We can't just assume that a "step" will get us into
# print_long_arg_list here,either.
gdb_test "tbreak print_long_arg_list" \
- "Breakpoint .* file .*call-ar-st.c, line .*" \
+ "Temporary breakpoint .* file .*call-ar-st.c, line .*" \
"tbreak in print_long_arg_list after stepping into memcpy"
# The short match case below handles cases where a buffer
# overflows or something, and expect can't deal with the full
if {![gdb_skip_float_test "print_small_structs from print_long_arg_list"] && \
![gdb_skip_stdio_test "print_small_structs from print_long_arg_list"] } {
- # On Solaris, some of the args are passed by ref, others by value,
- # and GDB gets confused and says "Invalid cast" because it thinks
- # it has to cast the structure into a pointer to structure. A real
- # GDB bug, probably for all Sparc configs, but obscure. -sts 1999-08-17.
- setup_xfail "sparc*-*-solaris*"
+
+ # On 32-bit SPARC, some of the args are passed by ref, others by
+ # value, and GDB gets confused and says "Invalid cast" because it
+ # thinks it has to cast the structure into a pointer to structure.
+ if { [test_debug_format "stabs"] } then {
+ setup_kfail "gdb/1539" "sparc-*-*"
+ }
+
send_gdb "print print_small_structs(struct1, struct2, struct3, struct4, flags, flags_combo, three_char, five_char, int_char_combo, d1, d2, d3, f1, f2, f3)\n"
gdb_expect_list "print print_small_structs from print_long_arg_list" ".*$gdb_prompt $" {
"\[\t\r\n \]+alpha"
#go -until 1300
gdb_test "tbreak 1300" \
- "Breakpoint.* file .*call-ar-st.c, line 1300.*" \
+ "Temporary breakpoint.* file .*call-ar-st.c, line 1300.*" \
"tbreakpoint line 1300"
if ![gdb_skip_stdio_test "continuing to 1300"] {
#go -until 1305
gdb_test "tbreak 1305" \
- "Breakpoint.* file .*call-ar-st.c, line 1305.*" \
+ "Temporary breakpoint.* file .*call-ar-st.c, line 1305.*" \
"tbreakpoint line 1305"
gdb_test continue "Continuing\\..*main \\(\\) at .*call-ar-st.c:1305\[\r\n\t \]+1305.*init_int_char_combo\\(int_char_combo, 13, .!.\\);" \
#go -until 1311
gdb_test "tbreak 1311" \
- "Breakpoint.* file .*call-ar-st.c, line 1311.*" \
+ "Temporary breakpoint.* file .*call-ar-st.c, line 1311.*" \
"tbreakpoint line 1311"
gdb_test continue "Continuing\\..*main \\(\\) at .*call-ar-st.c:1311\[ \t\n\r\]+1311.*compute_with_small_structs\\(35\\);" \