aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-function.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-07-17 22:06:38 +0200
committerTom de Vries <tdevries@suse.de>2025-07-17 22:06:38 +0200
commitc637feb9e17645f16ec3c6c06a494aa843bf6d6f (patch)
tree6a165a254fe40e8b64d7993f42ed733490119757 /gdb/python/py-function.c
parent802963162e97e7fb5a8491503821d8b8b38f933f (diff)
downloadbinutils-c637feb9e17645f16ec3c6c06a494aa843bf6d6f.zip
binutils-c637feb9e17645f16ec3c6c06a494aa843bf6d6f.tar.gz
binutils-c637feb9e17645f16ec3c6c06a494aa843bf6d6f.tar.bz2
[gdb/testsuite] Fix regexp in gdb.base/style.exp
In test-case gdb.base/style.exp, we have proc test_pagination_prompt_styling, which: - determines a "desired width" by parsing the output of "info files", - sets width to the "desired width", and - runs "info files" again. The "desired width" on my system is 88, but if I override it to 66, I run into: ... FAIL: gdb.base/style.exp: check pagination prompt styling ... due to the test classifying this line as a bad line: ... $hex - $hex is .init_array in --Type <RET> for more, ... ... This is due to a bug in this regexp: ... # For lines that don't match this pattern, we cannot comment on # where the style reset should occur, so lets just claim the line # is fine. if { ![regexp "\\s+$::hex - $::hex is \[^\r\n\]+ in " $str] } { return true } ... which is supposed to determine whether the line needs to contain a style reset. For aforementioned line, the regexp matches, so the test concludes that the line should have a style reset, and because it hasn't, it classifies it as a bad line. Fix this by making the regexp more strict: ... if { ![regexp "\\s+$::hex - $::hex is \[^\r\n\]+ in \033" $str] } { ... Tested on x86_64-linux. Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/python/py-function.c')
0 files changed, 0 insertions, 0 deletions