[lldb-dev] How can I print a register value as NSString

Paul Beusterien paulb at apportable.com
Tue Jan 7 17:04:01 PST 2014


Or use po

*(lldb) **p (char *)object_getClassName($eax)*

(char *) $4 = 0x020255e8 "__NSCFConstantString"

*(lldb) **po $eax*

abc


On Thu, Jan 2, 2014 at 11:14 AM, Greg Clayton <gclayton at apple.com> wrote:

> Yes, it is possible. In the expression parser, all registers are available
> if you prepend the register name with '$'. So as Enrico already suggested,
> you can do:
>
> (lldb) expr (NSString *)$rdx
>
> On Nov 28, 2013, at 2:43 PM, Vincent R. <forumer at smartmobili.com> wrote:
>
> > Hi,
> >
> > I am using xcode5 to debug an application and I would like to know the
> NSstring value stored inside the %rdx register.
> > Is it possible to do that ?
> >
> > Thanks
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140107/cf1c60d6/attachment.html>


More information about the lldb-dev mailing list