diff options
author | Petr Machata <pmachata@redhat.com> | 2012-09-25 01:37:20 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-09-25 01:37:20 +0200 |
commit | 4a97fd95996d54c1b39c0ab56ecfa8b1dcaeb615 (patch) | |
tree | 91a5180d3cb4b9344a10b150d3fee53fb6552a63 /backends | |
parent | ae7c5e791837611da31ff73787e2a7daaef8ec9e (diff) | |
download | elfutils-4a97fd95996d54c1b39c0ab56ecfa8b1dcaeb615.tar.gz |
Add back end code for interpreting NT_ARM_VFP core note.
Signed-off-by: Petr Machata <pmachata@redhat.com>
Diffstat (limited to 'backends')
-rw-r--r-- | backends/ChangeLog | 6 | ||||
-rw-r--r-- | backends/arm_corenote.c | 20 | ||||
-rw-r--r-- | backends/linux-core-note.c | 11 |
3 files changed, 36 insertions, 1 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog index 74c68d40..1842daa6 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,9 @@ +2012-09-24 Petr Machata <pmachata@redhat.com> + + * arm_corenote.c (vfp_items, vfp_regs): New const variables. + (EXTRA_NOTES): Use it for NT_ARM_VFP. + * linux-core-note.c (EXTRA_REGSET_ITEMS): New macro. + 2012-09-17 Petr Machata <pmachata@redhat.com> * arm_corenote.c (FPREGSET_SIZE): Change to 116. diff --git a/backends/arm_corenote.c b/backends/arm_corenote.c index 1bc98cc9..d5279442 100644 --- a/backends/arm_corenote.c +++ b/backends/arm_corenote.c @@ -1,5 +1,5 @@ /* ARM specific core note handling. - Copyright (C) 2009 Red Hat, Inc. + Copyright (C) 2009, 2012 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -73,4 +73,22 @@ static const Ebl_Register_Location fpregset_regs[] = #define TYPE_UID_T ELF_T_HALF #define TYPE_GID_T ELF_T_HALF +#define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) +static const Ebl_Register_Location vfp_regs[] = + { + { .offset = 0, .regno = 256, .count = 32, .bits = 64 }, /* fpregs */ + }; + +static const Ebl_Core_Item vfp_items[] = + { + { + .name = "fpscr", .group = "register", + .offset = 0, + .count = 0, .type = ELF_T_WORD, .format = 'x', + }, + }; + +#define EXTRA_NOTES \ + EXTRA_REGSET_ITEMS (NT_ARM_VFP, ARM_VFPREGS_SIZE, vfp_regs, vfp_items) + #include "linux-core-note.c" diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c index be27468f..15926941 100644 --- a/backends/linux-core-note.c +++ b/backends/linux-core-note.c @@ -252,6 +252,17 @@ EBLHOOK(core_note) (nhdr, name, regs_offset, nregloc, reglocs, nitems, items) *items = NULL; \ return 1; +#define EXTRA_REGSET_ITEMS(type, size, table, extra_items) \ + case type: \ + if (nhdr->n_descsz != size) \ + return 0; \ + *regs_offset = 0; \ + *nregloc = sizeof table / sizeof table[0]; \ + *reglocs = table; \ + *nitems = sizeof extra_items / sizeof extra_items[0]; \ + *items = extra_items; \ + return 1; + #ifdef FPREGSET_SIZE EXTRA_REGSET (NT_FPREGSET, FPREGSET_SIZE, fpregset_regs) #endif |