This is the mail archive of the gdb@sources.redhat.com 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: Gdbserver Threading Issues


On Fri, Dec 06, 2002 at 06:20:00PM -0500, Paul Mundt wrote:
> On Fri, 2002-12-06 at 17:09, Daniel Jacobowitz wrote:
> > > The log with remote debugging turned on is attached..
> > 
> > So: what are you doing in GDB to get this log; what is happening; what
> > do you expect to happen?  I don't see an obvious problem.
> 
> Same thing as what I explained in my intial post.
> 
> The test app starts up and spawns some arbitrary number of threads,
> which in turn sleep for a bit and then return.. in this case, 2 threads.
> 
> When running this test app under gdbserver, the only thread being
> reported to gdb is the manager thread.. (ie, [New thread x (LWP y)]).
> 
> Because of this, I can't do 'info threads' and see anything other then
> the manager thread .. and thus can't really do any thread-specific
> debugging.

Actually it's the _initial_ thread, not the manager thread, most
likely.

> If I run natively, this isn't an issue.
> 
> If I insert a breakpoint in the function being run by the threads, then
> everything comes up fine. Then I can break after the threads are created
> and do per-thread debugging without any issues.. but only if I place a
> breakpoint there.
> 
> If this isn't clear enough, I can toss together a brief log of what I'm
> doing.

You won't get [New thread x (LWP y)] messages at thread creation time
if you're using gdbserver; you'll get them when you stop for some other
reason and do info threads, generally.  If you never stop the running
application you won't see them.

But are you stopping the application some other way and not having
threads show up?  A precise example session would be appreciated.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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