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

Paul Mathieu via Gdb-patches
2020-10-19T15:25:43Z

Hi Simon, thanks for keeping this moving!

> > 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.
>
> Indeed.
>
> One question for you: when making GDB generate the core, I presume it
> would always have a single thread, as when debugging a bare-metal ARM
> processor with GDB, you see a single thread.
>
> Assuming you make that tool to convert a memory dump of a FreeRTOS
> system to a core GDB can read, would you make each FreeRTOS task appear
> as a separate thread in the core?

I assumed that we could use .reg/xxx note sections to dump task
information, haven't tested it though.
That would be something that generate-core would not be able to do
without support for the underlying OS. I imagine that we should be
able to add some fort of support for FreeRTOS?
My target runs RTX5, I'm not sure how widespread it is and if it is
worth adding support for. That said, as long as the core format is
specified and has support for multiple tasks (at least CPU regs),
collecting that information and formatting it shouldn't be too much
trouble on my end.

> Can you and Paul maybe sync up (and with Luis as well, probably) on what
> are the next steps? I think your patch was a great start, but it would
> need to be rebased. You could also look at Paul's patch to see if
> there's anything you'd like to pick from it.

Happy to. The patch that I proposed is quite minimal, the only nice
thing about it is that it builds on top of master.

Paul