* Breakpoints and multi-process using the same binary
@ 2011-04-11 14:53 Marc Khouzam
2011-04-11 17:16 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Marc Khouzam @ 2011-04-11 14:53 UTC (permalink / raw)
To: 'gdb@sourceware.org'
Hi,
the next release of Eclipse CDT will make use of GDB's great
multi-process (multi-exec) support. Nice work!
Quick question about breakpoints in that case (with non-stop).
I'm trying to set a breakpoint in a process that has one
thread stopped. The problem is that there is another
process fully running, which uses the same binary
(parent/child of a fork()).
From what I can see, I cannot set such a breakpoint without
interrupting a thread for each and every process sharing the
binary.
I just wanted to confirm that this was the right behavior
for GDB.
Of course, when I run the same binary on two
different GDBs, things are completely independent.
I guess that is not possible under the same GDB?
Thanks
Marc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Breakpoints and multi-process using the same binary
2011-04-11 14:53 Breakpoints and multi-process using the same binary Marc Khouzam
@ 2011-04-11 17:16 ` Pedro Alves
2011-04-11 18:05 ` Marc Khouzam
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2011-04-11 17:16 UTC (permalink / raw)
To: gdb; +Cc: Marc Khouzam
On Monday 11 April 2011 15:52:45, Marc Khouzam wrote:
> Hi,
>
> the next release of Eclipse CDT will make use of GDB's great
> multi-process (multi-exec) support. Nice work!
>
> Quick question about breakpoints in that case (with non-stop).
> I'm trying to set a breakpoint in a process that has one
> thread stopped. The problem is that there is another
> process fully running, which uses the same binary
> (parent/child of a fork()).
>
> From what I can see, I cannot set such a breakpoint without
> interrupting a thread for each and every process sharing the
> binary.
>
> I just wanted to confirm that this was the right behavior
> for GDB.
Yeah, it's a current limitation. I've looked at this a
bit after Tom reporting some other multi-process breakage, and
it didn't look like a quick fix. You may not need that
against linux gdbserver since it allows reading/writing
memory even when threads are running, while native linux gdb
doesn't. We're likely to get to fix all of this for
proper ptsets/itsets support (which we'll be starting
on real soon).
--
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Breakpoints and multi-process using the same binary
2011-04-11 17:16 ` Pedro Alves
@ 2011-04-11 18:05 ` Marc Khouzam
0 siblings, 0 replies; 3+ messages in thread
From: Marc Khouzam @ 2011-04-11 18:05 UTC (permalink / raw)
To: 'Pedro Alves', 'gdb@sourceware.org'
> -----Original Message-----
> From: Pedro Alves [mailto:pedro@codesourcery.com]
> Sent: Monday, April 11, 2011 1:16 PM
> To: gdb@sourceware.org
> Cc: Marc Khouzam
> Subject: Re: Breakpoints and multi-process using the same binary
>
> On Monday 11 April 2011 15:52:45, Marc Khouzam wrote:
> > Hi,
> >
> > the next release of Eclipse CDT will make use of GDB's great
> > multi-process (multi-exec) support. Nice work!
> >
> > Quick question about breakpoints in that case (with non-stop).
> > I'm trying to set a breakpoint in a process that has one
> > thread stopped. The problem is that there is another
> > process fully running, which uses the same binary
> > (parent/child of a fork()).
> >
> > From what I can see, I cannot set such a breakpoint without
> > interrupting a thread for each and every process sharing the
> > binary.
> >
> > I just wanted to confirm that this was the right behavior
> > for GDB.
>
> Yeah, it's a current limitation. I've looked at this a
> bit after Tom reporting some other multi-process breakage, and
> it didn't look like a quick fix. You may not need that
> against linux gdbserver since it allows reading/writing
> memory even when threads are running, while native linux gdb
> doesn't.
Thanks for mentioning that, I was not aware of it, but did
confirm it just now. I was able to set a breakpoint while
the inferior was completely running using gdbserver, but
only with GDB 7.3 (even 7.2.1 didn't support it).
For native gdb (or pre-7.3), I'll have to interrupt a thread
for every process before dealing with breakpoints.
(I could be more efficient and look for processes that have
the same executable, but I won't break my head over that
small optimization).
> We're likely to get to fix all of this for
> proper ptsets/itsets support (which we'll be starting
> on real soon).
Looking forward to it.
Thanks for the quick answer.
Marc
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-11 18:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-11 14:53 Breakpoints and multi-process using the same binary Marc Khouzam
2011-04-11 17:16 ` Pedro Alves
2011-04-11 18:05 ` Marc Khouzam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).