[PATCH] Fix for gdb.tui/tui-layout-asm.exp

Carl Love cel@us.ibm.com
Wed Jul 21 17:30:55 GMT 2021


GDB maintainers:

The following patch fixes an issue seen on PPC64.  The issue is the
width of the columns of data in the terminal window changes based on
the amount of text in each column.  As the test scrolls thru the
window, the column widths change causing the check to see if the scroll
down one line works.  This patch makes the window a little wider so now
the column widths remain constant for the test.

This patch was tested on Power 9 and Intel without any regression
errors.

Please let me know if it is acceptable.

                            Carl Love
---------------------------------------------------------------

Fix for gdb.tui/tui-layout-asm.exp

The width of the window is too narrow to display the entire assembly line.
The width of the columns in the window changes as the test walks thru the
terminal window output.  The column change results in the first and second
reads of the same line to differ.  Increasing the width of the window keeps
the column width consistent thru the test.

gdb/testsuite/ChangeLog
2021-07-20  Carl Love  <cel@us.ibm.com>
---
 gdb/testsuite/gdb.tui/tui-layout-asm.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.tui/tui-layout-asm.exp b/gdb/testsuite/gdb.tui/tui-layout-asm.exp
index 19ce333ca9e..75e0d6b3a07 100644
--- a/gdb/testsuite/gdb.tui/tui-layout-asm.exp
+++ b/gdb/testsuite/gdb.tui/tui-layout-asm.exp
@@ -24,7 +24,7 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} {
     return -1
 }
 
-Term::clean_restart 24 80 $testfile
+Term::clean_restart 24 90 $testfile
 if {![Term::prepare_for_tui]} {
     unsupported "TUI not supported"
     return
@@ -32,7 +32,7 @@ if {![Term::prepare_for_tui]} {
 
 # This puts us into TUI mode, and should display the ASM window.
 Term::command_no_prompt_prefix "layout asm"
-Term::check_box_contents "check asm box contents" 0 0 80 15 "<main>"
+Term::check_box_contents "check asm box contents" 0 0 90 15 "<main>"
 
 # Scroll the ASM window down using the down arrow key.  In an ideal
 # world we'd like to use PageDown here, but currently our terminal
-- 
2.17.1




More information about the Gdb-patches mailing list