From: Pedro Alves <palves@redhat.com>
To: "Maciej W. Rozycki" <macro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] testsuite: Persistent gdbserver cleanup
Date: Thu, 24 Oct 2013 19:36:00 -0000 [thread overview]
Message-ID: <526976AF.6010003@redhat.com> (raw)
In-Reply-To: <alpine.DEB.1.10.1310232339060.12843@tp.orcam.me.uk>
On 10/23/2013 11:59 PM, Maciej W. Rozycki wrote:
> Hi,
>
> We have a number of tests that run `gdbserver' in the persistent mode, to
> be able to disconnect and reconnect. That has a side effect of leaving
> the `gdbserver' behind upon GDB termination at the conclusion of the
> respective test cases, because no kill request is sent to `gdbserver' at
> the end of session and as a result of receiving a KILL signal GDB merely
> disconnects.
>
> This causes problems in some remote test environments, such as QEMU in
> the system emulation mode, where `gdbserver' is run within Linux run on
> QEMU and QEMU's TCP port forwarding feature is used to communicate with
> the `gdbserver'. In this case a single TCP port is used to talk to
> `gdbserver' and a subsequent test case faces `gdbserver' still running
> controlling the program used for the test case that has just concluded.
>
> Killing off that `gdbserver' process, while possible, is complicated and
> I think test cases should try to leave the state clean if possible, so
> here's my proposal to make the harness explicitly request `gdbserver' to
> terminate before killing off GDB where the persistent mode has been
> requested. Additionally one test case terminated GDB in a disconnected
> state, so I made it reconnect before completion.
>
> No regressions in mips-linux-gnu testing. OK to apply?
Seems OK.
Though I think this won't work in extended-remote mode, where
"kill" won't actually bring down gdbserver. I think we'd need to use
"monitor exit" for that instead. (I think we'd do that with a new
gdbserver_finish hook in gdbserver-support.exp that instead of
hardcoding that gdbserver-specific command in gdb_finish). But it's fine
with me if you don't want to fix that.
--
Pedro Alves
next prev parent reply other threads:[~2013-10-24 19:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-23 22:59 Maciej W. Rozycki
2013-10-24 19:36 ` Pedro Alves [this message]
2013-10-24 22:37 ` Maciej W. Rozycki
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=526976AF.6010003@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=macro@codesourcery.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).