* Problems with multi-threaded application debugging
@ 2007-05-31 12:50 Ulisses Furquim
2007-05-31 17:23 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Ulisses Furquim @ 2007-05-31 12:50 UTC (permalink / raw)
To: gdb
Hi,
I was doing some tests trying to debug a simple multi-threaded
application and noticed some strange gdb behaviors:
- sometimes when you "continue" gdb doesn't stop at a breakpoint
inside some of the threads;
- sometimes when you try to single step (with "next") all the threads
run until the program exits;
- I was trying to use the scheduler-locking variable (setting it to
"on"), but it seems I can single step on only one thread. I mean, If I
switch to another thread and try to single step it, gdb switches back
to the previous thread.
Does anybody have any idea? Is this the expected behavior of gdb?
Best regards,
-- Ulisses
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems with multi-threaded application debugging
2007-05-31 12:50 Problems with multi-threaded application debugging Ulisses Furquim
@ 2007-05-31 17:23 ` Daniel Jacobowitz
2007-05-31 18:35 ` Ulisses Furquim
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2007-05-31 17:23 UTC (permalink / raw)
To: Ulisses Furquim; +Cc: gdb
On Thu, May 31, 2007 at 02:50:12PM +0200, Ulisses Furquim wrote:
> Hi,
>
> I was doing some tests trying to debug a simple multi-threaded
> application and noticed some strange gdb behaviors:
>
> - sometimes when you "continue" gdb doesn't stop at a breakpoint
> inside some of the threads;
> - sometimes when you try to single step (with "next") all the threads
> run until the program exits;
I have no idea what these might be.
> - I was trying to use the scheduler-locking variable (setting it to
> "on"), but it seems I can single step on only one thread. I mean, If I
> switch to another thread and try to single step it, gdb switches back
> to the previous thread.
To be honest, I can't completely remember whether this is supposed to
happen still or supposed to be fixed. You need to be using a current
version of gdb and gdbserver, but GDB may still be doing something
wrong.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems with multi-threaded application debugging
2007-05-31 17:23 ` Daniel Jacobowitz
@ 2007-05-31 18:35 ` Ulisses Furquim
0 siblings, 0 replies; 3+ messages in thread
From: Ulisses Furquim @ 2007-05-31 18:35 UTC (permalink / raw)
To: gdb; +Cc: Ulisses Furquim
Hi Daniel,
On 5/31/07, Daniel Jacobowitz <drow@false.org> wrote:
> > - sometimes when you "continue" gdb doesn't stop at a breakpoint
> > inside some of the threads;
> > - sometimes when you try to single step (with "next") all the threads
> > run until the program exits;
>
> I have no idea what these might be.
Yeah, I thought it was really strange and I can trigger this behavior
with a really simple application.
> > - I was trying to use the scheduler-locking variable (setting it to
> > "on"), but it seems I can single step on only one thread. I mean, If I
> > switch to another thread and try to single step it, gdb switches back
> > to the previous thread.
>
> To be honest, I can't completely remember whether this is supposed to
> happen still or supposed to be fixed. You need to be using a current
> version of gdb and gdbserver, but GDB may still be doing something
> wrong.
Ah, I'm sorry, I wasn't completely clear. I forgot to say that I can
trigger all those problems with gdb 6.4-debian (from Ubuntu Edgy) on a
x86 machine and also with gdb 6.6 on an ARM device. I'm not even using
gdbserver (yet).
Regards,
-- Ulisses
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-31 18:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-31 12:50 Problems with multi-threaded application debugging Ulisses Furquim
2007-05-31 17:23 ` Daniel Jacobowitz
2007-05-31 18:35 ` Ulisses Furquim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox