public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* implementation specific registers in elf core files?
@ 2019-01-31  4:59 Robert Henry
  2019-01-31 16:04 ` John Baldwin
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Henry @ 2019-01-31  4:59 UTC (permalink / raw)
  To: gdb

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?

I suspect gdb has most of this already, since the gdb server can send
upstream the xml data, and also the value of the registers, and it somehow
comes together.  (I have no practical experience with this.)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: implementation specific registers in elf core files?
  2019-01-31  4:59 implementation specific registers in elf core files? Robert Henry
@ 2019-01-31 16:04 ` John Baldwin
  0 siblings, 0 replies; 2+ messages in thread
From: John Baldwin @ 2019-01-31 16:04 UTC (permalink / raw)
  To: Robert Henry, gdb

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

                                                                            

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-31 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31  4:59 implementation specific registers in elf core files? Robert Henry
2019-01-31 16:04 ` John Baldwin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).