From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Marc Khouzam <marc.khouzam@ericsson.com>
Cc: "'gdb@sourceware.org'" <gdb@sourceware.org>
Subject: Re: Using telnet to control a running GDB
Date: Mon, 29 Nov 2010 20:39:00 -0000 [thread overview]
Message-ID: <20101129203906.GA18241@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <F7CE05678329534C957159168FA70DEC572E79C924@EUSAACMS0703.eamcs.ericsson.se>
On Mon, 29 Nov 2010 21:00:34 +0100, Marc Khouzam wrote:
> I'm not disagreeing, but I'm not clear what you mean.
> Do you mean that GDB has a feature to allow for indepent sessions?
It is the same as event-driven vs. threading model.
The event-driven model is for example implemented by Gnome/GLib applications.
There is a mainloop waiting for events, any event is immediately processed,
further actions are remembered (like GDB continuations) and execution always
immediately drops back to the mainloop.
With threading model each action creates new thread and such thread waits and
tracks that one specific action until it completes.
This two approach are equivalent, they just require different coding approach.
GDB async represents the event-driven one, you request "independent sessions"
representing the threading model. The threading model is more intuitive for
coding but it is more resources demanding.
(gdb) continue &
(gdb) print 1 + 2 # this command may come from an "independent session"
> However, command-history, using arrow-up/down, is not an actual CLI command,
> so I wouldn't be able to reproduce that feature in the Eclipse console.
command-history has no place in a communication protocol. It is
a user-interface local feature.
You can implement readline-like feature in Eclipse console by some library
like JLine as a JNI interface to arch-specific real GNU readline would be
probably a complication for Eclipse distribution.
> We don't always use aync/non-stop in Eclipse. It is up to the
> user to decide. But that is not a problem because the eclipse
> GDB console, should not accept commands when GDB is busy (just
> like GDB's shell does not accept commands).
The "indepent session" would not be possible without async/non-stop.
> If the user modifies a variable in the console, there is no event to tell
> the frontend that something changed and should be updated in the variables
> view. What we do in eclipse, is that we parse all the commands sent to the
> console, and we try to figure out if such a command will require an update
> in the eclipse views.
That is not nice but I understand there is currently no other way.
> If the console was outside eclipse (like the telnet session,
> I'm mentioning), eclipse may not be able to catch the commands
> from that telnet to be able to parse them, and would then
> fall out-of-sync with GDB.
MI should rather notify changes done over MI when talking about some right way
to do it.
Thanks,
Jan
next prev parent reply other threads:[~2010-11-29 20:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-28 18:28 Marc Khouzam
2010-11-28 22:40 ` Mike Frysinger
2010-11-29 2:56 ` Jan Kratochvil
2010-11-29 15:24 ` Marc Khouzam
2010-11-29 18:55 ` Jan Kratochvil
2010-11-29 20:00 ` Marc Khouzam
2010-11-29 20:39 ` Jan Kratochvil [this message]
2010-12-06 18:40 ` Tom Tromey
2010-12-06 18:36 ` Tom Tromey
2010-12-07 2:50 ` Marc Khouzam
2010-12-07 15:51 ` Tom Tromey
2010-12-07 16:13 ` Tristan Gingold
2010-12-07 17:14 ` Marc Khouzam
2010-11-29 21:10 ` Tom Tromey
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=20101129203906.GA18241@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb@sourceware.org \
--cc=marc.khouzam@ericsson.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