How can I print a register value as NSString

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

Wouldn’t

(lldb) expr (NSString*)$rdx

Do it?

Enrico Granata <egranata@🍎.com>

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

Or use po

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

(char *) $4 = 0x020255e8 “__NSCFConstantString”

(lldb) po $eax

abc