[lldb-dev] SBValue::GetName returns wrong result?
Alexander Polyakov via lldb-dev
lldb-dev at lists.llvm.org
Mon Apr 1 15:16:03 PDT 2019
I can't say that it's a problem, I just want to know what is the actual
reason of such a behavior to find good workaround.
I have a SBValue with a pointer to some object, e.g. "(uint32_t *) sp",
when I do dereference it, I get another SBValue - "(uint32_t) *sp". The
only way to deal with it that I see is to check the first symbol of name
and erase it if it's equal to *.
I'm facing with that situation when creating an object from a pointer via
SBTarget::CreateValueFromExpression.
On Mon, Apr 1, 2019 at 9:35 PM Jim Ingham <jingham at apple.com> wrote:
> Dereference returns another SBValue distinct from the initial one, so it
> needs to make up a name for it. I think it would be confusing for it to
> return the same name, and putting a * at the beginning of the initial
> SBValue seems as good a choice as any.
>
> Is this causing you some concrete problem?
>
> Jim
>
>
> > On Mar 30, 2019, at 11:18 AM, Alexander Polyakov via lldb-dev <
> lldb-dev at lists.llvm.org> wrote:
> >
> > Hi lldb-dev,
> >
> > I have a SBValue created via
> SBTarget.CreateValueFromExpression('some_name', expr).
> > If the expression looks like '(some_type *) addr', then GetName returns
> 'some_name' as expected, but when I do Dereference this value, GetName
> returns '*some_name'.
> >
> > So, is it a conventional behavior of the GetName method applied to
> dereferenced SBValue?
> >
> > --
> > Alexander
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>
--
Alexander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190402/e73ada13/attachment.html>
More information about the lldb-dev
mailing list