This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: RFA: sol-thread.c: threads in core files
- To: Nick Duffek <nsd at cygnus dot com>
- Subject: Re: RFA: sol-thread.c: threads in core files
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 13 Apr 2000 15:39:53 +1000
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <200004120118.e3C1IYx03766@rtl.cygnus.com>
Nick Duffek wrote:
>
> 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?
Since Michael (the thread expert) came up with the fix, I'd assume he
has already agreed to the commit to both branch and trunk.
Andrew
> 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;