diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-01-04 09:24:27 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-01-04 09:24:27 +0000 |
commit | 0647ed71accf42c3c5ced103217b7f2be053c075 (patch) | |
tree | bd582bc2a0c1676d0f11975125a642578083350d /bfd | |
parent | 3390c393e1e44f529a3fbf5631b8ffbb181e1c21 (diff) | |
download | gdb-0647ed71accf42c3c5ced103217b7f2be053c075.zip gdb-0647ed71accf42c3c5ced103217b7f2be053c075.tar.gz gdb-0647ed71accf42c3c5ced103217b7f2be053c075.tar.bz2 |
* elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elf32-sparc.c | 30 |
2 files changed, 34 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 48a6c8d..2893591 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2004-01-04 Mark Kettenis <kettenis@gnu.org> + + * elf32-sparc.c (elf32_sparc_grok_psinfo): New function. + 2004-01-02 Mark Kettenis <kettenis@gnu.org> * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD. diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c index f77f22c..c20e403 100644 --- a/bfd/elf32-sparc.c +++ b/bfd/elf32-sparc.c @@ -502,6 +502,35 @@ sparc_elf_lox10_reloc (abfd, return bfd_reloc_ok; } +/* Support for core dump NOTE sections. */ + +static bfd_boolean +elf32_sparc_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) +{ + switch (note->descsz) + { + default: + return FALSE; + + case 260: /* Solaris prpsinfo_t. */ + elf_tdata (abfd)->core_program + = _bfd_elfcore_strndup (abfd, note->descdata + 84, 16); + elf_tdata (abfd)->core_command + = _bfd_elfcore_strndup (abfd, note->descdata + 100, 80); + break; + + case 336: /* Solaris psinfo_t. */ + elf_tdata (abfd)->core_program + = _bfd_elfcore_strndup (abfd, note->descdata + 88, 16); + elf_tdata (abfd)->core_command + = _bfd_elfcore_strndup (abfd, note->descdata + 104, 80); + break; + } + + return TRUE; +} + + /* Functions for the SPARC ELF linker. */ /* The name of the dynamic interpreter. This is put in the .interp @@ -3451,6 +3480,7 @@ elf32_sparc_reloc_type_class (rela) elf32_sparc_final_write_processing #define elf_backend_gc_mark_hook elf32_sparc_gc_mark_hook #define elf_backend_gc_sweep_hook elf32_sparc_gc_sweep_hook +#define elf_backend_grok_psinfo elf32_sparc_grok_psinfo #define elf_backend_reloc_type_class elf32_sparc_reloc_type_class #define elf_backend_can_gc_sections 1 |