This is the mail archive of the
mailing list for the GDB project.
Re: implementation specific registers in elf core files?
- From: John Baldwin <jhb at FreeBSD dot org>
- To: Robert Henry <rrh dot henry at gmail dot com>, gdb at sourceware dot org
- Date: Thu, 31 Jan 2019 08:03:31 -0800
- Subject: Re: implementation specific registers in elf core files?
- References: <CAEYr_8n8XcoNKJzvWYJz9e4miRWKD=enhFgfyDsiPDhAWVf23Q@mail.gmail.com>
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
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.