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

Simon Marchi
2020-10-23T00:37:43Z

On 2020-10-22 6:32 p.m., Fredrik Hederstierna via Gdb-patches wrote:
>> From: Simon Marchi <simark@simark.ca>
>> Sent: Thursday, October 22, 2020 3:49 AM
>> I've rebased your patch on top of master and made the necessary changes
>> to make it build (the equivalent changes that I did to linux-tdep.c and
>> fbsd-tdep.c).
>>
>> You can find it on the users/simark/arm-none-core-file branch upstream:
>
> Looks great, thanks Simon, I have no futher changes to be made,
> what is next step, are we near for this to being mergable?
> The features regarding eg FreeRTOS could be added later on top of this I guess.
> The format of the corefile right now is exactly as Linux, minus all '*ix' stuff,
> only threads, registers and memory I think. What is next step on this?

On my side, from the comments I gave earlier and other observations:

- there area clearly some unnecessary includes, cut it down to what's
necessary
- don't put things in the header file if they are only used in the
source file (the macros in arm-none-tdep.h, for example)
- none_init_corefile has an unused parameter
- some unnecessary forward declarations here and there
- is the handling of inferior arguments relevant for bare-metal?
- if it works with the GDB simulator (target sim), I'd really like if we
could have a test for this: generate a core, read it back, make sure
you can print stuff

Luis and Alan (both GDB ARM maintainers) also expressed the desire to
have the format documented. Alan suggested a section in the GDB manual,
in the ARM-specific section. I think it is a good idea. This is
important, so we have something to point to when people ask "what format
should I generate so GDB can read it".

Simon