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

Paul Mathieu via Gdb-patches
2020-10-04T17:30:43Z

Cc'ing Robin, the original author of the patch, who can maybe help us
answer a couple questions.

> > Ok, so that answers the question in my other email, about which tool
> > produces this format of core. The answer is this specific python
> > script, and the format is "Paul's ARM core format" :).
>
> It was some team work between what gdb understood "natively" and what
> the patch does.
> More specifically, this patch only seems to tell gdb to get the
> registers from the core file the way it would normally do, and then
> supply them almost verbatim to the regcache.
> The struct for these registers is nothing special either, you can find
> it in the kernel code as well:
> https://elixir.bootlin.com/linux/latest/source/arch/arm/include/uapi/asm/ptrace.h#L135
>
>
> > I don't know what Luis thinks about this, but I would be a bit hesitant
> > to add support in GDB for a core format that's not standard nor the
> > output of some "well-known" tool (which would be a de facto standard).
> >
> > Is there a format that already exists in the ARM ecosystem for core
> > dumps of bare-metal systems, we could base our stuff on?
>
> I'm not aware of anything that does that. There are tools that generate
> memory dumps and CPU register dumps into their own proprietary format,
> but nothing that I know that you could call a 'core file'.
>
> Are there other tools besides gdb that deal with core dumps? Maybe that
> could help me find other formats.
>
> That being said, the format used here is "well-known" in the sense that
> it's the exact same format the linux kernel would use to dump cores on
> arm-linux-*

Robin, what was the format you used for your core dumps? Did you use a
tool that's already out there?