gdb_test_no_output "set breakpoint pending off"
+set host_binfile [gdb_remote_download host $binfile]
+
# First test that reading symbols fails.
-gdb_test "file $binfile" \
+gdb_test "file $host_binfile" \
{Reading symbols.*Dwarf Error: wrong version in compilation unit header \(is 153, should be 2, 3, 4 or 5\).*} \
"file $testfile"
# We can't use proc readnow, because the PR makes it return 0.
-gdb_test_multiple "maint print objfiles $binfile" "" {
+gdb_test_multiple "maint print objfiles $host_binfile" "" {
-re "^maint print objfiles \[^\r\n\]*\r\n$gdb_prompt $" {
setup_kfail "gdb/26797" *-*-*
}
return -1
}
+set host_binfile [gdb_remote_download host $binfile]
+
# Restart with no executable.
clean_restart
"Dwarf Error: unexpected tag 'DW_TAG_subprogram' at offset $hex"]
# Load the executable, we expect an error from the DWARF parser.
-gdb_test_multiple "file $binfile" "file $testfile" {
+gdb_test_multiple "file $host_binfile" "file $testfile" {
-wrap -re $pattern1 {
pass $gdb_test_name
}
clean_restart $executable_outer
-gdb_test "add-symbol-file $binfile_inner outer_inner" \
+set host_binfile_inner [gdb_remote_download host $binfile_inner]
+
+gdb_test "add-symbol-file $host_binfile_inner outer_inner" \
{Reading symbols from .*\.\.\.} "add-symbol-file" \
"\r\n\t\\.text_addr = 0x\[0-9a-f\]+\r\n\\(y or n\\) \$" "y"
clean_restart
-# From gdb_file_cmd:
-if [is_remote host] {
- set arg [remote_download host $binfile]
- if { $arg == "" } {
- perror "download failed"
- return -1
- }
-}
+set host_binfile [gdb_remote_download host $binfile]
gdb_test_no_output "set complaints 100"
set w1 0
set w2 0
-gdb_test_multiple "file $binfile" "file command" {
+gdb_test_multiple "file $host_binfile" "file command" {
-re "\r\nReading symbols from \[^\r\n\]*\\.\\.\\." {
exp_continue
}
# field names, all of which are stored in the .debug_str section.
gdb_test "p global_var" " = \\{aa = 0, bb = 0, cc = 0\\}"
+set host_binfile [gdb_remote_download host $binfile]
+
# Verify that the executable actually contains a .debug_str section, before
# trying to remove it. This can be missing with target boards
# cc-with-dwz-m.exp and cc-with-gnu-debuglink.exp. Handle this by
# skipping the remainder of the test-case.
-set debug_str_section "${binfile}-debug-str"
-set args "--dump-section .debug_str=${debug_str_section} $binfile"
+set debug_str_section "${host_binfile}-debug-str"
+set args "--dump-section .debug_str=${debug_str_section} $host_binfile"
set result [remote_exec host "[gdb_find_objcopy] $args"]
set status [lindex $result 0]
set output [lindex $result 1]
# creates an executable with an invalid DWARF configuration. GDB
# should give an error when trying to read the debug information from
# this executable.
-set binfile_no_debug_str "${binfile}-no-debug-str"
-set args "--remove-section .debug_str $binfile ${binfile_no_debug_str}"
+set binfile_no_debug_str "${host_binfile}-no-debug-str"
+set args "--remove-section .debug_str $host_binfile ${binfile_no_debug_str}"
if {[run_on_host "objcopy" [gdb_find_objcopy] "$args"]} {
perror "failed to run objcopy"
return -1
{debug ldflags=-Wl,--build-id}] == -1 } {
return
}
+set host_binfile [gdb_remote_download host $binfile]
set has_index_section [exec_has_index_section $binfile]
set uses_readnow [expr [string first "-readnow" $GDBFLAGS] != -1]
gdb_test_no_output "set index-cache directory $cache_dir" \
"set index-cache directory"
gdb_test_no_output "set index-cache enabled on"
- gdb_test "file $binfile" "Reading symbols from .*" "file"
+ gdb_test "file $host_binfile" "Reading symbols from .*" "file"
}
proc load_binary { method } {
global hex
if { $method == "standard" } {
- gdb_test "file $binfile" "Reading symbols from .*" "file"
+ gdb_test "file $::host_binfile" "Reading symbols from .*" "file"
} elseif { $method == "index" } {
gdb_test_no_output "set index-cache enabled on"
- gdb_test "file $binfile" "Reading symbols from .*" "file index"
+ gdb_test "file $::host_binfile" "Reading symbols from .*" "file index"
gdb_test_no_output "set index-cache enabled off"
} elseif { $method == "readnow" } {
- gdb_test "file -readnow $binfile" \
+ gdb_test "file -readnow $::host_binfile" \
"Reading symbols from .*Expanding full symbols from .*" \
"file readnow"
} else {