title: Debug embedded software (coredump)
body: <p>I'm currently working on an embedded CPU (ARM cortex-M0) on board. I'm experiencing crashes (HardFault) and thus, I'm trying to debug them.</p>
  
  <p>Currently I can get a dump of the memory (I send everything in hex over the printf console, my only access to the memory).</p>
  
  <p>My idea is to load that dump as coredump to gdb and thus being able to debug the program.
  How is it possible to create a "real" coredump file from the raw memory dump, so that I can give it directly to gdb ?</p>
  
  <p>I also tried to run my program in the gdb simulator to use the <code>restore</code> command with my raw memory but I don't understand how to run it. Do you have an idea ?</p>
  
  <p>The main question here is in fact: How to create a coredump file that is compatible with gdb based on the program elf and the raw memory content ?</p>