public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* threads/2371: gdbserver can't step in thread
@ 2007-11-29 10:18 loic.gautheur
0 siblings, 0 replies; 4+ messages in thread
From: loic.gautheur @ 2007-11-29 10:18 UTC (permalink / raw)
To: gdb-gnats
>Number: 2371
>Category: threads
>Synopsis: gdbserver can't step in thread
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: support
>Submitter-Id: net
>Arrival-Date: Thu Nov 29 10:18:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: loic.gautheur@wanadoo.fr
>Release: GDB 5.3
>Organization:
>Environment:
GDB 5.3 and GDBSERVER 5.3 under debian woody
>Description:
Hi,
I have a problem using gdbserver 5.3 for debuging multi-threaded
applications. If I use gdb 5.3 to debug the application everything works.
my problem is when I put a breakpoint in a thread and the thread encounter the breakpoint the application stops, then i try to STEP to the next line and then if I use gdb the application run ,execute other threads and stop on the next line (normal behaviour )
but when using gdbserver the application receive a SIGTRAP and stop.
PS: Attached you can find the traces I've got first using GDB and after using GDBSERVER
Loic Gautheur
>How-To-Repeat:
use the print-threads.c program in the testsuite of gdb set slow to 1
then put a breakpoint at line 43
run the application
when you encounter the breakpoint clear it and then
use the STEP command.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="bug_gdbserver"
Content-Disposition: inline; filename="bug_gdbserver"
/********************* normal behaviour using GDB **********************/
(gdb) br print-threads.c:43
Breakpoint 2 at 0x8048667: file print-threads.c, line 43.
(gdb) r
Starting program: /i500/test/a.out
[New Thread 1024 (LWP 210)]
[New Thread 2049 (LWP 211)]
[New Thread 1026 (LWP 212)]
Print 1, thread 0
[New Thread 2051 (LWP 213)]
Print 1, thread 1
[Switching to Thread 1026 (LWP 212)]
Breakpoint 2, thread_function (arg=0xbffffcdc) at print-threads.c:43
43 if (slow)
(gdb) clear print-threads.c:43
Deleted breakpoint 2
(gdb) s
Print 2, thread 1
Print 3, thread 1
45 printf ("Print 2, thread %d\n", my_number);
(gdb) s
Print 4, thread 1
Print 5, thread 1
Bye from 1
Print 2, thread 0
[New Thread 3076 (LWP 214)]
Print 1, thread 2
Print 2, thread 2
46 sleep (1);
(gdb) s
Print 3, thread 2
Print 4, thread 2
Print 5, thread 2
Bye from 2
[New Thread 4101 (LWP 215)]
Print 1, thread 3
Print 2, thread 3
47 printf ("Print 3, thread %d\n", my_number);
(gdb) c
Continuing.
Print 3, thread 3
Print 3, thread 0
[New Thread 5126 (LWP 216)]
Print 4, thread 3
Print 4, thread 0
Print 1, thread 4
Print 5, thread 0
Print 2, thread 4
Print 5, thread 3
Bye from 0
Bye from 3
Print 3, thread 4
Print 4, thread 4
Print 5, thread 4
Bye from 4
Done
Program exited normally.
/********************* end of normal behaviour with GDB *******************/
/********************* PROBLEM using GDBSERVER **************************/
(gdb) target remote localhost:2345
Remote debugging using localhost:2345
0x400012d0 in ?? ()
(gdb) c
Continuing.
[New Thread 1024]
[New Thread 1026]
[Switching to Thread 1026]
Breakpoint 1, thread_function (arg=0xbffffcec) at print-threads.c:43
43 if (slow)
(gdb) clear print-threads:43
No source file named print-threads.
(gdb) clear print-threads.c:43
Deleted breakpoint 1
(gdb) s
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 1024]
0x4005187f in sigsuspend () from /lib/libc.so.6
(gdb) s
Single stepping until exit from function sigsuspend,
which has no line number information.
0x4001c879 in __pthread_wait_for_restart_signal () from /lib/libpthread.so.0
(gdb) c
Continuing.
Program exited normally.
/********************* END of PROBLEM GDBSERVER **************************/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: threads/2371: gdbserver can't step in thread
@ 2007-12-05 13:50 drow
0 siblings, 0 replies; 4+ messages in thread
From: drow @ 2007-12-05 13:50 UTC (permalink / raw)
To: gdb-prs, loic.gautheur, nobody
Synopsis: gdbserver can't step in thread
State-Changed-From-To: open->closed
State-Changed-By: drow
State-Changed-When: Wed Dec 5 13:50:31 2007
State-Changed-Why:
Fixed in current versions.
http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2371
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: threads/2371: gdbserver can't step in thread
@ 2007-12-05 10:58 Martine GAUTHEUR
0 siblings, 0 replies; 4+ messages in thread
From: Martine GAUTHEUR @ 2007-12-05 10:58 UTC (permalink / raw)
To: nobody; +Cc: gdb-prs
The following reply was made to PR threads/2371; it has been noted by GNATS.
From: Martine GAUTHEUR <loic.gautheur@wanadoo.fr>
To: "gdb-gnats@sources.redhat.com" <gdb-gnats@sources.redhat.com>
Cc:
Subject: Re: threads/2371: gdbserver can't step in thread
Date: Wed, 5 Dec 2007 11:57:42 +0100 (CET)
thanks Daniel
it works fine
loic gautheur
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: threads/2371: gdbserver can't step in thread
@ 2007-11-30 14:58 Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2007-11-30 14:58 UTC (permalink / raw)
To: nobody; +Cc: gdb-prs
The following reply was made to PR threads/2371; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@false.org>
To: loic.gautheur@wanadoo.fr
Cc: gdb-gnats@sources.redhat.com
Subject: Re: threads/2371: gdbserver can't step in thread
Date: Fri, 30 Nov 2007 09:52:58 -0500
On Thu, Nov 29, 2007 at 10:16:02AM -0000, loic.gautheur@wanadoo.fr wrote:
> Hi,
> I have a problem using gdbserver 5.3 for debuging multi-threaded
> applications. If I use gdb 5.3 to debug the application everything works.
> my problem is when I put a breakpoint in a thread and the thread encounter the breakpoint the application stops, then i try to STEP to the next line and then if I use gdb the application run ,execute other threads and stop on the next line (normal behaviour )
> but when using gdbserver the application receive a SIGTRAP and stop.
Please try a current version of gdb and gdbserver.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-12-05 13:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-29 10:18 threads/2371: gdbserver can't step in thread loic.gautheur
2007-11-30 14:58 Daniel Jacobowitz
2007-12-05 10:58 Martine GAUTHEUR
2007-12-05 13:50 drow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).