aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.dap/sources.exp6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.dap/sources.exp b/gdb/testsuite/gdb.dap/sources.exp
index b606811..f601190 100644
--- a/gdb/testsuite/gdb.dap/sources.exp
+++ b/gdb/testsuite/gdb.dap/sources.exp
@@ -49,8 +49,10 @@ if {$path == ""} {
set obj [dap_check_request_and_response "get source" source \
[format {o source [o path [s %s]] \
sourceReference [i 0]} $path]]
- set text [dict get [lindex $obj 0] body content]
- gdb_assert {[string first "Distinguishing comment" $text] != -1}
+ if { $obj != "" } {
+ set text [dict get [lindex $obj 0] body content]
+ gdb_assert {[string first "Distinguishing comment" $text] != -1}
+ }
}