diff options
author | sergiodj <sergiodj> | 2013-02-04 18:26:30 +0000 |
---|---|---|
committer | sergiodj <sergiodj> | 2013-02-04 18:26:30 +0000 |
commit | 8600d0076846de363e7a4a545b7b0a236ea9a8be (patch) | |
tree | 30b8320073ce805fe1ef50fdb706c4018e92a73b /bfd/elf.c | |
parent | e93f668f079ff75ae8adabfd7701c2dde6f11d81 (diff) | |
download | gdb-8600d0076846de363e7a4a545b7b0a236ea9a8be.tar.gz |
2013-02-04 Sergio Durigan Junior <sergiodj@redhat.com>
Pedro Alves <palves@redhat.com>
* Makefile.in (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
* elf-bfd.h (elf_internal_linux_prpsinfo): New structure
declaration.
(elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64)
(elfcore_write_ppc32_linux_prpsinfo32): New declarations.
* elf-linux-psinfo.h: New file.
* elf.c: Include elf-linux-psinfo.h.
(elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64):
New functions.
* elf32-ppc.c: Include `elf-linux-psinfo.h'.
(elf_external_ppc_linux_prpsinfo32): New structure declaration.
(PPC_LINUX_PRPSINFO32_SWAP_FIELDS): New macro.
(elfcore_write_ppc_linux_prpsinfo32): New function.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c index 9cd3542f568..7ab3683dc7a 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -45,6 +45,7 @@ SECTION #include "elf-bfd.h" #include "libiberty.h" #include "safe-ctype.h" +#include "elf-linux-psinfo.h" #ifdef CORE_HEADER #include CORE_HEADER @@ -9159,6 +9160,34 @@ elfcore_write_prpsinfo (bfd *abfd, } char * +elfcore_write_linux_prpsinfo32 + (bfd *abfd, char *buf, int *bufsiz, + const struct elf_internal_linux_prpsinfo *prpsinfo) +{ + struct elf_external_linux_prpsinfo32 data; + + memset (&data, 0, sizeof (data)); + LINUX_PRPSINFO32_SWAP_FIELDS (abfd, prpsinfo, data); + + return elfcore_write_note (abfd, buf, bufsiz, "CORE", NT_PRPSINFO, + &data, sizeof (data)); +} + +char * +elfcore_write_linux_prpsinfo64 + (bfd *abfd, char *buf, int *bufsiz, + const struct elf_internal_linux_prpsinfo *prpsinfo) +{ + struct elf_external_linux_prpsinfo64 data; + + memset (&data, 0, sizeof (data)); + LINUX_PRPSINFO64_SWAP_FIELDS (abfd, prpsinfo, data); + + return elfcore_write_note (abfd, buf, bufsiz, + "CORE", NT_PRPSINFO, &data, sizeof (data)); +} + +char * elfcore_write_prstatus (bfd *abfd, char *buf, int *bufsiz, |