binutils-gdb/gdb/testsuite/gdb.stabs/weird.exp

330 lines
10 KiB
Plaintext
Raw Normal View History

# Copyright 1997-2013 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 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, see <http://www.gnu.org/licenses/>.
# Test that GDB properly ignores invalid stabs.
# Also test that GDB can debug a .o file, and that it doesn't mind
# a file that's more minimal than what a compiler normally puts out.
set testfile weird
set srcfile [standard_output_file weird.s]
set binfile [standard_output_file weirdx.o]
* lib/gdb.exp (skip_altivec_tests, skip_vsx_tests) (build_executable): Update. (get_compiler_info): Remove 'binfile' argument. * gdb.ada/arrayidx.exp: Update. * gdb.ada/null_array.exp: Update. * gdb.arch/altivec-abi.exp: Update. * gdb.arch/altivec-regs.exp: Update. * gdb.arch/amd64-byte.exp: Update. * gdb.arch/amd64-dword.exp: Update. * gdb.arch/amd64-word.exp: Update. * gdb.arch/i386-avx.exp: Update. * gdb.arch/i386-byte.exp: Update. * gdb.arch/i386-sse.exp: Update. * gdb.arch/i386-word.exp: Update. * gdb.arch/ppc-dfp.exp: Update. * gdb.arch/ppc-fp.exp: Update. * gdb.arch/vsx-regs.exp: Update. * gdb.base/all-bin.exp: Update. * gdb.base/annota1.exp: Update. * gdb.base/async.exp: Update. * gdb.base/attach.exp: Update. * gdb.base/break-interp.exp: Update. * gdb.base/call-ar-st.exp: Update. * gdb.base/call-rt-st.exp: Update. * gdb.base/call-sc.exp: Update. * gdb.base/callfuncs.exp: Update. * gdb.base/catch-load.exp: Update. * gdb.base/completion.exp: Update. * gdb.base/complex.exp: Update. * gdb.base/condbreak.exp: Update. * gdb.base/consecutive.exp: Update. * gdb.base/constvars.exp: Update. * gdb.base/corefile.exp: Update. * gdb.base/eval-skip.exp: Update. * gdb.base/expand-psymtabs.exp: Update. * gdb.base/exprs.exp: Update. * gdb.base/fileio.exp: Update. * gdb.base/fixsection.exp: Update. * gdb.base/funcargs.exp: Update. * gdb.base/gdb11530.exp: Update. * gdb.base/gdb1555.exp: Update. * gdb.base/gnu-ifunc.exp: Update. * gdb.base/gnu_vector.exp: Update. * gdb.base/info-macros.exp: Update. * gdb.base/jit-simple.exp: Update. * gdb.base/jit-so.exp: Update. * gdb.base/jit.exp: Update. * gdb.base/langs.exp: Update. * gdb.base/list.exp: Update. * gdb.base/logical.exp: Update. * gdb.base/long_long.exp: Update. * gdb.base/longjmp.exp: Update. * gdb.base/macscp.exp: Update. * gdb.base/mips_pro.exp: Update. * gdb.base/miscexprs.exp: Update. * gdb.base/morestack.exp: Update. * gdb.base/nodebug.exp: Update. * gdb.base/opaque.exp: Update. * gdb.base/pc-fp.exp: Update. * gdb.base/pending.exp: Update. * gdb.base/permissions.exp: Update. * gdb.base/pointers.exp: Update. * gdb.base/prelink.exp: Update. * gdb.base/printcmds.exp: Update. * gdb.base/psymtab.exp: Update. * gdb.base/ptype.exp: Update. * gdb.base/relational.exp: Update. * gdb.base/scope.exp: Update. * gdb.base/setvar.exp: Update. * gdb.base/shlib-call.exp: Update. * gdb.base/shreloc.exp: Update. * gdb.base/signals.exp: Update. * gdb.base/sizeof.exp: Update. * gdb.base/so-impl-ld.exp: Update. * gdb.base/so-indr-cl.exp: Update. * gdb.base/solib-disc.exp: Update. * gdb.base/solib-display.exp: Update. * gdb.base/solib-nodir.exp: Update. * gdb.base/solib-overlap.exp: Update. * gdb.base/solib-symbol.exp: Update. * gdb.base/solib-weak.exp: Update. * gdb.base/solib.exp: Update. * gdb.base/store.exp: Update. * gdb.base/structs.exp: Update. * gdb.base/structs2.exp: Update. * gdb.base/type-opaque.exp: Update. * gdb.base/unload.exp: Update. * gdb.base/varargs.exp: Update. * gdb.base/volatile.exp: Update. * gdb.base/watch_thread_num.exp: Update. * gdb.base/watchpoint-solib.exp: Update. * gdb.base/watchpoint.exp: Update. * gdb.base/watchpoints.exp: Update. * gdb.base/whatis.exp: Update. * gdb.cell/arch.exp: Update. * gdb.cell/break.exp: Update. * gdb.cell/bt.exp: Update. * gdb.cell/core.exp: Update. * gdb.cell/data.exp: Update. * gdb.cell/ea-cache.exp: Update. * gdb.cell/f-regs.exp: Update. * gdb.cell/fork.exp: Update. * gdb.cell/gcore.exp: Update. * gdb.cell/mem-access.exp: Update. * gdb.cell/ptype.exp: Update. * gdb.cell/registers.exp: Update. * gdb.cell/sizeof.exp: Update. * gdb.cell/solib-symbol.exp: Update. * gdb.cell/solib.exp: Update. * gdb.cp/ambiguous.exp: Update. * gdb.cp/breakpoint.exp: Update. * gdb.cp/bs15503.exp: Update. * gdb.cp/casts.exp: Update. * gdb.cp/class2.exp: Update. * gdb.cp/cpexprs.exp: Update. * gdb.cp/cplusfuncs.exp: Update. * gdb.cp/ctti.exp: Update. * gdb.cp/dispcxx.exp: Update. * gdb.cp/gdb1355.exp: Update. * gdb.cp/gdb2384.exp: Update. * gdb.cp/gdb2495.exp: Update. * gdb.cp/infcall-dlopen.exp: Update. * gdb.cp/local.exp: Update. * gdb.cp/m-data.exp: Update. * gdb.cp/m-static.exp: Update. * gdb.cp/mb-ctor.exp: Update. * gdb.cp/mb-inline.exp: Update. * gdb.cp/mb-templates.exp: Update. * gdb.cp/member-ptr.exp: Update. * gdb.cp/method.exp: Update. * gdb.cp/namespace.exp: Update. * gdb.cp/nextoverthrow.exp: Update. * gdb.cp/nsdecl.exp: Update. * gdb.cp/nsrecurs.exp: Update. * gdb.cp/nsstress.exp: Update. * gdb.cp/nsusing.exp: Update. * gdb.cp/pr-1023.exp: Update. * gdb.cp/pr-1210.exp: Update. * gdb.cp/pr-574.exp: Update. * gdb.cp/pr9631.exp: Update. * gdb.cp/printmethod.exp: Update. * gdb.cp/psmang.exp: Update. * gdb.cp/re-set-overloaded.exp: Update. * gdb.cp/rtti.exp: Update. * gdb.cp/shadow.exp: Update. * gdb.cp/templates.exp: Update. * gdb.cp/try_catch.exp: Update. * gdb.dwarf2/dw2-ranges.exp: Update. * gdb.dwarf2/pr10770.exp: Update. * gdb.fortran/library-module.exp: Update. * gdb.hp/gdb.aCC/optimize.exp: Update. * gdb.hp/gdb.aCC/watch-cmd.exp: Update. * gdb.hp/gdb.base-hp/callfwmall.exp: Update. * gdb.hp/gdb.base-hp/hwwatchbus.exp: Update. * gdb.hp/gdb.base-hp/pxdb.exp: Update. * gdb.hp/gdb.base-hp/sized-enum.exp: Update. * gdb.hp/gdb.base-hp/so-thresh.exp: Update. * gdb.hp/gdb.compat/xdb1.exp: Update. * gdb.hp/gdb.compat/xdb2.exp: Update. * gdb.hp/gdb.compat/xdb3.exp: Update. * gdb.hp/gdb.defects/bs14602.exp: Update. * gdb.hp/gdb.defects/solib-d.exp: Update. * gdb.hp/gdb.objdbg/objdbg01.exp: Update. * gdb.hp/gdb.objdbg/objdbg02.exp: Update. * gdb.hp/gdb.objdbg/objdbg03.exp: Update. * gdb.hp/gdb.objdbg/objdbg04.exp: Update. * gdb.mi/gdb792.exp: Update. * gdb.mi/mi-pending.exp: Update. * gdb.mi/mi-solib.exp: Update. * gdb.mi/mi-var-cp.exp: Update. * gdb.opt/clobbered-registers-O2.exp: Update. * gdb.opt/inline-bt.exp: Update. * gdb.opt/inline-cmds.exp: Update. * gdb.opt/inline-locals.exp: Update. * gdb.python/py-events.exp: Update. * gdb.python/py-finish-breakpoint.exp: Update. * gdb.python/py-type.exp: Update. * gdb.reverse/solib-precsave.exp: Update. * gdb.reverse/solib-reverse.exp: Update. * gdb.server/solib-list.exp: Update. * gdb.stabs/weird.exp: Update. * gdb.threads/attach-into-signal.exp: Update. * gdb.threads/attach-stopped.exp: Update. * gdb.threads/tls-shared.exp: Update. * gdb.trace/change-loc.exp: Update. * gdb.trace/strace.exp: Update.
2012-06-21 22:46:25 +02:00
if { [ get_compiler_info ] } {
return -1
}
if { $hp_cc_compiler || $hp_aCC_compiler } {
# The native hp-ux assembler does not support stabs at all.
# If the compiler is native hp-ux, of course the assembler is too.
# But if someone builds gcc with the native assembler (not recommended)
# rather than the gnu assembler, then this logic will not suppress it.
# -- chastain 2004-01-07
unsupported "stabs with hp-ux assembler"
continue
}
proc do_tests {} {
global binfile
global gdb_prompt
# Mips/alpha targets that use gcc with mips-tfile put out the stabs
# assembler directives embedded in comments. If the assembler
# file is then processed with native cc, all stabs directives
# will be lost.
# Skip the rest of the stabs tests for this case.
send_gdb "ptype inttype\n"
gdb_expect {
-re "^ptype inttype\r*\ntype = inttype.*$gdb_prompt $" {
pass "stabs found"
}
-re ".*$gdb_prompt $" {
setup_xfail "mips-*-*"
setup_xfail "alpha-*-*"
fail "stabs not found"
return
}
default { fail "checking for stabs" }
}
print_weird_var var0
print_weird_var var1
print_weird_var var2
print_weird_var var3
print_weird_var attr32
print_weird_var attr33
print_weird_var attr35
print_weird_var attr36
print_weird_var attr37
print_weird_var attr38
print_weird_var attr39
print_weird_var attr41
print_weird_var attr42
print_weird_var attr43
print_weird_var attr44
print_weird_var attr46
print_weird_var attr47
print_weird_var attr58
print_weird_var attr59
print_weird_var attr60
print_weird_var attr61
print_weird_var attr62
print_weird_var attr63
print_weird_var attr64
print_weird_var attr65
print_weird_var attr66
print_weird_var attr67
print_weird_var attr68
print_weird_var attr69
print_weird_var attr70
print_weird_var attr71
print_weird_var attr72
print_weird_var attr73
print_weird_var attr74
print_weird_var attr75
print_weird_var attr76
print_weird_var attr77
print_weird_var attr78
print_weird_var attr79
print_weird_var attr80
print_weird_var attr81
print_weird_var attr82
print_weird_var attr83
print_weird_var attr84
print_weird_var attr85
print_weird_var attr86
print_weird_var attr87
print_weird_var attr88
print_weird_var attr89
print_weird_var attr90
print_weird_var attr91
print_weird_var attr92
print_weird_var attr93
print_weird_var attr94
print_weird_var attr95
print_weird_var attr96
print_weird_var attr97
print_weird_var attr98
print_weird_var attr99
print_weird_var attr100
print_weird_var attr101
print_weird_var attr102
print_weird_var attr103
print_weird_var attr104
print_weird_var attr105
print_weird_var attr106
print_weird_var attr107
print_weird_var attr108
print_weird_var attr109
print_weird_var attr110
print_weird_var attr111
print_weird_var attr112
print_weird_var attr113
print_weird_var attr114
print_weird_var attr115
print_weird_var attr116
print_weird_var attr117
print_weird_var attr118
print_weird_var attr119
print_weird_var attr120
print_weird_var attr121
print_weird_var attr122
print_weird_var attr123
print_weird_var attr124
print_weird_var attr125
print_weird_var attr126
gdb_test "p const69" " = 69" "'e' constant on non-enum type"
gdb_test "whatis const69" "type = (unsigned int|inttype)" "whatis const69"
gdb_test "p sizeof (const70)" " = 2" "'e' constant with embedded type"
gdb_test "p constchar" " = 97 'a'" "char constant"
gdb_test "p constString1" " = \"Single quote String1\"" "String constant 1"
gdb_test "p constString2" " = \"Double quote String2\"" "String constant 2"
gdb_test "p constString3" " = \"String3 with embedded quote ' in the middle\"" "String constant 3"
gdb_test "p constString4" { = "String4 with embedded quote \\" in the middle"} "String constant 4"
gdb_test "p bad_neg0" " = \{field0 = 42, field2 =.*field3 = 45\}" "p bad_neg0"
gdb_test "ptype inttype" "type = (unsigned int|inttype)" "ptype on inttype"
gdb_test "p sizeof (float72type)" " = 9" "unrecognized floating point type"
# This big number needs to be kept as one piece
gdb_test "p/x int256var" " = 0x0*2a0000002b0000002c0000002d0000002d0000002c0000002b0000002a" "print very big integer"
gdb_test "whatis consth" "type = inttype" "whatis consth"
gdb_test "whatis consth2" "type = inttype" "whatis consth2"
# GDB does not yet understand S constants
setup_xfail "*-*-*"
gdb_test "p/x bad_neg0const" " = \{field0 = 0x11222211, field2 =.*\
field3 = 0x77888877\}" "print struct constant"
gdb_test "ptype bad_type0" "type = .*" "print bad_type0"
gdb_test "ptype bad_type1" "type = .*" "print bad_type1"
# GDB does not yet support arrays indexed by anything at all unusual
setup_xfail "*-*-*"
gdb_test "p array0" " = \\{42, 43, 44, 45, 46, 47\\}" "array0 with strange index"
setup_xfail "*-*-*"
gdb_test "p array1" " = \\{42, 43, 44\\}" "array1 with strange index"
# GDB does not yet support this feature
gdb_test "whatis one_var" "type = inttype_one" \
"whatis one_var (known failure in gdb 4.10)"
# But do make sure that it prints as something reasonable
gdb_test "whatis one_var" "type = inttype(|_one)" \
"whatis one_var test 2"
gdb_test "whatis two_var" "type = inttype_two" \
"whatis two_var (known failure in gdb 4.10)"
# But do make sure that it prints as something reasonable
gdb_test "whatis two_var" "type = inttype(|_two)" \
"whatis two_var test 2"
setup_xfail "*-*-*"
gdb_test "whatis pointer_to_int_var" "type = int \[*\]"
setup_xfail "*-*-*"
gdb_test "whatis intp_var" "type = intp"
gdb_test "p common0var0" "= 42"
# GDB seems to only understand common blocks local to a function.
# These variables never get relocated to be relative to the common
# block.
# I'm not sure whether it is valid to have a common block which
# is not local to a function.
setup_xfail "*-*-*"
gdb_test "p common0var1" "= 24"
setup_xfail "*-*-*"
gdb_test "p common0var2" "= 22"
}
proc print_weird_var { var } {
global gdb_prompt
# Make sure that the variable gets printed out correctly, without
# any sort of warning message.
gdb_test_multiple "print $var" "variable $var printed property" {
-re "^print $var\r*\n.\[0-9\]* = 42.*$gdb_prompt $" {
pass "variable $var printed properly"
}
-re ".*$gdb_prompt $" {
2001-10-26 06:17:45 +02:00
fail "variable $var printed properly"
}
}
# Make sure that the stabs did get loaded in a sensible way.
# If somehow the stabs got skipped, then the above test can
# pass because GDB assumes int for variables without a stab.
# This doesn't work because 32=45 doesn't preserve the name in
# gdb (as of 14 Sep 93 anyway).
#gdb_test "whatis $var" "type = (unsigned int|inttype)"
# But the size should be right.
gdb_test "print sizeof ($var)" "= 4"
}
# Don't use gdb_load; it doesn't bitch if the loading produced some
# error messages during symbol reading.
global target_os
set sedscript ${srcdir}/${subdir}/aout.sed
set sedoptions ""
switch -glob ${target_triplet} {
"hppa*-*-*" {
set sedscript ${srcdir}/${subdir}/hppa.sed
}
"mips-*-ecoff" {
set sedscript ${srcdir}/${subdir}/ecoff.sed
}
"powerpc-*-aix*" {
set sedscript ${srcdir}/${subdir}/xcoff.sed
set sedoptions "-r"
}
"rs6000-*-aix*" {
set sedscript ${srcdir}/${subdir}/xcoff.sed
set sedoptions "-r"
}
"*-*-aout" {
set sedscript ${srcdir}/${subdir}/aout.sed
}
"*-*-xcoff" {
set sedscript ${srcdir}/${subdir}/xcoff.sed
set sedoptions "-r"
}
"alpha-*-*" {
set sedscript ${srcdir}/${subdir}/ecoff.sed
}
}
# Hope this is a Unix box.
set exec_output [remote_exec build "sed" "${sedoptions} -f ${sedscript}" "${srcdir}/${subdir}/weird.def" "${srcfile}"]
if { [lindex $exec_output 0] != 0 } {
perror "Couldn't make test case. $exec_output"
return -1
}
if { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } {
* gdb.arch/altivec-abi.exp: Replace gdb_suppress_entire_file with untested followed by return combination. * gdb.arch/altivec-regs.exp: Likewise. * gdb.arch/e500-abi.exp: Likewise. * gdb.arch/e500-regs.exp: Likewise. * gdb.arch/gdb1291.exp: Likewise. * gdb.arch/gdb1431.exp: Likewise. * gdb.arch/gdb1558.exp: Likewise. * gdb.arch/i386-prologue.exp: Likewise. * gdb.arch/i386-unwind.exp: Likewise. * gdb.asm/asm-source.exp: Likewise. * gdb.base/a2-run.exp: Likewise. * gdb.base/advance.exp: Likewise. * gdb.base/all-bin.exp: Likewise. * gdb.base/annota1.exp: Likewise. * gdb.base/annota3.exp: Likewise. * gdb.base/args.exp: Likewise. * gdb.base/arithmet.exp: Likewise. * gdb.base/assign.exp: Likewise. * gdb.base/async.exp: Likewise. * gdb.base/attach.exp: Likewise. * gdb.base/bang.exp: Likewise. * gdb.base/bigcore.exp: Likewise. * gdb.base/bitfields.exp: Likewise. * gdb.base/bitfields2.exp: Likewise. * gdb.base/break.exp: Likewise. * gdb.base/call-sc.exp: Likewise. * gdb.base/call-strs.exp: Likewise. * gdb.base/callfuncs.exp: Likewise. * gdb.base/checkpoint.exp: Likewise. * gdb.base/chng-syms.exp: Likewise. * gdb.base/code-expr.exp: Likewise. * gdb.base/commands.exp: Likewise. * gdb.base/completion.exp: Likewise. * gdb.base/cond-expr.exp: Likewise. * gdb.base/condbreak.exp: Likewise. * gdb.base/consecutive.exp: Likewise. * gdb.base/constvars.exp: Likewise. * gdb.base/corefile.exp: Likewise. * gdb.base/cvexpr.exp: Likewise. * gdb.base/dbx.exp: Likewise. * gdb.base/define.exp: Likewise. * gdb.base/detach.exp: Likewise. * gdb.base/display.exp: Likewise. * gdb.base/dump.exp: Likewise. * gdb.base/ena-dis-br.exp: Likewise. * gdb.base/ending-run.exp: Likewise. * gdb.base/environ.exp: Likewise. * gdb.base/eval-skip.exp: Likewise. * gdb.base/exprs.exp: Likewise. * gdb.base/fileio.exp: Likewise. * gdb.base/finish.exp: Likewise. * gdb.base/float.exp: Likewise. * gdb.base/foll-exec.exp: Likewise. * gdb.base/foll-fork.exp: Likewise. * gdb.base/foll-vfork.exp: Likewise. * gdb.base/freebpcmd.exp: Likewise. * gdb.base/funcargs.exp: Likewise. * gdb.base/gcore.exp: Likewise. * gdb.base/gdb1090.exp: Likewise. * gdb.base/gdb1250.exp: Likewise. * gdb.base/huge.exp: Likewise. * gdb.base/info-proc.exp: Likewise. * gdb.base/interrupt.exp: Likewise. * gdb.base/jump.exp: Likewise. * gdb.base/langs.exp: Likewise. * gdb.base/lineinc.exp: Likewise. * gdb.base/list.exp: Likewise. * gdb.base/logical.exp: Likewise. * gdb.base/long_long.exp: Likewise. * gdb.base/macscp.exp: Likewise. * gdb.base/maint.exp: Likewise. * gdb.base/mips_pro.exp: Likewise. * gdb.base/miscexprs.exp: Likewise. * gdb.base/multi-forks.exp: Likewise. * gdb.base/opaque.exp: Likewise. * gdb.base/overlays.exp: Likewise. * gdb.base/pc-fp.exp: Likewise. * gdb.base/pointers.exp: Likewise. * gdb.base/printcmds.exp: Likewise. * gdb.base/psymtab.exp: Likewise. * gdb.base/ptype.exp: Likewise. * gdb.base/recurse.exp: Likewise. * gdb.base/relational.exp: Likewise. * gdb.base/relocate.exp: Likewise. * gdb.base/remote.exp: Likewise. * gdb.base/reread.exp: Likewise. * gdb.base/restore.exp: Likewise. * gdb.base/return.exp: Likewise. * gdb.base/return2.exp: Likewise. * gdb.base/scope.exp: Likewise. * gdb.base/sect-cmd.exp: Likewise. * gdb.base/sep.exp: Likewise. * gdb.base/sepdebug.exp: Likewise. * gdb.base/setshow.exp: Likewise. * gdb.base/setvar.exp: Likewise. * gdb.base/sigall.exp: Likewise. * gdb.base/sigbpt.exp: Likewise. * gdb.base/signals.exp: Likewise. * gdb.base/signull.exp: Likewise. * gdb.base/sizeof.exp: Likewise. * gdb.base/solib.exp: Likewise. * gdb.base/step-line.exp: Likewise. * gdb.base/step-test.exp: Likewise. * gdb.base/structs.exp: Likewise. * gdb.base/structs2.exp: Likewise. * gdb.base/term.exp: Likewise. * gdb.base/twice.exp: Likewise. * gdb.base/until.exp: Likewise. * gdb.base/varargs.exp: Likewise. * gdb.base/volatile.exp: Likewise. * gdb.base/watchpoint.exp: Likewise. * gdb.base/whatis-exp.exp: Likewise. * gdb.base/whatis.exp: Likewise. * gdb.cp/ambiguous.exp: Likewise. * gdb.cp/annota2.exp: Likewise. * gdb.cp/annota3.exp: Likewise. * gdb.cp/bool.exp: Likewise. * gdb.cp/breakpoint.exp: Likewise. * gdb.cp/casts.exp: Likewise. * gdb.cp/class2.exp: Likewise. * gdb.cp/classes.exp: Likewise. * gdb.cp/cplusfuncs.exp: Likewise. * gdb.cp/ctti.exp: Likewise. * gdb.cp/derivation.exp: Likewise. * gdb.cp/exception.exp: Likewise. * gdb.cp/gdb1355.exp: Likewise. * gdb.cp/hang.exp: Likewise. * gdb.cp/inherit.exp: Likewise. * gdb.cp/local.exp: Likewise. * gdb.cp/m-data.exp: Likewise. * gdb.cp/m-static.exp: Likewise. * gdb.cp/member-ptr.exp: Likewise. * gdb.cp/method.exp: Likewise. * gdb.cp/misc.exp: Likewise. * gdb.cp/namespace.exp: Likewise. * gdb.cp/overload.exp: Likewise. * gdb.cp/ovldbreak.exp: Likewise. * gdb.cp/pr-1023.exp: Likewise. * gdb.cp/pr-1210.exp: Likewise. * gdb.cp/pr-574.exp: Likewise. * gdb.cp/printmethod.exp: Likewise. * gdb.cp/psmang.exp: Likewise. * gdb.cp/ref-params.exp: Likewise. * gdb.cp/ref-types.exp: Likewise. * gdb.cp/rtti.exp: Likewise. * gdb.cp/templates.exp: Likewise. * gdb.cp/try_catch.exp: Likewise. * gdb.cp/userdef.exp: Likewise. * gdb.cp/virtfunc.exp: Likewise. * gdb.disasm/am33.exp: Likewise. * gdb.disasm/h8300s.exp: Likewise. * gdb.disasm/mn10300.exp: Likewise. * gdb.disasm/sh3.exp: Likewise. * gdb.disasm/t01_mov.exp: Likewise. * gdb.disasm/t02_mova.exp: Likewise. * gdb.disasm/t03_add.exp: Likewise. * gdb.disasm/t04_sub.exp: Likewise. * gdb.disasm/t05_cmp.exp: Likewise. * gdb.disasm/t06_ari2.exp: Likewise. * gdb.disasm/t07_ari3.exp: Likewise. * gdb.disasm/t08_or.exp: Likewise. * gdb.disasm/t09_xor.exp: Likewise. * gdb.disasm/t10_and.exp: Likewise. * gdb.disasm/t11_logs.exp: Likewise. * gdb.disasm/t12_bit.exp: Likewise. * gdb.disasm/t13_otr.exp: Likewise. * gdb.hp/gdb.aCC/optimize.exp: Likewise. * gdb.hp/gdb.aCC/watch-cmd.exp: Likewise. * gdb.hp/gdb.base-hp/callfwmall.exp: Likewise. * gdb.hp/gdb.base-hp/dollar.exp: Likewise. * gdb.hp/gdb.base-hp/hwwatchbus.exp: Likewise. * gdb.hp/gdb.base-hp/pxdb.exp: Likewise. * gdb.hp/gdb.base-hp/reg-pa64.exp: Likewise. * gdb.hp/gdb.base-hp/reg.exp: Likewise. * gdb.hp/gdb.base-hp/sized-enum.exp: Likewise. * gdb.hp/gdb.compat/xdb1.exp: Likewise. * gdb.hp/gdb.compat/xdb3.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg01.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg02.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg03.exp: Likewise. * gdb.hp/gdb.objdbg/objdbg04.exp: Likewise. * gdb.mi/gdb701.exp: Likewise. * gdb.mi/gdb792.exp: Likewise. * gdb.mi/mi-basics.exp: Likewise. * gdb.mi/mi-break.exp: Likewise. * gdb.mi/mi-cli.exp: Likewise. * gdb.mi/mi-console.exp: Likewise. * gdb.mi/mi-disassemble.exp: Likewise. * gdb.mi/mi-eval.exp: Likewise. * gdb.mi/mi-file.exp: Likewise. * gdb.mi/mi-read-memory.exp: Likewise. * gdb.mi/mi-regs.exp: Likewise. * gdb.mi/mi-return.exp: Likewise. * gdb.mi/mi-simplerun.exp: Likewise. * gdb.mi/mi-stack.exp: Likewise. * gdb.mi/mi-stepi.exp: Likewise. * gdb.mi/mi-syn-frame.exp: Likewise. * gdb.mi/mi-until.exp: Likewise. * gdb.mi/mi-var-block.exp: Likewise. * gdb.mi/mi-var-child.exp: Likewise. * gdb.mi/mi-var-cmd.exp: Likewise. * gdb.mi/mi-var-display.exp: Likewise. * gdb.mi/mi-watch.exp: Likewise. * gdb.mi/mi2-basics.exp: Likewise. * gdb.mi/mi2-break.exp: Likewise. * gdb.mi/mi2-cli.exp: Likewise. * gdb.mi/mi2-console.exp: Likewise. * gdb.mi/mi2-disassemble.exp: Likewise. * gdb.mi/mi2-eval.exp: Likewise. * gdb.mi/mi2-file.exp: Likewise. * gdb.mi/mi2-read-memory.exp: Likewise. * gdb.mi/mi2-regs.exp: Likewise. * gdb.mi/mi2-return.exp: Likewise. * gdb.mi/mi2-simplerun.exp: Likewise. * gdb.mi/mi2-stack.exp: Likewise. * gdb.mi/mi2-stepi.exp: Likewise. * gdb.mi/mi2-syn-frame.exp: Likewise. * gdb.mi/mi2-until.exp: Likewise. * gdb.mi/mi2-var-block.exp: Likewise. * gdb.mi/mi2-var-child.exp: Likewise. * gdb.mi/mi2-var-cmd.exp: Likewise. * gdb.mi/mi2-var-display.exp: Likewise. * gdb.mi/mi2-watch.exp: Likewise. * gdb.stabs/exclfwd.exp: Likewise. * gdb.stabs/weird.exp: Likewise. * gdb.threads/gcore-thread.exp: Likewise. * gdb.trace/actions.exp: Likewise. * gdb.trace/backtrace.exp: Likewise. * gdb.trace/circ.exp: Likewise. * gdb.trace/collection.exp: Likewise. * gdb.trace/deltrace.exp: Likewise. * gdb.trace/infotrace.exp: Likewise. * gdb.trace/limits.exp: Likewise. * gdb.trace/packetlen.exp: Likewise. * gdb.trace/passc-dyn.exp: Likewise. * gdb.trace/passcount.exp: Likewise. * gdb.trace/report.exp: Likewise. * gdb.trace/save-trace.exp: Likewise. * gdb.trace/tfind.exp: Likewise. * gdb.trace/tracecmd.exp: Likewise. * gdb.trace/while-dyn.exp: Likewise. * gdb.trace/while-stepping.exp: Likewise.
2006-08-10 07:27:22 +02:00
untested weird.exp
return -1
}
remote_file build delete ${srcfile}
# Start with a fresh gdb
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
set binfile [remote_download host ${binfile} object.o]
send_gdb "file $binfile\n"
# If $binfile is very long, a \r (but not a \n) will echo in the
# middle of the echo of the command. So to match the echo, we
# would like to match anything not containing \n
# (we would prefer to be sure not to match any warning message).
# But \[^\n\]* doesn't seem to work, so instead use the heuristic
# that a filename won't contain a space and a warning message will.
# But spaces following by backspaces aren't really spaces.
gdb_expect 60 {
-re "^file (\[^ \]| +\008)*\r*\n" {
exp_continue
}
-re "A program is being debugged already.\[\r\n\]+Are you sure you want to change the file\\? \\(y or n\\)" {
send_gdb "y\n"
exp_continue
}
-re "^Reading symbols from .*$binfile\\.\\.\\.done\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)\r\n$gdb_prompt $" {
pass "weirdx.o read without error"
}
-re ".*$gdb_prompt $" {
fail "Errors reading weirdx.o"
}
timeout {
perror "couldn't load $binfile into $GDB (timed out)."
return -1
}
eof { fail "(eof) cannot read weirdx.o" }
}
do_tests
remote_file host delete ${binfile}
return 0