The gdb_assert proc under-quotes the expression that is passed in.
This leads to weird code in a couple of spots that tries to
compensate:
gdb_assert {{$all_regs eq $completed_regs}} ...
The fix is to add a bit of quoting when evaluating the expression.
lappend completed_regs $reg
}
set completed_regs [join [lsort $completed_regs]]
-gdb_assert {{$all_regs eq $completed_regs}} "complete 'info registers '"
+gdb_assert {$all_regs eq $completed_regs} "complete 'info registers '"
# Tests below are about tab-completion, which doesn't work if readline
# library isn't used. Check it first.
set after_addr [get_pc "get after PC"]
- gdb_assert {{[regexp "^${hex}$" $before_addr] \
- && [regexp "^${hex}$" $after_addr] \
- && $before_addr != $after_addr}} "advanced"
+ gdb_assert {[regexp "^${hex}$" $before_addr] \
+ && [regexp "^${hex}$" $after_addr] \
+ && $before_addr != $after_addr} "advanced"
}
foreach displaced { "off" "on" "auto" } {
set message $condition
}
- set code [catch {uplevel 1 expr $condition} res]
+ set code [catch {uplevel 1 [list expr $condition]} res]
if {$code == 1} {
# If code is 1 (TCL_ERROR), it means evaluation failed and res contains
# an error message. Print the error message, and set res to 0 since we