Re: [PATCH 1/5] gdb/python: handle saving user registers in a frame unwinder

Simon Marchi via Gdb-patches
2021-06-07T18:11:45Z

> Hi,
>
> Actually, this is mentioned in the PEP-8[1][2], which states in the
> “Programming Recommandations” section:
>
> Comparisons to singletons like None should always be done with is or
> is not, never the equality operators.
>
> This leads me to an annex question. Given that I still lack a lot of
> experience with the overall codebase, I tend to pick this kind of small
> stylistic details more easily than design and logic problems. I do not
> always point out those I see when I read the ML, but I can totally
> understand those isolated stylistic comments can be considered as noise.
> If so, please let me know!

I think it's perfectly OK. That's how you begin and then you grow from
there, as your understanding of how things interact in the code base
grows. I am pretty sure the first patches I reviewed were pointing out
small and easy things.

And even if someone has more experience in GDB, they can still learn
from what you mentioned above.

>> $ flake8 testsuite/gdb.python/py-unwind-user-regs.py
>> testsuite/gdb.python/py-unwind-user-regs.py:52:18: E711 comparison to None should be 'if cond is None:'
>> testsuite/gdb.python/py-unwind-user-regs.py:55:17: E711 comparison to None should be 'if cond is None:'
>
> I am currently running the testsuite against a patch that fixes those I
> found. I’ll try to post it later tonight.

Great, thanks!

Simon