threads/1937: gdb 6.2/3 does not properly support threads on Solaris10
Tue May 3 16:48:00 GMT 2005

>Number:         1937
>Category:       threads
>Synopsis:       gdb 6.2/3 does not properly support threads on Solaris10
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue May 03 16:48:01 UTC 2005
>Originator:     Drew Johnson
>Release:        6.2
Solaris 10
 I have gone through the process of getting 6.2 working in a Solaris10 environment.  The changes I had to make were limited to 1 source file (gdb/procfs.c), and config.h (to turn on NEW_PROC_API).  Here were the problems.  First, I tried to build 6.3 on Solaris10.  This will not build when you have the latest ncurses (5.4) installed on your system, due to some definitions in ncurses/ncurses.h.  Version 6.2 compiled OK on Solaris10, but the configure script does not select the right debugging interface.  Because sys/procfs.h #includes sys/old_procfs.h, there is still a definition of PIOCLSTATUS, which causes gdb to build using the deprecated ioctl interface to process access.  I undefined this in procfs.c, and got NEW_PROC_API from config.h to make gdb 6.2 build with the /proc interface, which has been standard in Solaris for the last 4 releases.  I also had to modify the lwp access portions of the file, as they always referred to the ‘associated thread’ value of the main process, rather than the lwpstatus file of the individual lwp.  Once I changed these things, the debugger was able to perform a successful ‘info threads’, and was able to switch between threads to see thread stack traces.  This is not possible using the default procfs.c
run gdb on a program with threads and type 'info threads'
Modified gdb/procfs.c to properly handle /proc lwp interface.  Hand-modified config.h to turn on NEW_PROC_API (this should be turned on automatically by configure, but I don't know how).

More information about the Gdb-prs mailing list