aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAnton Kolesov <Anton.Kolesov@synopsys.com>2017-05-15 16:17:29 +0300
committerClaudiu Zissulescu <claziss@gmail.com>2020-04-23 11:09:09 +0300
commit2745674244d6aecddcf636475034bdb9c0a6b4a0 (patch)
tree9dccc5b7f4444f1971361691119062f69c24c57c /binutils
parent96038148d0e9f7dc89284310d065e27a3fa375f2 (diff)
downloadgdb-2745674244d6aecddcf636475034bdb9c0a6b4a0.zip
gdb-2745674244d6aecddcf636475034bdb9c0a6b4a0.tar.gz
gdb-2745674244d6aecddcf636475034bdb9c0a6b4a0.tar.bz2
arc: Add support for ARC HS extra registers in core files
When a coredump is generated, there are a few registers in ARC HS that are put under a special section, namely ".reg-v2". It is for backward compatibility reasons with older tools that we have decided not to extend the generic ".reg" section. This patch makes it possible to display the information better regarding that section. Compare the output of "readelf" without and with these changes: $ readelf -n core # without the patch ... LINUX 0x0000000c Unknown note type: (0x00000600) description data: 78 08 00 00 2f 6c 64 2d 75 43 6c 69 $ readelf -n core # with the patch ... LINUX 0x0000000c NT_ARC_V2 (ARC HS accumulator/extra registers) description data: 78 08 00 00 2f 6c 64 2d 75 43 6c 69 In another commit (soon to be submitted), GDB will makes use of these changes to parse the extra section and its registers. bfd/ChangeLog 2020-03-26 Anton Kolesov <anton.kolesov@synopsys.com> * elf-bfd.h (elfcore_write_arc_v2): Add prototype. * elf.c (elfcore_grok_arc_v2): New function. (elfcore_grok_note): Call the new function to handle the corresponding note. (elfcore_write_arc_v2): New function. (elfcore_write_register_note): Call the new function to handle the corresponding pseudo-sections. binutils/ChangeLog 2020-03-26 Anton Kolesov <anton.kolesov@synopsys.com> * readelf.c (get_note_type): Handle NT_ARC_V2. include/elf/ChangeLog 2020-03-26 Anton Kolesov <anton.kolesov@synopsys.com> * common.h (NT_ARC_V2): New macro definitions.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog10
-rw-r--r--binutils/readelf.c2
2 files changed, 12 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 0762611..7f7e340 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,13 @@
+2020-04-23 Anton Kolesov <anton.kolesov@synopsys.com>
+
+ * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
+ * elf.c (elfcore_grok_arc_v2): New function.
+ (elfcore_grok_note): Call the new function to handle the corresponding
+ note.
+ (elfcore_write_arc_v2): New function.
+ (elfcore_write_register_note): Call the new function to handle the
+ corresponding pseudo-sections.
+
2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
PR ld/25861
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 4f80bd9..f3e374d 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -17642,6 +17642,8 @@ get_note_type (Filedata * filedata, unsigned e_type)
return _("NT_ARM_HW_BREAK (AArch hardware breakpoint registers)");
case NT_ARM_HW_WATCH:
return _("NT_ARM_HW_WATCH (AArch hardware watchpoint registers)");
+ case NT_ARC_V2:
+ return _("NT_ARC_V2 (ARC HS accumulator/extra registers)");
case NT_PSTATUS:
return _("NT_PSTATUS (pstatus structure)");
case NT_FPREGS: