Re: [PATCH 2/2] gdb/gdbarch: compare some fields against 0 verify_gdbarch

Andrew Burgess via Gdb-patches
2022-03-14T14:10:46Z

Tom Tromey <tom@tromey.com> writes:

>>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Andrew> The comment at the top of gdbarch-components.py tries to explain how
> Andrew> the validation is done. I didn't understand this comment completely,
> Andrew> but, I think this final sentence:
>
> I wrote it and now I don't really understand it either.
> I guess I wasn't being as clear as I thought I was.
>
> Andrew> 1. Handle the case where the 'invalid' field of a property is set to
> Andrew> True, this should perform a check for the field of gdbarch still
> Andrew> being set to 0, and
>
> Andrew> 2. If the if/else series that generates verify_gdbarch doesn't handle
> Andrew> a property then we should raise an exception. This means that if a
> Andrew> property is added which isn't handled, we should no longer silently
> Andrew> ignore it.
>
> Looks good.

Thanks, I pushed both these patches.

Andrew