aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python-prettyprint.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-05-02 22:21:36 +0200
committerTom de Vries <tdevries@suse.de>2025-05-02 22:21:36 +0200
commit189dd876f43710735389f7da780df68d1b4eb320 (patch)
treefda3c6b6c9887c54dda596530766244db6485199 /gdb/python/python-prettyprint.c
parent6ec31a457e953f4dbcdb7740d6dda676cdfb2a73 (diff)
downloadbinutils-189dd876f43710735389f7da780df68d1b4eb320.zip
binutils-189dd876f43710735389f7da780df68d1b4eb320.tar.gz
binutils-189dd876f43710735389f7da780df68d1b4eb320.tar.bz2
[gdb/testsuite] Simplify gdb.tui/tui-layout-asm.exp
On x86_64-cygwin, with test-case gdb.tui/tui-layout-asm.exp I run into: ... WARNING: The following failure is probably due to the TUI window width. See the comments in the test script for more details. FAIL: $exp: scroll to end of assembler (scroll failed) ... The problem is as follows. On the TUI screen, we have: 1 | 0x1004010ff <__gdb_set_unbuffered_output+95> nop | 2 | 0x100401100 <__cxa_atexit> jmp *0x6fc2(%rip) # 0x10040 | ... We send the down key, which should have the effect of scrolling up. So, we expect that the second line moves to the first line. That seems to be the case indeed: ... 1 | 0x100401100 <__cxa_atexit> jmp *0x6fc2(%rip) # 0x1004080c8 <__imp___cxa_ | ... but the line has changed somewhat, so the matching fails. We could increase the width of the screen, as suggested in the test-case, but I think that approach is fragile. Instead, fix this by relaxing the matching: just check that the line before scrolling is fully contained in the line after scrolling, or the other way around. Doing so gets us the next failure: ... FAIL: $exp: scroll to end of assembler (too much assembler) ... The test-case states: ... if { $down_count > 250 } { # Maybe we should accept this as a pass in case a target # really does have loads of assembler to scroll through. fail "$testname (too much assembler)" ... and I agree, so fix this by issuing a pass. This results in the test-case taking ~20 seconds, so reduce the maximum number of scrolls from 250 to 25, bringing that down to ~10 seconds. Tested on x86_64-cygwin and x86_64-linux. PR testsuite/32898 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32898
Diffstat (limited to 'gdb/python/python-prettyprint.c')
0 files changed, 0 insertions, 0 deletions