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: huge remote debug traffic with multi-thread program


>>>>> On Wed, 16 Feb 2005 11:59:09 -0500, Daniel Jacobowitz <drow@false.org> said:
drow> The normal cause of this sort of problem is GDB's lame software
drow> single-step support.  You have two threads iterating in the same
drow> piece of code, and probably GDB is continually getting a trap
drow> from the wrong one.  Or it may get confused about where it has
drow> put the breakpoint.

Thanks for your suggestion.  It looks latter.

drow> Does the problem go away if each thread is in a separate
drow> identical copy of the function?

No, this problem still remains if each thread have its own function.

Looking the log, gdbserver keep getting SIGTRAP on 0x00404a78
(__pthread_wait_for_restart_signal+132).  This is a return address
from __pthread_sigsuspend() which is a stopping place of SIGINT
(Ctrl-C).  I'm wondering why gdb set breakpoint to the return address
of __pthread_sigsuspend() ...


--- excerpt from hostlog-join.txt ---
remote_interrupt called
remote_stop called
Packet received: T0225:00404e18;1d:7fff7a08;thread:4000;

Program received signal SIGINT, Interrupt.
...
Sending packet: $g#67...Ack
Packet received: 0000000010005e18000000047fffffff7fff7a20000000100000000100000001000000018678e008ffffffff00200200001001000000ffff87ff5e74ffffffff1000006010008dc07f7ffbe000004002000000007fff7e04ffffffff000000000000000100404e0000000000000000001000d1507fff7a087fff7b9000404a78000000000000070800001c20004093d01000002000404e18ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000002d30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000	# pc=0x00404e18, ra=0x00404a78
...
0x00404e18 in __pthread_sigsuspend (set=0x7fff7a20)
    at ../linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c:54
54	../linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c: No such file or directory.
	in ../linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c
Current language:  auto; currently c
(gdb) c
Continuing.
...
Sending packet: $m404a78,4#35...Ack
Packet received: 8fbc0010
Sending packet: $M404a78,4:0005000d#08...Ack	# set breakpoint on 0x00404a78

---
Atsushi Nemoto


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