[gdb/testsuite] Fix gdb.mi/mi-info-sources.exp for extra debug info
authorTom de Vries <tdevries@suse.de>
Mon, 12 Jul 2021 12:46:54 +0000 (14:46 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 12 Jul 2021 12:46:54 +0000 (14:46 +0200)
commit29119da49d29edd87744d7462c0a1fdb04edeb02
tree7681ee601c3d74203db6b38c581b6884eca3fbb0
parent7ad7599a96b97410dfceb2ac606bead2f8969a6e
[gdb/testsuite] Fix gdb.mi/mi-info-sources.exp for extra debug info

When running test-case gdb.mi/mi-info-sources.exp, I run into:
...
Running src/gdb/testsuite/gdb.mi/mi-info-sources.exp ...
ERROR: internal buffer is full.
...
due to extra debug info from the shared libraries.

Fix this by using "nosharedlibrary".

Then I run into these FAILs:
...
FAIL: gdb.mi/mi-info-sources.exp: debug_read=false: \
  -file-list-exec-source-files (unexpected output)
FAIL: gdb.mi/mi-info-sources.exp: debug_read=true: \
  -file-list-exec-source-files (unexpected output)
FAIL: gdb.mi/mi-info-sources.exp: debug_read=true: \
  -file-list-exec-source-files --group-by-objfile, look for \
  mi-info-sources.c (unexpected output)
FAIL: gdb.mi/mi-info-sources.exp: debug_read=true: \
  -file-list-exec-source-files --group-by-objfile, look for \
  mi-info-sources-base.c (unexpected output)
...
due to openSUSE executables which have debug info for objects from sources
like sysdeps/x86_64/crtn.S.

Fix these by updating the patterns, and adding "maint expand-symtabs" to
reliably get fully-read objfiles.

Then I run into FAILs when using the readnow target board.  Fix these by
skipping the relevant tests.

Then I run into FAILs when using the cc-with-gnu-debuglink board.  Fix these
by updating the patterns.

Tested on x86_64-linux, with native, check-read1, readnow, cc-with-gdb-index,
cc-with-debug-names, cc-with-gnu-debuglink, cc-with-dwz, cc-with-dwz-m.

gdb/testsuite/ChangeLog:

2021-07-12  Tom de Vries  <tdevries@suse.de>

* lib/mi-support.exp (mi_readnow): New proc.
* gdb.mi/mi-info-sources.exp: Use nosharedlibrary.  Update patterns.
Skip tests for readnow.  Use "maint expand-symtabs".
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-info-sources.exp
gdb/testsuite/lib/mi-support.exp
This page took 0.024726 seconds and 4 git commands to generate.