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

Tom Tromey
2022-03-10T17:09:56Z

>>>>> "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,
Tom