[PATCH] gdb: add support for handling core dumps on arm-none-eabi

Fredrik Hederstierna via Gdb-patches
2020-10-17T00:02:07Z

Hi

I saw that recently there was new interest of corefile support for arm-none-eabi.

In the past I have tried to raise interest of this several times, but with limited success unfortunately,
so I am happy that possible there could be an opening to get this support into GDB,
and I would like to take to opportunity to also try push some more for GDB maintainers to try get support for this very useful feature.

I already tried to push in the past for my own patch that also support eg floating-point support, and gcore etc.
The patch is using linux core file format as starting point but has stripped out Linux specific parts.

See
https://sourceware.org/bugzilla/show_bug.cgi?id=14383

The GDB verision at the time was GDB-7.11.1 so it may be out-of-date.
(The post in mail-thread: https://sourceware.org/pipermail/gdb/2014-September/044559.html)

If there is interest of adding this feature now, I could also try help to get this feature into GDB.

I also believe that there is some need to 'formalize' the format, and my best idea so far is to try adding corefile to some popular 'bare metal' target RTOS.
I've been thinking of defining a format for FreeRTOS, but basically being a bare-metal target.

The idea then is to have some PC host supporting tool to convert/generate corefiles from some custom memory dump formats.
The FreeRTOS (or any other bare-metal alike OS) could maintain this supporting tool.

Here is one example what I investigated, a similar PC host conversion app that could possibly be basis of such tool, example:
https://github.com/rogercollins/bare_core

I think next step is to define/decide a format that would be accepted by GDB maintainers, eg FreeRTOS-bare-metal or something,
then work in parallel with some supporting host PC tool, but maybe this should not be part of GDB itself?
Any comments or ideas are most welcome!

Thanks, Kindly,
Fredrik Hederstierna