This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] Put a NT_PSTATUS note on solaris cores.
> 2012-12-10 Pedro Alves <pedro@codesourcery.com>
>
> gdb/
> * procfs.c (procfs_make_note_section): Always output a NT_PSTATUS
> note when NEW_PROC_API is defined.
Tested on sparc-solaris, but it seems to have no effect yet:
(gdb) core core.10498
[New LWP 1]
Core was generated by `/[...]/simple_main'.
Program terminated with signal 5, Trace/breakpoint trap.
#0 simple_main () at simple_main.adb:4
4 simple.test_simple;
(gdb) info inferiors
Num Description Executable
* 1 LWP 0 /[...]/simple_main
And after the patch:
(gdb) core core.15731
[New LWP 1]
Core was generated by `/[...]/simple_main'.
Program terminated with signal 5, Trace/breakpoint trap.
#0 simple_main () at simple_main.adb:4
4 simple.test_simple;
(gdb) info inferiors
Num Description Executable
* 1 LWP 0 /[...]/simple_main
I can see that the second core file is bigger, but I am lacking
the time to investigate this further at the moment. Maybe I am
doing the wrong test?
> ---
> gdb/procfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/procfs.c b/gdb/procfs.c
> index 82c7cd0..da5e158 100644
> --- a/gdb/procfs.c
> +++ b/gdb/procfs.c
> @@ -5544,7 +5544,7 @@ procfs_make_note_section (bfd *obfd, int *note_size)
>
> stop_signal = find_stop_signal ();
>
> -#ifdef UNIXWARE
> +#ifdef NEW_PROC_API
> fill_gregset (get_current_regcache (), &gregs, -1);
> note_data = elfcore_write_pstatus (obfd, note_data, note_size,
> PIDGET (inferior_ptid),
--
Joel