This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Simple suggestion to get basic core-file alike functionality for bare-metal targets


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]