This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Multi-exec patches (Was: [rfc] Infrastructure to disable breakpoints during inferior startup)


On Saturday 25 July 2009 16:12:49, Pedro Alves wrote:
> > ? ? (gdb) set schedule-multiple on
> > ? ? (gdb) set detach-on-fork off
> > ? ? (gdb) run
> > ? ? Starting program: /usr/bin/make 
> > ? ? (no debugging symbols found)
> > ? ? (no debugging symbols found)
> > ? ? (no debugging symbols found)
> > ? ? [New process 3931]
> > ? ? process 3931 is executing new program: /bin/true
> > ? ? (no debugging symbols found)
> > ? ? (no debugging symbols found)
> > ? ? (no debugging symbols found)
> > 
> > ? ? Program exited normally.
> > 
> > ... which is a little odd, since no build was done.
> > And, what's with process 3931 executing /bin/true?

I noticed I didn't exactly respond to this one.

> > Am I not debugging the 'make' process?

Yes you are, but, 'make' vforked (notice the [New process...] message,
and then execed /bin/true.  You only see the "Attaching after fork..."
message with "info verbose on" (linux-nat.c:linux_child_follow_fork).
If you do "info inferiors" or "info sspaces", you should see you're
debugging both /usr/bin/make and /bin/true simultaneously at this point.

> Ah, but you're debugging in all-stop mode. ?What this means
> is that a program exit is a reason to stop everything and report
> to the user. ?This was /bin/true exiting. ?Check "info inferiors",
> and you should still see other inferiors there, waiting for you
> to tell them to continue execution.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]