aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/dbx.exp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-08-16 19:57:19 +0000
committerJason Molenda <jmolenda@apple.com>1999-08-16 19:57:19 +0000
commit7be570e7ce77920e2e628a03bdfe2d295fc2568f (patch)
treea49512270bb021f1d5171b362dc973e28c97ca94 /gdb/testsuite/gdb.base/dbx.exp
parented288bb597072176e84fc8279707a3f2f475779b (diff)
downloadgdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.zip
gdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.tar.gz
gdb-7be570e7ce77920e2e628a03bdfe2d295fc2568f.tar.bz2
import gdb-1999-08-16 snapshot
Diffstat (limited to 'gdb/testsuite/gdb.base/dbx.exp')
-rw-r--r--gdb/testsuite/gdb.base/dbx.exp49
1 files changed, 34 insertions, 15 deletions
diff --git a/gdb/testsuite/gdb.base/dbx.exp b/gdb/testsuite/gdb.base/dbx.exp
index 05f3fe4..092b31a 100644
--- a/gdb/testsuite/gdb.base/dbx.exp
+++ b/gdb/testsuite/gdb.base/dbx.exp
@@ -160,7 +160,15 @@ proc dbx_reinitialize_dir { subdir } {
# of this command returns, causing the test to get out of sync and fail
# seemingly randomly or only on a loaded system.
#
-proc dbx_gdb_file_cmd {arg } {
+# Problem is, though, that the testsuite config files can override the definition of
+# gdb_load (without notice, as was mentioned above). Unfortunately, the gdb_load proc
+# that was copied into this test was a copy of the unix native version.
+#
+# The real problem that we're attempting to solve is how to load an exec and symbol
+# file into gdb for a dbx session. So why not just override gdb_file_cmd with the
+# right sequence of events, allowing gdb_load to do its normal thing? This way
+# remotes and simulators will work, too.
+proc gdb_file_cmd {arg} {
global verbose
global loadpath
global loadfile
@@ -169,6 +177,14 @@ proc dbx_gdb_file_cmd {arg } {
global spawn_id
upvar timeout timeout
+ if [is_remote host] {
+ set arg [remote_download host $arg];
+ if { $arg == "" } {
+ error "download failed"
+ return -1;
+ }
+ }
+
send_gdb "symbol-file $arg\n"
gdb_expect {
-re "Detected 64-bit symbol file.\r\nInvoking.*gdb64.*$gdb_prompt $" {
@@ -245,17 +261,6 @@ proc dbx_gdb_file_cmd {arg } {
}
}
-proc dbx_gdb_load { arg } {
- global verbose
- global loadpath
- global loadfile
- global GDB
- global prompt
- upvar timeout timeout
-
- return [dbx_gdb_file_cmd $arg]
-}
-
#
#test_breakpoints
#
@@ -271,8 +276,22 @@ proc test_breakpoints { } {
#test_assign
#
proc test_assign { } {
- gdb_test "run" ""
- gdb_test "assign first=1" ""
+ global decimal
+ global gdb_prompt
+
+ gdb_run_cmd
+ gdb_expect 30 {
+ -re "Break.* at .*:$decimal.*$gdb_prompt $" { pass "running to main" }
+ -re "Breakpoint \[0-9\]*, \[0-9xa-f\]* in .*$gdb_prompt $" { pass "running to main" }
+ -re "$gdb_prompt $" { fail "running to main" }
+ timeout { fail "running to main (timeout)" }
+ }
+ send_gdb "assign first=1\n"
+ gdb_expect {
+ -re "No symbol \"first\" in current context.*$" { fail "assign first" }
+ "$gdb_prompt $" { pass "assign first" }
+ timeout { fail "assign first (timeout)" }
+ }
gdb_test "print first" ".1 = 1"
}
@@ -304,7 +323,7 @@ set saved_gdbflags $GDBFLAGS
set GDBFLAGS "$GDBFLAGS --dbx"
gdb_start
dbx_reinitialize_dir $srcdir/$subdir
-dbx_gdb_load ${binfile}
+gdb_load ${binfile}
test_breakpoints
test_assign