Re: [PATCH 4/8] bfd/riscv: prepare to handle bare metal core dump creation

Jim Wilson
2020-12-02T23:24:55Z

On Wed, Dec 2, 2020 at 9:39 AM Andrew Burgess <andrew.burgess@embecosm.com>
wrote:

> +/* Write PRSTATUS note into core file. This will be called before the
> + generic code in elf.c. By checking the compiler defines we only
> perform
> + any action here if the generic code would otherwise not be able to help
> + us. The intention is that bare metal core dumps (where the
> prstatus32_t
> + might not be available) will use this code, while non bare metal tools
> + will use the generic elf code. */
>

The reference to prstatus32_t is a little confusing, as that appears to be
an x64_64 specific type. I think that should be prstatus_t.

The function handles both PRSTATUS and PRPSINFO but the comment only
mentions PRSTATUS. Maybe it should mention both?

Otherwise this looks OK to me, with a minor comment clarification.

Jim