aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-objfile.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-07-29 11:24:04 +0200
committerTom de Vries <tdevries@suse.de>2019-07-29 11:24:04 +0200
commit9197cd8b52aa41a04b883d83df863ecb5afc5d35 (patch)
tree320f2161140dea88c8d810f16d84b98d3d98bf46 /gdb/python/py-objfile.c
parentb528dae0954436ab103fb8ab6fc1ca632b4a7c51 (diff)
downloadbinutils-9197cd8b52aa41a04b883d83df863ecb5afc5d35.zip
binutils-9197cd8b52aa41a04b883d83df863ecb5afc5d35.tar.gz
binutils-9197cd8b52aa41a04b883d83df863ecb5afc5d35.tar.bz2
[gdb/testsuite] Fix gdb.base/maint.exp with check-read1
With gdb.base/maint.exp and check-read1, we get: ... FAIL: gdb.base/maint.exp: maint print registers ... Using this patch: ... diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index a7675ea215..b81d7ec660 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -81,7 +81,9 @@ gdb_test_multiple $test $test { exp_continue } -re "$gdb_prompt $" { - gdb_assert { $saw_registers && $saw_headers } $test + gdb_assert { $saw_headers } "$test: saw headers" + gdb_assert { $saw_registers } "$test: saw registers" + pass "$test: got prompt" } } ... We get more information: ... PASS: gdb.base/maint.exp: maint print registers: saw headers FAIL: gdb.base/maint.exp: maint print registers: saw registers PASS: gdb.base/maint.exp: maint print registers: got prompt ... The problem is that when matching: ... (gdb) maint print registers^M Name Nr Rel Offset Size Type ^M rax 0 0 0 8 int64_t ^M ... the regexp for $saw_headers ends in "\[\r\n\]+", which allows it to match only the "\r". The remaining "\n" then start the next line to be matched, which doesn't match for the $saw_registers regexp since it starts with "^\[^\r\n\]+". Fix this by ending the regexps with "\r\n". Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-07-29 Tom de Vries <tdevries@suse.de> * gdb.base/maint.exp: Use "\r\n" instead of "\[\r\n\]+" in "maint print registers" regexps.
Diffstat (limited to 'gdb/python/py-objfile.c')
0 files changed, 0 insertions, 0 deletions