bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdbserver crash


From: Thomas . E . Daley
Subject: gdbserver crash
Date: Fri, 23 May 2003 14:30:53 -0600

i686-linux -> powerpc-linux gdbserver crash when using threads.

I have found that turning on debug_threads keeps gdbserver from crashing.

I found all places where debug_threads is used in gdbserver and found the
one
debug print statement that makes gdbserver work.

Line 256 of thread-db.c

if (debug_threads)
  fprintf(stderr, "Attaching to thread %ld (LWP %d)\n",
            ti_p->ti_tid, ti_p->ti_lid);

I thought it might be timing so I put a usleep there and gdbserver crashed.
I thought the function call putting things on the stack may be the issue so
I put

fprintf(stderr, "");  and gdbserver still crashes.

I changed to fprintf(" "); and no crash.

So writing a space to stderr fixes the problem I am seeing.

I then changed the call to write(2, " ", 1); and that fixes the problem as
well.

Any ideas as to what is going on here?

Thanks

t o m . d a l e y @ s e a g a t e . c o m






reply via email to

[Prev in Thread] Current Thread [Next in Thread]