From: Doug Evans Date: Mon, 15 Oct 2012 17:35:54 +0000 (+0000) Subject: * lib/gdb.exp (runto): Fix call to gdb_breakpoint. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c47921e64abfc0aa3d3187e0c23943138ec3783;p=binutils-gdb.git * lib/gdb.exp (runto): Fix call to gdb_breakpoint. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d3f55441906..ceefea58b63 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-10-15 Doug Evans + + * lib/gdb.exp (runto): Fix call to gdb_breakpoint. + 2012-10-15 Yufeng Zhang * gdb.dwarf2/dw2-icc-opaque.S: Remove '#'. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 33529ccb442..f27d4a7d86b 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -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; }