This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
RFA: sol-thread.c: threads in core files
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: RFA: sol-thread.c: threads in core files
- From: Nick Duffek <nsd at cygnus dot com>
- Date: Tue, 11 Apr 2000 21:18:34 -0400
The appended patch fixes a Solaris bug that prevents GDB from seeing
threads in core files. Credit goes to msnyder for the fix.
No regressions are evident on i386-pc-solaris2.7 or sparc-sun-solaris2.6.
Okay to commit?
Nick
[patch follows]
Index: sol-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/sol-thread.c,v
retrieving revision 1.5
diff -u -r1.5 sol-thread.c
--- sol-thread.c 2000/04/07 17:18:57 1.5
+++ sol-thread.c 2000/04/09 18:08:10
@@ -1632,7 +1632,13 @@
sol_core_ops.to_has_registers = 1;
sol_core_ops.to_has_execution = 0;
sol_core_ops.to_has_thread_control = tc_none;
+ sol_core_ops.to_thread_alive = sol_thread_alive;
sol_core_ops.to_pid_to_str = solaris_pid_to_str;
+ /* On Solaris/x86, when debugging a threaded core file from process <n>,
+ the following causes "info threads" to produce "procfs: couldn't find pid
+ <n> in procinfo list" where <n> is the pid of the process that produced
+ the core file. Disable it for now. */
+ /* sol_core_ops.to_find_new_threads = sol_find_new_threads; */
sol_core_ops.to_sections = 0;
sol_core_ops.to_sections_end = 0;
sol_core_ops.to_magic = OPS_MAGIC;