implementation specific registers in elf core files?

John Baldwin
Thu Jan 31 16:04:00 GMT 2019

On 1/30/19 8:59 PM, Robert Henry wrote:
> I would like to save implementation specific registers in elf core files,
> and have gdb find and print those registers under the guidance of the
> target description machinery (xml reg specs) described in Appendix G.  Is
> this possible? I would presume the values would end up in an ELF core file
> note, but what would the note's name and type be, and how does it all come
> together?

You would need to define the note type and format.  You would then teach
the note-parsing code in bfd/elf.c to create a pseudosection (look for
elfcore_make_note_pseudosection).  You then add register set descriptions in
the gdb/foo-tdep.c file that find the named notes and hook them into the
callback to parse per-thread register notes.

John Baldwin


More information about the Gdb mailing list