diff options
author | Tom de Vries <tdevries@suse.de> | 2020-10-26 16:05:15 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-10-26 16:05:15 +0100 |
commit | 55c3ad8801359ecb166ff3c04c3bd14140f623a1 (patch) | |
tree | a6b98540e067618712389489ca256ced78ad7649 | |
parent | ae9d2233e61a98ff8dba56be10219aa5306ffc9a (diff) | |
download | gdb-55c3ad8801359ecb166ff3c04c3bd14140f623a1.zip gdb-55c3ad8801359ecb166ff3c04c3bd14140f623a1.tar.gz gdb-55c3ad8801359ecb166ff3c04c3bd14140f623a1.tar.bz2 |
[gdb/testsuite] Prevent pagination in GDB_INTERNALFLAGS
When running test-case gdb.base/corefile.exp with target board readnow, we run
into:
...
Reading symbols from outputs/gdb.base/corefile/corefile...^M
Expanding full symbols from outputs/gdb.base/corefile/corefile...^M
[New LWP 2293]^M
Core was generated by `outputs/gdb.base/corefile/co'.^M
Program terminated with signal SIGABRT, Aborted.^M
--Type <RET> for more, q to quit, c to continue without paging--\
FAIL: gdb.base/corefile.exp: (timeout) starting with -core
...
In commit bd447abb24 "Make gdb.base/corefile.exp work on terminals with few
rows", pagination (in the same test-case) is prevented using:
...
set stty_init "rows 25 cols 80"
...
but this doesn't work in our case because using -readnow adds an extra line
"Expanding full symbols".
The test passes when increasing rows to 26. However, increasing the rows by
some n only fixes the problem for n lines, and things will break again if
somehow we end up with n + 1 lines.
Instead, fix this by setting heigth and width in INTERNAL_GDBFLAGS. This
solution was not chosen in commit bd447abb24 because it doesn't handle
pagination due to the introduction text. But it does handle the pagination
due to the extra "Expanding full symbols", and any other line printed during
and after file loading.
Tested on x86_64-linux, with and without readnow.
With -readnow, fixes timeout FAILs in gdb.base/corefile.exp and
gdb.base/reread-readsym.exp.
gdb/testsuite/ChangeLog:
2020-10-26 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (INTERNAL_GDBFLAGS): Set heigth and width.
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 60bbd8a..11b0f5b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2020-10-26 Tom de Vries <tdevries@suse.de> + * lib/gdb.exp (INTERNAL_GDBFLAGS): Set heigth and width. + +2020-10-26 Tom de Vries <tdevries@suse.de> + * gdb.dwarf2/dw2-objfile-overlap-inner.S: Specify default base address for CU. * gdb.dwarf2/dw2-objfile-overlap-outer.S: Same. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index f53df59..197542e 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -124,7 +124,13 @@ set BUILD_DATA_DIRECTORY "[pwd]/../data-directory" # INTERNAL_GDBFLAGS contains flags that the testsuite requires. global INTERNAL_GDBFLAGS if ![info exists INTERNAL_GDBFLAGS] { - set INTERNAL_GDBFLAGS "-nw -nx -data-directory $BUILD_DATA_DIRECTORY" + set INTERNAL_GDBFLAGS \ + [join [list \ + "-nw" \ + "-nx" \ + "-data-directory $BUILD_DATA_DIRECTORY" \ + {-iex "set height 0"} \ + {-iex "set width 0"}]] } # The variable gdb_prompt is a regexp which matches the gdb prompt. |