From: Yao Qi <yao@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org>,
Hui Zhu <hui_zhu@mentor.com>
Subject: Re: [commit+7.6] [patch+7.6] Fix 7.5 regression crashing GDB if gdbserver dies
Date: Tue, 02 Apr 2013 13:41:00 -0000 [thread overview]
Message-ID: <515A56FC.0@codesourcery.com> (raw)
In-Reply-To: <20130322204243.GA31871@host2.jankratochvil.net>
On 03/23/2013 04:42 AM, Jan Kratochvil wrote:
> +set server_pid [exp_pid -i [board_info target fileid]]
> +remote_exec target "kill -9 $server_pid"
> +
> +gdb_test "step" "Remote connection closed"
Jan,
I got a fail in this test (on Lucid x86_64),
Executing on native-gdbserver: kill -9 31336 {} {} {} (timeout = 300)
spawn -ignore SIGHUP kill -9 31336 ^M
kill: : invalid process id^M
kill: : invalid process id^M
kill: : invalid process id^M
step^M
Cannot find bounds of current function
(gdb) FAIL: gdb.server/server-kill.exp: step
The GDB's output of command 'step' is unexpected but looks reasonable
to me. What we want to check here is GDB gets "connection closed" when
GDBserver died, so any commands which talk with GDBserver should be
qualified. I choose 'tstaus' here, because it simply talks with
GDBserver to get trace status, and don't involve other factors into
it. Note that we can use 'stepi' here, but I think 'tstatus' is simpler
than it, so I choose 'tstatus' in the test finally.
This patch fixes the fail I saw. Is it OK for mainline and 7.6?
--
Yao (é½å°§)
gdb/testsuite:
2013-04-02 Yao Qi <yao@codesourcery.com>
* gdb.server/server-kill.exp: Use command 'tstatus' instead of
'step'.
---
gdb/testsuite/gdb.server/server-kill.exp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp
index 45a2a89..1b48152 100644
--- a/gdb/testsuite/gdb.server/server-kill.exp
+++ b/gdb/testsuite/gdb.server/server-kill.exp
@@ -40,4 +40,6 @@ delete_breakpoints
set server_pid [exp_pid -i [board_info target fileid]]
remote_exec target "kill -9 $server_pid"
-gdb_test "step" "Remote connection closed"
+# Force GDB to talk with GDBserver, so that we can get the
+# "connection closed" error.
+gdb_test "tstatus" "Remote connection closed"
--
1.7.7.6
next prev parent reply other threads:[~2013-04-02 3:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 19:55 Jan Kratochvil
2013-03-22 13:04 ` Pedro Alves
2013-03-22 20:29 ` Jan Kratochvil
2013-03-22 20:45 ` Pedro Alves
2013-03-22 20:55 ` Tom Tromey
2013-03-23 10:51 ` Pedro Alves
2013-03-23 16:25 ` Tom Tromey
2013-03-23 18:31 ` [commit+7.6] " Jan Kratochvil
2013-03-23 22:49 ` Pedro Alves
2013-04-02 13:41 ` Yao Qi [this message]
2013-04-02 15:20 ` Jan Kratochvil
2013-04-04 11:09 ` Yao Qi
2013-04-08 7:17 ` [testsuite patch] race: server-kill.exp: Connection reset by peer [Re: [patch+7.6] Fix 7.5 regression crashing GDB if gdbserver dies] Jan Kratochvil
2013-04-09 15:44 ` Pedro Alves
2013-04-09 16:00 ` [commit+7.6] " Jan Kratochvil
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=515A56FC.0@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=hui_zhu@mentor.com \
--cc=jan.kratochvil@redhat.com \
--cc=palves@redhat.com \
/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