From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix gdb.python/py-events.exp
Date: Wed, 22 Sep 2021 14:11:56 +0200 [thread overview]
Message-ID: <20210922121154.GA15715@delia> (raw)
Hi,
With test-case gdb.python/py-events.exp on ubuntu 18.04.5 we run into:
...
(gdb) info threads^M
Id Target Id Frame ^M
* 1 Thread 0x7ffff7fc3740 (LWP 31467) "py-events" do_nothing () at \
src/gdb/testsuite/gdb.python/py-events-shlib.c:19^M
(gdb) FAIL: gdb.python/py-events.exp: get current thread
...
The info thread commands uses "Thread" instead of "process" because
libpthread is already loaded:
...
new objfile name: /lib/x86_64-linux-gnu/libdl.so.2^M
[Thread debugging using libthread_db enabled]^M
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".^M
event type: new_objfile^M
new objfile name: /lib/x86_64-linux-gnu/libpthread.so.0^M
...
and consequently thread_db_target::pid_to_str is used.
Fix this by parsing the "Thread" expression.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix gdb.python/py-events.exp
---
gdb/testsuite/gdb.python/py-events.exp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp
index 753709361f5..d6dc9fd4252 100644
--- a/gdb/testsuite/gdb.python/py-events.exp
+++ b/gdb/testsuite/gdb.python/py-events.exp
@@ -82,9 +82,13 @@ delete_breakpoints
# Test inferior call events
gdb_test_multiple "info threads" "get current thread" {
- -re "\[^\n\r\]*process (\[0-9\]+)\[^\n\r\]*do_nothing.*$gdb_prompt $" {
+ -re -wrap "process ($decimal)\[^\n\r\]*do_nothing.*" {
set process_id $expect_out(1,string)
- pass "get current thread"
+ pass $gdb_test_name
+ }
+ -re -wrap "Thread $hex \\(LWP ($decimal)\\)\[^\n\r\]*do_nothing.*" {
+ set process_id $expect_out(1,string)
+ pass $gdb_test_name
}
}
reply other threads:[~2021-09-22 12:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210922121154.GA15715@delia \
--to=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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