Re: Postmortem debugging with arm-none-eabi-gdb from memory dump (not core)

Yao Qi <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <20171013201955.GK8425@1170ee0b50d5>
On 17-10-05 05:55:38, Hesham M wrote:
> Hi all,
> 
> As this is my first email to the list, and as an old user for gdb, I'd like
> first to thank the gdb community for their effort.
> 
> In a bare-metal ARM system, is there a way to use arm-none-eabi-gdb for
> postmortem debugging, the same way we do when we debug with core file on
> Linux, for example?
> 
> The issue is that I don't have a "core" file but I can generate memory dump
> of the whole memory (ROM is already known and through the hardware debugger
> used I can write the RAM contents to a file (outside the target of course).
> I can also collect the registers at the time of the crash. I can do the
> debugging/analysis if I connect gdb to the target at the time of the crash
> but I need to do this in later time away from the target. I hope to find a
> way to debug with memory dumps the same way gdb debugs with core files.
> 
> Of course if I can convert the memory dump to a valid core file, it might
> be another path to the solution. I don't know how to do that or if there is
> a tool that can help with this conversion.
> 
> Any idea if this is possible?

I prefer this approach, and it is possible.  GDB has a command "gcore",
https://sourceware.org/gdb/current/onlinedocs/gdb/Core-File-Generation.html#index-generate_002dcore_002dfile
you can take a loop how GDB does it.

> 
> A variant of this is idea is done for Keil tools:
> https://os.mbed.com/blog/entry/Post-mortem-debugging-with-ARM-mbed/
> 
> I have posted a similar question on stackoverflow but they closed it! So,
> please let me know if my question isn't clear.
> 
> Thanks,
> -Hesham

-- 
Yao (齐尧)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.