From: Pedro Alves <pedro@codesourcery.com>
To: gdb@sourceware.org
Cc: Stan Shebs <stan@codesourcery.com>,
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: Re: Towards multiprocess GDB
Date: Sat, 19 Jul 2008 03:53:00 -0000 [thread overview]
Message-ID: <200807190013.24604.pedro@codesourcery.com> (raw)
In-Reply-To: <488118EE.90508@codesourcery.com>
A Friday 18 July 2008 23:27:58, Stan Shebs wrote:
> I'm not sure it's going to be that big of a change actually. Once
> behavior has been directed to the right objects internally, they will do
> what they're doing now. Most symbol handling is objfile-relative for
> instance, adding a new set of objfiles for a different exec isn't going
> to affect that code.
You seem to be thinking of the symbol handling code only.
The thing I see requiring architecting, is the target stack.
Currently, it's only layed out for the single executable + single
process case.
For starters, I'll try to give a simple example.
Imagine you're debugging simultaneously these cases below:
1) Linux native non-threaded app. The current target is a squashed
view of:
linux-nat process_stratum
exec file_stratum
2) Linux native multi-threaded app, loads libthread_db for the thread
support. The current target is a squashed view of:
linux-thread-db thread_stratum
linux-nat process_stratum
exec file_stratum
3) Linux native threaded app, but loads another thread support lib.
linux-other-thread-db thread_stratum
linux-nat process_stratum
exec file_stratum
4) Linux native non-threaded app, doing reverse debugging.
record record_stratum
linux-nat process_stratum
exec file_stratum
(There are OSs where this is more common.)
It seems to me that each process should have its own target stack
instance.
We could split target_ops in two and share the ops part
between instances, but still the target_ops rw data needs to be
per-process.
Note that I'm not even considering multi-process,multi-exec,single
remote target connection, where things get even dirtier, or even
native process + remote process debugging simultaneously.
There are other issues around the target stack that need
resolution, but this issue above seems crucial to have in
mind first.
--
Pedro Alves
next prev parent reply other threads:[~2008-07-18 23:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 20:50 Stan Shebs
2008-07-18 21:21 ` Paul Koning
2008-07-18 21:41 ` Stan Shebs
2008-07-21 0:34 ` Michael Snyder
2008-07-18 22:13 ` Mark Kettenis
2008-07-18 22:20 ` David Daney
2008-07-18 22:28 ` Thiago Jung Bauermann
2008-07-18 23:09 ` Stan Shebs
2008-07-19 3:53 ` Pedro Alves [this message]
2008-07-21 17:39 ` Stan Shebs
2008-07-21 1:53 ` Michael Snyder
2008-07-21 16:08 ` Russell Shaw
2008-07-21 17:57 ` Joel Brobecker
2008-07-18 23:13 ` Tom Tromey
2008-07-21 17:11 ` Stan Shebs
2008-07-21 0:30 ` Michael Snyder
2008-07-21 18:21 ` Paul Pluzhnikov
2008-07-21 18:32 ` Stan Shebs
2008-07-21 16:38 ` Michael Eager
2008-07-21 21:54 ` Stan Shebs
2008-07-31 22:04 ` Ian Lance Taylor
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=200807190013.24604.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--cc=stan@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