From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/testsuite] Handle no glibc debuginfo in gdb.base/solib-corrupted.exp
Date: Mon, 14 Dec 2020 08:23:00 +0100 [thread overview]
Message-ID: <20201214072259.GA6243@delia> (raw)
Hi,
When running test-case gdb.base/solib-corrupted.exp on SLE-11, I get:
...
(gdb) PASS: gdb.base/solib-corrupted.exp: normal list
p/x _r_debug->r_map->l_next = _r_debug->r_map^M
'_r_debug' has unknown type; cast it to its declared type^M
(gdb) FAIL: gdb.base/solib-corrupted.exp: make solibs looping
...
The reason that _r_debug has unknown type is that glibc debuginfo is not
installed. The test-case attempts to detect this but doesn't handle this
particular error string.
Fix this by adding the "unknown type" line to the regexp detecting missing
glibc debuginfo.
Tested on x86_64-linux.
Any comments?
Thanks,
- Tom
[gdb/testsuite] Handle no glibc debuginfo in gdb.base/solib-corrupted.exp
gdb/testsuite/ChangeLog:
2020-12-14 Tom de Vries <tdevries@suse.de>
PR testsuite/26962
* gdb.base/solib-corrupted.exp: Handle "'_r_debug' has unknown type;
cast it to its declared type".
---
gdb/testsuite/gdb.base/solib-corrupted.exp | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/solib-corrupted.exp b/gdb/testsuite/gdb.base/solib-corrupted.exp
index 5ee943cae1..902ef9cc7a 100644
--- a/gdb/testsuite/gdb.base/solib-corrupted.exp
+++ b/gdb/testsuite/gdb.base/solib-corrupted.exp
@@ -64,10 +64,20 @@ if { [llength $probes] == 0 } {
gdb_test "info sharedlibrary" "From * To .*" "normal list"
+set no_glibc_debuginfo_re1 "No symbol \"_r_debug\" in current context\\."
+set no_glibc_debuginfo_re2 \
+ [concat \
+ "Attempt to extract a component of a value that is not a structure" \
+ " pointer\\."]
+set no_glibc_debuginfo_re3 \
+ "'_r_debug' has unknown type; cast it to its declared type"
+set no_glibc_debuginfo_re \
+ "($no_glibc_debuginfo_re1|$no_glibc_debuginfo_re2|$no_glibc_debuginfo_re3)"
+
# GDB checks there for matching L_PREV.
set test "make solibs looping"
gdb_test_multiple "p/x _r_debug->r_map->l_next = _r_debug->r_map" $test {
- -re "(No symbol \"_r_debug\" in current context\\.|Attempt to extract a component of a value that is not a structure pointer\\.)\r\n$gdb_prompt $" {
+ -re "$no_glibc_debuginfo_re\r\n$gdb_prompt $" {
# glibc debug info is not available and it is too difficult to find and
# parse it from this testcase without the gdb supporting functions.
xfail $test
next reply other threads:[~2020-12-14 7:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-14 7:23 Tom de Vries [this message]
2020-12-14 15:49 ` Tom Tromey
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=20201214072259.GA6243@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