Re: [PATCH v3] Add SVR4 psABI specific parser for AUXV entries

Simon Marchi
2020-04-09T01:00:02Z

On 2020-04-08 8:56 p.m., Kamil Rytarowski wrote:
> NetBSD and OpenBSD always use an int to store the type as
> defined in the SVR4 psABI specifications rather than long
> as assumed by the default parser.
>
> Define svr4_auxv_parse() that shares code with default_auxv_parse().
>
> Remove obsd_auxv_parse() and switch OpenBSD to svr4_auxv_parse().
> Remove not fully accurate comment from obsd-tdep.c.
>
> Use svr4_auxv_parse() on NetBSD.
>
> gdb/ChangeLog:
>
> * auxv.h (svr4_auxv_parse): New.
> * auxv.c (default_auxv_parse): Split into default_auxv_parse
> and generic_auxv_parse.
> (svr4_auxv_parse): Add.
> * obsd-tdep.c: Include "auxv.h".
> (obsd_auxv_parse): Remove.
> (obsd_init_abi): Remove comment.
> (obsd_init_abi): Change set_gdbarch_auxv_parse passed argument
> from `obsd_auxv_parse' to `svr4_auxv_parse'.
> * nbsd-tdep.c: Include "auxv.h".
> (nbsd_init_abi): Call set_gdbarch_auxv_parse.
>

Thanks, this is ok.

Simon