This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Simple suggestion to get basic core-file alike functionality for bare-metal targets
- From: Fredrik Hederstierna <fredrik dot hederstierna at securitas-direct dot com>
- To: gdb at sourceware dot org
- Date: Mon, 4 Jun 2012 11:32:55 +0200
- Subject: Simple suggestion to get basic core-file alike functionality for bare-metal targets
- References:
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