-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# 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
verbose "Timeout is now $timeout seconds" 2
eval "spawn $GDB -nw $GDBFLAGS -core=$objdir/$subdir/corefile"
expect {
+ -re "Couldn't find .* registers in core file.*$gdb_prompt $" {
+ fail "args: -core=corefile (couldn't find regs)"
+ }
-re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
pass "args: -core=corefile"
}
send_gdb "core-file $objdir/$subdir/corefile\n"
gdb_expect {
+ -re ".* program is being debugged already.*y or n. $" {
+ # gdb_load may connect us to a gdbserver.
+ send_gdb "y\n"
+ exp_continue;
+ }
-re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
pass "core-file command"
}
gdb_test "print coremaker_bss" "\\\$$decimal = 10"
gdb_test "print coremaker_ro" "\\\$$decimal = 201"
-gdb_test "print func2::coremaker_local" "\\\$$decimal = {0, 1, 2, 3, 4}"
+gdb_test "print func2::coremaker_local" "\\\$$decimal = \\{0, 1, 2, 3, 4\\}"
# Somehow we better test the ability to read the registers out of the core
# file correctly. I don't think the other tests do this.
gdb_test "bt" "abort.*func2.*func1.*main.*" "backtrace in corefile.exp"
-gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\).*" "up in corefile.exp"
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp"
# Test ability to read mmap'd data
# test reinit_frame_cache
gdb_load ${binfile}
-# HP defect CLLbs17002
-setup_xfail "*-*-*"
+setup_xfail "*-*-*" CLLbs17002
gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\)" "up in corefile.exp (reinit)"
gdb_test "core" "No core file now."