From: Joel Brobecker <brobecker@adacore.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: stanshebs@earthlink.net, gdb@sourceware.org
Subject: Re: Towards multiprocess GDB
Date: Mon, 21 Jul 2008 17:57:00 -0000 [thread overview]
Message-ID: <20080721173931.GA3859@adacore.com> (raw)
In-Reply-To: <200807182141.m6ILfBcf014252@brahms.sibelius.xs4all.nl>
> Please remind me, why was this a desirable capability again?
One case that Pedro and I discussed at the GCC Summit when he mentioned
this topic was VxWorks systems.
AdaCore recently re-implemented support for ppc/vxworks targets in GDB,
and I can post the diff if anyone is interested. I haven't done so yet,
because there are a couple of major hacks that we had to introduced and
I want to re-implement then appropriately before considering a submission.
VxWorks introduces the notion of partitions, but has no notion of
"process" - only "tasks" (aka threads). All tasks within a partition
have access to everything within that partition. However, partitions
can almost be viewed as different computers, so symbols in one partition
are completely irrelevant to other partitions.
One way to debug some of the code is to debug one task, and treat it
as a process. But the reality is that programs are often multi-threaded
and so debugging one task would only be debugging part the program.
This is why we introduced the option of debugging the entire partition
as one process.
But most of our users want to debug the entire system rather than each
individual task separately, because of inter-partition scheduling or
communication issues. This is when the fun starts, because we now have
symbols for one partition, and symbols for another partition, and we
need to remember which partition they are for. I believe that adding
support for multi-process debugging will solve the issue above, since
each process should have its own list of objfiles and associated
symbols.
VxWorks also has the concept of shared-library partitions that any given
partition can link to, effectively giving access to the symbols there.
I think this is very comparable to shared libraries in Unix systems or
DLLs on Windows. It would be really nice if we eventually taught GDB to
recognize that two processes were using the same shared library and
thus internally loaded the symbol once.
--
Joel
next prev parent reply other threads:[~2008-07-21 17:39 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
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 [this message]
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=20080721173931.GA3859@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--cc=stanshebs@earthlink.net \
/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