]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/lib/gdb.exp
[gdb/testsuite] Handle remote host in escape_for_host
[thirdparty/binutils-gdb.git] / gdb / testsuite / lib / gdb.exp
index b45c73fcc1aaac33409b723679f095a2eedd2d24..8b1127ce0bc2e29423bd09ea712797476aa422a0 100644 (file)
@@ -4656,8 +4656,14 @@ set gdb_saved_set_unbuffered_mode_obj ""
 # Escape STR sufficiently for use on host commandline.
 
 proc escape_for_host { str } {
-    set map {
-       {$} {\$}
+    if { [is_remote host] } {
+       set map {
+           {$} {\\$}
+       }
+    } else {
+       set map {
+           {$} {\$}
+       }
     }
 
     return [string map $map $str]