aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/sysroot-debug-lookup.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/sysroot-debug-lookup.exp')
-rw-r--r--gdb/testsuite/gdb.base/sysroot-debug-lookup.exp28
1 files changed, 5 insertions, 23 deletions
diff --git a/gdb/testsuite/gdb.base/sysroot-debug-lookup.exp b/gdb/testsuite/gdb.base/sysroot-debug-lookup.exp
index 5f17315..80cad95 100644
--- a/gdb/testsuite/gdb.base/sysroot-debug-lookup.exp
+++ b/gdb/testsuite/gdb.base/sysroot-debug-lookup.exp
@@ -78,9 +78,8 @@ proc_with_prefix lookup_via_build_id {} {
gdb_assert { $::gdb_file_cmd_debug_info eq "debug" } \
"ensure debug information was found"
- if { $sysroot_prefix eq "" } {
- set lookup_filename $debug_filename
- } else {
+ if { $sysroot_prefix eq "target:"
+ && [target_info gdb_protocol] == "extended-remote"} {
# Only when using the extended-remote board will we have
# started a remote target by this point. In this case GDB
# will see the 'target:' prefix as remote, and so the
@@ -89,11 +88,9 @@ proc_with_prefix lookup_via_build_id {} {
# In all other cases we will still be using the default,
# initial target, in which case GDB considers the
# 'target:' prefix to indicate the local filesystem.
- if {[target_info gdb_protocol] == "extended-remote"} {
- set lookup_filename $sysroot_prefix$debug_symlink
- } else {
- set lookup_filename $debug_symlink
- }
+ set lookup_filename $sysroot_prefix$debug_symlink
+ } else {
+ set lookup_filename $debug_filename
}
set re [string_to_regexp "Reading symbols from $lookup_filename..."]
gdb_assert {[regexp $re $::gdb_file_cmd_msg]} \
@@ -174,24 +171,9 @@ proc_with_prefix lookup_via_debuglink {} {
# in the sysroot.
gdb_file_cmd ${sysroot_prefix}$exec_in_sysroot
- # Giving a sysroot a 'target:' prefix doesn't seem to work as
- # might be expected for debug-link based lookups. For this
- # style of lookup GDB only seems to care if the original file
- # itself had a 'target:' prefix. The 'target:' prefix on the
- # sysroot just seems to cause GDB to bail on looking up via
- # the 'target:' prefixed sysroot.
- #
- # Bug PR gdb/30866 seems to be the (or a) relevant bug for
- # this problem.
- if { $sysroot_prefix ne "" } {
- setup_kfail "*-*-*" 31804
- }
gdb_assert { $::gdb_file_cmd_debug_info eq "debug" } \
"ensure debug information was found"
- if { $sysroot_prefix ne "" } {
- setup_kfail "*-*-*" 31804
- }
set re [string_to_regexp "Reading symbols from ${sysroot_prefix}$debug_symlink..."]
gdb_assert {[regexp $re $::gdb_file_cmd_msg]} \
"debug symbols read from correct file"