From: Jim Ingham <jingham@apple.com>
To: gdb@sources.redhat.com
Subject: Re: MI output command error
Date: Mon, 14 Mar 2005 19:11:00 -0000 [thread overview]
Message-ID: <F5F091FB-ACD5-4633-BAFF-88D0EC2C90A3@apple.com> (raw)
In-Reply-To: <1110656346.18541.ezmlm@sources.redhat.com>
Eli is right, gdb was changed to HAVE an event loop, which made
handling async targets possible. But then the target itself needed
to be made asynchronous as well. There is a remote async target
already, though I don't know how well it works. For a ptrace based
target (most native targets) you need to have a separate thread to
run wait4 which then communicates back to the event source through
some kind of signal. For procfs, I bet it would be even easier, since
then you could just make an event source for the various proc files
you need to watch and add them to the general "select" call that also
waits for command input.
We made this work (for a ptrace-like setup) on Mac OS X. There were
a bunch of little bugs we had to deal with (like breakpoint commands
that can restart the target are a little tricky when you have an
async target). There was a bunch of fiddling necessary to make it
stable, but it wasn't all that hard. It certainly is useful from a
GUI to be able to interrupt, and almost more important to be able to
ask gdb "are you running the target or not?" which can help sync up
the GUI if things get confused as they sometimes do...
Jim
On Mar 12, 2005, at 11:39 AM, gdb-digest-help@sources.redhat.com wrote:
>> From: Nick Roberts <nickrob@snap.net.nz>
>> Date: Sat, 12 Mar 2005 10:49:41 +1300
>> Cc: Dave Korn <dave.korn@artimi.com>,
>> Karganov Konstantin <kostik@ispras.ru>, GDB
>> <gdb@sources.redhat.com>
>>
>>> Lack of implementation. No one's done the work.
>>
>> Thats understandable. However, given that MI was introduced in GDB
>> 5.0, I
>> think there should be something in the manual explaining this as
>> it seems to
>> create a lot of confusion. It needs to be written by someone who
>> understands
>> the issue i.e not myself.
>
> I'm all for documenting this in some useful way, but I fail to see how
> could this be done. Describing the async operation itself is already
> a big challenge, as the details are extremely confusing, unless you've
> read the code several times and have a good understanding of the
> underlying system calls (like `poll' and `select'). Differences
> between interpreters add another dimension of complexity to this.
>
>> I believe that operation is asynchronous with certain targets,
>> although I have never managed to create these conditions, even with
>> gdbserver over TCP.
>
> Actually, I think that the asynchronous operation is independent of
> the target. The infrastructure for this is in event-loop.c, which is
> not specific to any target.
>
> The problem with implementing async operation with the CLI interface
> is, AFAIU, not its dependence on some target-specific feature, but
> rather the need to redesig the CLI front end to do something useful
> while waiting for a prolonged operation to run to completion. For GUI
> front ends, such as those who use MI, it's clear what to do during
> that time, and the separate-process implementation makes it even
> easier to design. By contrast, the CLI interface is part of the GDB
> process.
>
> I don't consider myself a specialist in these matters, so please take
> the above with a grain of salt (i.e., it might all be wrong ;-).
>
next parent reply other threads:[~2005-03-14 19:11 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1110656346.18541.ezmlm@sources.redhat.com>
2005-03-14 19:11 ` Jim Ingham [this message]
2005-03-11 21:05 Nick Roberts
2005-03-11 21:31 ` Daniel Jacobowitz
2005-03-11 21:36 ` Bob Rossi
2005-03-11 21:39 ` Daniel Jacobowitz
2005-03-11 21:52 ` Nick Roberts
2005-03-12 10:23 ` Eli Zaretskii
2005-03-13 9:36 ` Nick Roberts
2005-03-13 15:40 ` Daniel Jacobowitz
2005-03-13 20:22 ` Nick Roberts
2005-03-13 20:25 ` Daniel Jacobowitz
2005-03-13 23:33 ` Nick Roberts
2005-03-13 23:38 ` Daniel Jacobowitz
2005-03-13 19:41 ` Eli Zaretskii
2005-03-14 7:16 ` Peter D HUERTER
-- strict thread matches above, loose matches on Subject: below --
2005-03-09 2:40 Bob Rossi
2005-03-09 23:22 ` Bob Rossi
2005-03-10 9:33 ` Re[2]: " Konstantin Karganov
2005-03-10 13:06 ` Bob Rossi
2005-03-10 13:43 ` Karganov Konstantin
2005-03-10 14:01 ` Bob Rossi
2005-03-10 14:15 ` Karganov Konstantin
2005-03-10 14:40 ` Bob Rossi
2005-03-10 15:13 ` Karganov Konstantin
2005-03-10 15:52 ` Dave Korn
2005-03-10 16:09 ` 'Bob Rossi'
2005-03-10 16:13 ` Daniel Jacobowitz
2005-03-10 17:44 ` Bob Rossi
2005-03-10 17:52 ` Daniel Jacobowitz
2005-03-10 20:48 ` Bob Rossi
2005-03-10 21:10 ` Daniel Jacobowitz
2005-03-10 21:25 ` Bob Rossi
2005-03-10 16:23 ` Dave Korn
2005-03-10 16:34 ` Daniel Jacobowitz
2005-03-10 16:48 ` Dave Korn
2005-03-10 17:03 ` 'Bob Rossi'
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=F5F091FB-ACD5-4633-BAFF-88D0EC2C90A3@apple.com \
--to=jingham@apple.com \
--cc=gdb@sources.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