* lib/gdb.exp (runto): Fix call to gdb_breakpoint.
authorDoug Evans <dje@google.com>
Mon, 15 Oct 2012 17:35:54 +0000 (17:35 +0000)
committerDoug Evans <dje@google.com>
Mon, 15 Oct 2012 17:35:54 +0000 (17:35 +0000)
gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp

index d3f55441906c54715608cffeed5c0541b783c6a7..ceefea58b63951a4ba2a8f7dd6e761a346395fe2 100644 (file)
@@ -1,3 +1,7 @@
+2012-10-15  Doug Evans  <dje@google.com>
+
+       * lib/gdb.exp (runto): Fix call to gdb_breakpoint.
+
 2012-10-15  Yufeng Zhang  <yufeng.zhang@arm.com>
 
        * gdb.dwarf2/dw2-icc-opaque.S: Remove '#'.
index 33529ccb442cc4f88870ab362c925cf796ed71ce..f27d4a7d86b0f38f5f7cc0267f721383c7fa24cd 100644 (file)
@@ -460,7 +460,10 @@ proc runto { function args } {
 
     # We need to use eval here to pass our varargs args to gdb_breakpoint
     # which is also a varargs function.
-    if ![eval gdb_breakpoint $function $args] {
+    # But we also have to be careful because $function may have multiple
+    # elements, and we don't want Tcl to move the remaining elements after
+    # the first to $args.  That is why $function is wrapped in {}.
+    if ![eval gdb_breakpoint {$function} $args] {
        return 0;
     }
 
This page took 0.040912 seconds and 4 git commands to generate.