Re: [PATCH 1/2] gdb/block: remove block_iterator::d::block, remove union

Simon Marchi
2026-02-06T18:58:19Z

On 2026-02-06 11:45, Tom Tromey wrote:
>>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
>
> Andrew> simon.marchi@polymtl.ca writes:
>>> From: Simon Marchi <simon.marchi@efficios.com>
>>>
>>> The block field is never used. The block is only used to grab a
>>> reference to the mdict, which is stored in the mdict_iterator.
>
> Andrew> Isn't there a contradiction between these two sentences? Either the
> Andrew> block is not used, or it's used to access the mdict?
>
> It's used when initializing the iterator but not afterward, so there's
> no need to store it.
>
> Tom

I can see why that sentence can be confusing. I will clarify that I am
talking about the block parameter vs the block union member.

Simon