Regexp valnum_re is defined in lib/gdb.exp.
Remove the superfluous definition of valnum_re in gdb.base/commands.exp.
While we're at it, redefine valnum_re using subst_vars to reduce escaping.
Approved-by: Kevin Buettner <kevinb@redhat.com>
"" \
"enter commands"
- global decimal
- set valnum_re "\\\$$decimal"
-
gdb_test \
{mycommand $foo} \
[multi_line \
# A regular expression that matches a value history number.
# E.g., $1, $2, etc.
-set valnum_re "\\\$$decimal"
+set valnum_re [subst_vars {\$$decimal}]
# A regular expression that matches a breakpoint hit with a breakpoint
# having several code locations.