[Bug 66115] attach to multithreaded process does not show threads in Frame Stack

Chris Halls halls at debian.org
Fri Oct 17 11:13:06 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=66115     




------- Additional Comments From halls at debian.org  2003-10-17 11:12 -------
Yes, you're right - my description of the problem was wrong.  I was debugging an internal program at the time which is why I didn't post the log in the report.  But I can reproduce the problem by attaching to openoffice in the debugger too, so here's how to reproduce:

- Start openoffice
- Open kdevelop and choose attach to process.
- Look at Frame Stack - only one thread is shown, but there should be several.

This is the kdevelop gdb window contents:

/bin/sh -c /home/challs/dev/prjatm/services/model/comms/libtool gdb  -fullname -nx -quiet
(gdb) set edit off 
(gdb) set confirm off 
(gdb) (gdb) 
(gdb) set print static-members off 
(gdb) tty /dev/pts/1 
(gdb) set width 0 
(gdb) set height 0 
(gdb) set stop-on 1 
(gdb) handle SIG32 pass nostop noprint 
(gdb) handle SIG43 pass nostop noprint 
(gdb) set print asm-demangle on 
(gdb) cd /home/challs/dev/prjatm/services/model/comms/modelsrv 
(gdb) attach 13456 
(gdb) backtrace 
(no debugging symbols found)... [repeated lots of times, deleted]
[New Thread 16384 (LWP 11803)]
[New Thread 32769 (LWP 12502)]
[New Thread 16386 (LWP 12503)]
[New Thread 32771 (LWP 12592)]
[New Thread 49156 (LWP 12596)]
[New Thread 65541 (LWP 13456)]
(no debugging symbols found)... [multiple times]
0x410e6666 in poll () from /lib/libc.so.6
#0  0x410e6666 in poll () from /lib/libc.so.6
#1  0x44fd42d5 in ?? () from /usr/lib/openoffice/program/libdtransX11645li.so
#2  0x44fd4433 in ?? () from /usr/lib/openoffice/program/libdtransX11645li.so
#3  0x4136631b in osl_getTextEncodingFromLocale () from /usr/lib/openoffice/program/libsal.so.3
#4  0x4114cc00 in pthread_start_thread () from /lib/libpthread.so.0
#5  0x410eeae7 in clone () from /lib/libc.so.6
(gdb) frame 0 
#0  0x410e6666 in poll () from /lib/libc.so.6
(gdb) frame 5 
#5  0x410eeae7 in clone () from /lib/libc.so.6
(gdb) frame 0 
#0  0x410e6666 in poll () from /lib/libc.so.6

The Frame Stack window should at this point be displaying all of the threads, but it only shows the one that gdb displayed in the 'backtrace' output.  Kdevelop did not switch on s_viewThreads and send an 'info threads' request.

With the patch applied, this happens:

/bin/sh -c /home/challs/dev/prjatm/services/model/comms/libtool gdb  -fullname -nx -quiet
(gdb) set edit off 
(gdb) set confirm off 
(gdb) 
(gdb) 
(gdb) set print static-members off 
(gdb) tty /dev/pts/9 
(gdb) set width 0 
(gdb) set height 0 
(gdb) set stop-on 1 
(gdb) handle SIG32 pass nostop noprint 
(gdb) handle SIG43 pass nostop noprint 
(gdb) set print asm-demangle on 
(gdb) cd /home/challs/dev/prjatm/services/model/comms/modelsrv 
(gdb) attach 12596 
(gdb) backtrace 
(no debugging symbols found)...
[New Thread 16384 (LWP 11803)]
[New Thread 32769 (LWP 12502)]
[New Thread 16386 (LWP 12503)]
[New Thread 32771 (LWP 12592)]
[New Thread 49156 (LWP 12596)]
[New Thread 65541 (LWP 13456)]
(no debugging symbols found)...
0x410e6666 in poll () from /lib/libc.so.6
#0  0x410e6666 in poll () from /lib/libc.so.6
#1  0x425bb3f5 in ICEConnectionWorker () from /usr/lib/openoffice/program/libvcl645li.so
#2  0x4136631b in osl_getTextEncodingFromLocale () from /usr/lib/openoffice/program/libsal.so.3
#3  0x4114cc00 in pthread_start_thread () from /lib/libpthread.so.0
#4  0x410eeae7 in clone () from /lib/libc.so.6
(gdb) info thread 
  6 Thread 65541 (LWP 13456)  0x410e6666 in poll () from /lib/libc.so.6
  5 Thread 49156 (LWP 12596)  0x410e6666 in poll () from /lib/libc.so.6
  4 Thread 32771 (LWP 12592)  0x411532c6 in nanosleep () from /lib/libpthread.so.0
  3 Thread 16386 (LWP 12503)  0x41152cf8 in accept () from /lib/libpthread.so.0
  2 Thread 32769 (LWP 12502)  0x410e6666 in poll () from /lib/libc.so.6
  1 Thread 16384 (LWP 11803)  0x410e8551 in select () from /lib/libc.so.6
(gdb) frame 0 
#0  0x410e6666 in poll () from /lib/libc.so.6

Note the new 'info thread'.  And kdevelop shows all the threads.

I hope that description is a little clearer :)




More information about the KDevelop-devel mailing list