This is the mail archive of the gdb@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: Does HEAD support non-stop with 'gdbserver --multi' on Linux?


On Tuesday 12 May 2009 16:21:48, Marc Khouzam wrote:
> I saw that with non-stop, when doing native linux debugging, there
> is a conscious decision to trigger thread events as soon as possible
> (from a comment of linux-nat.c:linux_handle_extended_wait()).

At the time I added that to linux-nat.c it seemed like a
good idea, but in hindsight, I'm not sure it was.  This has
the potential to generate *a lot* of create/exit event pairs
for no apparent good reason --- consider a program that spawns
a lot of short lived worker threads.  Against remote
targets, this would be even worse, due to extra slowness.

> However, this does not happen when using gdbserver.
> 
> Is this something that is not ready yet, or a bug, or ... ?

This is a remote protocol issue.  The remote protocol does not have
any support for new thread notifications.  GDB only learns about
new threads when they report an event (say one hits a breakpoints),
or when the thread list is explicitly requested.

OOC, how does the eclipse/java debugger behave on such
scenario?  Are short lived threads added/removed from the GUI
even if they don't report a stop event?

-- 
Pedro Alves


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