diff options
author | Kris Warkentin <kewarken@qnx.com> | 2004-12-22 14:43:44 +0000 |
---|---|---|
committer | Kris Warkentin <kewarken@qnx.com> | 2004-12-22 14:43:44 +0000 |
commit | d69f560c9e32e75dc4e7e9b3e4da3a158f10470c (patch) | |
tree | f783d1a750a34d76040a264f3054f9623f5306bc | |
parent | 750bce0ee10ab816e29d8f01733ad000466181fb (diff) | |
download | gdb-d69f560c9e32e75dc4e7e9b3e4da3a158f10470c.zip gdb-d69f560c9e32e75dc4e7e9b3e4da3a158f10470c.tar.gz gdb-d69f560c9e32e75dc4e7e9b3e4da3a158f10470c.tar.bz2 |
* elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
Add 'base' argument for constructing register sections. Reformat.
(elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
gp and fp regs. Reformat.
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elf.c | 26 |
2 files changed, 24 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0524c5b..f110a23 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2004-12-21 Kris Warkentin <kewarken@qnx.com> + + * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs. + Add 'base' argument for constructing register sections. Reformat. + (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both + gp and fp regs. Reformat. + 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de> * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW. @@ -7382,14 +7382,17 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid) } static bfd_boolean -elfcore_grok_nto_gregs (bfd *abfd, Elf_Internal_Note *note, pid_t tid) +elfcore_grok_nto_regs (bfd *abfd, + Elf_Internal_Note *note, + pid_t tid, + char *base) { char buf[100]; char *name; asection *sect; - /* Make a ".reg/%d" section. */ - sprintf (buf, ".reg/%d", tid); + /* Make a "(base)/%d" section. */ + sprintf (buf, "%s/%d", base, tid); name = bfd_alloc (abfd, strlen (buf) + 1); if (name == NULL) @@ -7407,7 +7410,7 @@ elfcore_grok_nto_gregs (bfd *abfd, Elf_Internal_Note *note, pid_t tid) /* This is the current thread. */ if (elf_tdata (abfd)->core_lwpid == tid) - return elfcore_maybe_make_sect (abfd, ".reg", sect); + return elfcore_maybe_make_sect (abfd, base, sect); return TRUE; } @@ -7427,11 +7430,16 @@ elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note) switch (note->type) { - case BFD_QNT_CORE_INFO: return elfcore_make_note_pseudosection (abfd, ".qnx_core_info", note); - case BFD_QNT_CORE_STATUS: return elfcore_grok_nto_status (abfd, note, &tid); - case BFD_QNT_CORE_GREG: return elfcore_grok_nto_gregs (abfd, note, tid); - case BFD_QNT_CORE_FPREG: return elfcore_grok_prfpreg (abfd, note); - default: return TRUE; + case BFD_QNT_CORE_INFO: + return elfcore_make_note_pseudosection (abfd, ".qnx_core_info", note); + case BFD_QNT_CORE_STATUS: + return elfcore_grok_nto_status (abfd, note, &tid); + case BFD_QNT_CORE_GREG: + return elfcore_grok_nto_regs (abfd, note, tid, ".reg"); + case BFD_QNT_CORE_FPREG: + return elfcore_grok_nto_regs (abfd, note, tid, ".reg2"); + default: + return TRUE; } } |