[PATCH 18/30] Add new classes that model DWARF stack element
Zoran Zaric
Zoran.Zaric@amd.com
Tue Feb 23 14:57:39 GMT 2021
>
>>
>> Maybe you should just be using shared_ptr anyway.
>
> I really need to make another pass and make everything work with
> shared_ptr. The reason why I didn't do that in the first place was
> because I didn't notice smart pointers being used a lot around the code
> and even less so in the code that I was replacing.
In the new patch set, the implementation is now completely changed to
use shared pointers.
>
>> Though to reiterate:
>>
>> Tom> It would still be good to understand why reference counting is
>> needed
>> Tom> here though. That part still doesn't make sense to me.
>>
>> thanks,
>> Tom
>>
>
> The reference counting is there because in the extensions that we are
> proposing there is a concept of nested composites and composites that
> are not completed.
>
After the shared pointers switch, the only part that still uses the
reference counting is the closure class for the computed struct value
object support.
Unfortunately, this cant be changed without a bigger change of how those
computed struct value callbacks work and I feel that is outside of the
scope of this patch set.
Zoran
More information about the Gdb-patches
mailing list