[lldb-dev] parent is NULL error
gclayton at apple.com
Wed Nov 23 11:34:31 CST 2011
You can check if a value is a pointer using:
If you are using a more up to date LLDB that ha
Then you can check the pointer value to see if you really want to show the children. We will always return the number of children that a SBValue's type has even if the value is invalid because you might have expanded a pointer value before and the UI is remembering a user expansion state. The latest LLDB's also have a "get value as unsigned" convenience function:
so you could do something like:
if (value.TypeIsPointerType() && value.GetValueAsUnsigned() == 0)
// NULL pointer....
On Nov 22, 2011, at 2:34 PM, Andrey Zaytsev wrote:
> I'm always getting this error when trying to expand children of NULL pointer. But SBValue::GetChildrenCount() doesn't return zero.
> It produces some trouble in our frontend: we are trying to be lazy and not discover value's children when it's not needed by user explicitly but we indicate that children are present since GetChildrenCount() != 0. Any workaround maybe?
> Andrey Zaytsev
> Software Developer at JetBrains, Inc
> Develop with pleasure!
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
More information about the lldb-dev