From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/testsuite] Fix gdb.mi/mi-info-sources.exp for extra debug info
Date: Mon, 5 Jul 2021 17:52:46 +0200 [thread overview]
Message-ID: <20210705155244.GA18313@delia> (raw)
Hi,
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.
Tested on x86_64-linux.
Any comments?
Thanks,
- Tom
[gdb/testsuite] Fix gdb.mi/mi-info-sources.exp for extra debug info
gdb/testsuite/ChangeLog:
2021-07-05 Tom de Vries <tdevries@suse.de>
* gdb.mi/mi-info-sources.exp: Use nosharedlibrary. Update patterns.
---
gdb/testsuite/gdb.mi/mi-info-sources.exp | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/gdb.mi/mi-info-sources.exp b/gdb/testsuite/gdb.mi/mi-info-sources.exp
index c4d6b910ef8..6d69de0e29f 100644
--- a/gdb/testsuite/gdb.mi/mi-info-sources.exp
+++ b/gdb/testsuite/gdb.mi/mi-info-sources.exp
@@ -30,6 +30,10 @@ mi_clean_restart $binfile
mi_runto_main
+# Unload symbols for shared libraries to prevent
+# 'ERROR: internal buffer is full'.
+mi_gdb_test "nosharedlibrary" ".*\\^done" "nosharedlibrary"
+
# Helper to build expected MI output pattern for a list. NAME is the
# name of the list (which can be the empty string) and args is one
# or more strings representing the fields of the list, which will be
@@ -113,20 +117,24 @@ proc check_info_sources { debug_fully_read } {
[mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \
[mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \
[mi_field "debug-fully-read" "${debug_fully_read}"]] \
+ ".*" \
[mi_tuple "" \
[mi_field "file" "\[^\"\]+/mi-info-sources\\.c"] \
[mi_field "fullname" "\[^\"\]+/mi-info-sources\\.c"] \
- [mi_field "debug-fully-read" "true"]]]
+ [mi_field "debug-fully-read" "true"]] \
+ ".*"]
} else {
set p [mi_list "files" \
[mi_tuple "" \
[mi_field "file" "\[^\"\]+/mi-info-sources\\.c"] \
[mi_field "fullname" "\[^\"\]+/mi-info-sources\\.c"] \
[mi_field "debug-fully-read" "true"]] \
+ ".*" \
[mi_tuple "" \
[mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \
[mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \
- [mi_field "debug-fully-read" "${debug_fully_read}"]]]
+ [mi_field "debug-fully-read" "${debug_fully_read}"]] \
+ ".*"]
}
mi_gdb_test "-file-list-exec-source-files" ".*\\^done,${p}" "-file-list-exec-source-files"
@@ -140,7 +148,7 @@ proc check_info_sources { debug_fully_read } {
# Figure out the value for the 'debug-info' field.
if {${debug_fully_read} == "true"} {
- set debug_info "fully-read"
+ set debug_info "(fully-read|partially-read)"
} else {
set debug_info "partially-read"
}
next reply other threads:[~2021-07-05 15:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 15:52 Tom de Vries [this message]
2021-07-12 11:15 ` Tom de Vries
2021-07-19 9:33 ` Andrew Burgess
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210705155244.GA18313@delia \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox