public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Simple suggestion to get basic core-file alike functionality for bare-metal targets
@ 2012-06-04  9:33 Fredrik Hederstierna
  2012-06-06 18:19 ` Tom Tromey
  2012-06-07  7:31 ` Fredrik Hederstierna
  0 siblings, 2 replies; 3+ messages in thread
From: Fredrik Hederstierna @ 2012-06-04  9:33 UTC (permalink / raw)
  To: gdb

When debugging with bare-metal targets often core-file alike support would be nice.
Though many targets lack core-file support.

If GDB is connected you could eg. store RAM using

  dump memory filename.bin start_addr end_addr
  restore filename.bin binary start_addr

then save registers by hand to save 'basic' core-file data.

Wouldn't it be great to

1. Have similar command to dump also all registers / CPU-states to file?
   Eg. dump registers filename.reg
   Then be able to restore them
   restore filename.reg registers

2. Perhaps have a generic 'core-light-file' format.
   This could contain memory + registers (+ maybe more basic CPU states)?

Note though, that the dump files needs to be generated by debugged code itself,
if running without connection to GDB. This to examine eg. crashes off-line later.
The point is to get some kind of standard format and to ease the restoring of registers etc.

I can consider to look into adding the dump-register command and put some own time into this,
if the community think its a good idea?

Thanks and Best Regards
Fredrik

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

end of thread, other threads:[~2012-06-07  7:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-04  9:33 Simple suggestion to get basic core-file alike functionality for bare-metal targets Fredrik Hederstierna
2012-06-06 18:19 ` Tom Tromey
2012-06-07  7:31 ` Fredrik Hederstierna

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).