This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/5] Allow including core items in register sets.


Signed-off-by: Petr Machata <pmachata@redhat.com>
---
 backends/ChangeLog         |    4 ++++
 backends/linux-core-note.c |   11 +++++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/backends/ChangeLog b/backends/ChangeLog
index 74c68d4..0445ce3 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,7 @@
+2012-09-24  Petr Machata  <pmachata@redhat.com>
+
+	* 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/linux-core-note.c b/backends/linux-core-note.c
index be27468..1592694 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
-- 
1.7.6.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]