]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Fix some incorrect uses of decimal
authorTom de Vries <tdevries@suse.de>
Tue, 17 Feb 2026 18:20:50 +0000 (19:20 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 17 Feb 2026 18:20:50 +0000 (19:20 +0100)
commit0cb5fde010aa64247bfc17daf86add3b253c6f3e
tree6a026c17b1124413b45665fc430171e6f34fdd15
parent1efd0b5ffe32098a8821bbd27b9cb6a98477130f
[gdb/testsuite] Fix some incorrect uses of decimal

Dejagnu defines $decimal as:
...
set decimal "\[0-9\]+"
...

If we add an equivalent definition in lib/gdb.exp:
...
set decimal "(?:\[0-9\]+)"
...
we run into this type of ERRORs:
...
couldn't compile regular expression pattern: parentheses () not balanced
...

This is due to using "\[$decimal\]" instead of "\\\[$decimal\\]" or
"[subst_var {\[$decimal\]}]".

Add such definitions of decimal and hex, and apply the same technique to
positive and octal.

Fix the errors mostly using subst_var.

Tested on x86_64-linux.
gdb/testsuite/gdb.base/catch-syscall.exp
gdb/testsuite/gdb.base/dcache-flush.exp
gdb/testsuite/gdb.base/detach-in-breakpoint-commands.exp
gdb/testsuite/gdb.base/exit-in-condition.exp
gdb/testsuite/gdb.base/multi-forks.exp
gdb/testsuite/gdb.base/solib-breakpoints-rerun.exp
gdb/testsuite/gdb.reverse/sigall-reverse.exp
gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
gdb/testsuite/gdb.threads/wp-replication.exp
gdb/testsuite/lib/gdb.exp