[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 1 16:41:13 PST 2024


jimingham wrote:

I got one bug report - which I can't currently find - from someone who had managed to make a thing this big and we wouldn't print elements out of it correctly.  We didn't do anything about it at the time, it did seem silly.

But it WAS actually silly, at least once.

Jim


> On Mar 1, 2024, at 4:36 PM, Adrian Prantl ***@***.***> wrote:
> 
> 
> Why not increase TypeSystem::GetNumChildren to return a size_t instead?
> 
> We could, but even 2^32 seems like an outrageous amount of children to me. What would be a use-case for this? A ValueObject that has the entire address space as synthetic children?
> 
> There is other code that assumes that we can store the result of GetNumChildren() in an int64 and use negative numbers as out-of-band signaling. We could replace that with std::optional of course.
> 
>> Reply to this email directly, view it on GitHub <https://github.com/llvm/llvm-project/pull/83501#issuecomment-1974134373>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADUPVWZOEMBLVZPRVS4J7ODYWENH3AVCNFSM6AAAAABEAZQRFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZUGEZTIMZXGM>.
> You are receiving this because you are on a team that was mentioned.
> 



https://github.com/llvm/llvm-project/pull/83501


More information about the lldb-commits mailing list