From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix gdb.server/server-kill.exp with -m32
Date: Sat, 18 Sep 2021 17:19:18 +0200 [thread overview]
Message-ID: <20210918151917.GA13535@delia> (raw)
Hi,
When running test-case gdb.server/server-kill.exp with target board unix/-m32,
I run into:
...
0xf7fd6b20 in _start () from /lib/ld-linux.so.2^M
(gdb) Executing on target: kill -9 13082 (timeout = 300)
builtin_spawn -ignore SIGHUP kill -9 13082^M
bt^M
(gdb) FAIL: gdb.server/server-kill.exp: kill_pid_of=server: test_unwind_syms: bt
...
The test-case expects the backtrace command to trigger remote communication,
which then should result in a "Remote connection closed" or similar.
However, no remote communication is triggered, because we hit the "Check that
this frame is unwindable" case in get_prev_frame_always_1.
We don't hit this problem in the kill_pid_of=inferior case, because there we
run to main before doing the backtrace.
Fix this by doing the same in the kill_pid_of=server case.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix gdb.server/server-kill.exp with -m32
---
gdb/testsuite/gdb.server/server-kill.exp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp
index 655821cc6f9..4125e5bf92d 100644
--- a/gdb/testsuite/gdb.server/server-kill.exp
+++ b/gdb/testsuite/gdb.server/server-kill.exp
@@ -69,11 +69,13 @@ proc prepare {} {
gdbserver_run ""
- if { $::kill_pid_of == "inferior" } {
- # Continue past server_pid assignment.
- gdb_breakpoint ${srcfile}:[gdb_get_line_number "i = 0;"]
- gdb_continue_to_breakpoint "after server_pid assignment"
+ # Continue past server_pid assignment. We do this for both scenarios,
+ # to avoid doing a backtrace from _start, which may not trigger remote
+ # communication.
+ gdb_breakpoint ${srcfile}:[gdb_get_line_number "i = 0;"]
+ gdb_continue_to_breakpoint "after server_pid assignment"
+ if { $::kill_pid_of == "inferior" } {
# Get the pid of GDBServer.
set test "p server_pid"
set server_pid 0
reply other threads:[~2021-09-18 15:19 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=20210918151917.GA13535@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