From: Michael Snyder <msnyder@specifix.com>
To: Paul Koning <Paul_Koning@dell.com>
Cc: gdb@sourceware.org
Subject: Re: target remote-attach?
Date: Fri, 29 Feb 2008 22:20:00 -0000 [thread overview]
Message-ID: <1204322975.19253.529.camel@localhost.localdomain> (raw)
In-Reply-To: <18376.27047.383933.915287@gargle.gargle.HOWL>
On Fri, 2008-02-29 at 15:23 -0500, Paul Koning wrote:
> >>>>> "Michael" == Michael Snyder <msnyder@specifix.com> writes:
>
> Michael> Just thinking aloud... we ought to have a sort of
> Michael> "remote-attach" command, that would allow us to connect to a
> Michael> remote target when it is already in a "run" state. Right
> Michael> now the initial handshake protocol prevents doing that.
>
> Michael> The target might be waiting to tell gdb "I stopped because
> Michael> of a SIGTRAP", or similar, or it might actually be running,
> Michael> and need to be stopped via a serial BRK or the like. After
> Michael> that, we would be in a sane state from which we could do the
> Michael> usual remote_open handshake.
>
> Michael> Or is there something like that already?
>
> I haven't seen the problem you mention. gdbserver allows attaching to
> a running process (by PID) and that has always worked for me. For
> that matter, it works also with a native gdb (local debug).
>
> Similarly, I've used the remote target protocol for kernel debug,
> connecting after the kernel panic handler has invoked the stub via a
> breakpoint instruction. That too works fine.
Yeah, the situation I have in mind is, say you've already been
connected, and you've said "continue", and then while gdb was
waiting for the target to say "OK, I've stopped", you lost the
connection.
The situation you mention (native "attach") is kind of analogous.
You want to connect to a running target, possibly interrupt it,
(native attach sends the child a signal), and then handshake.
next prev parent reply other threads:[~2008-02-29 22:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-29 20:23 Michael Snyder
2008-02-29 20:26 ` Paul Koning
2008-02-29 22:20 ` Michael Snyder [this message]
2008-02-29 20:29 ` Daniel Jacobowitz
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=1204322975.19253.529.camel@localhost.localdomain \
--to=msnyder@specifix.com \
--cc=Paul_Koning@dell.com \
--cc=gdb@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