Help for debug. for print

Hello,
i’m trying debug with lldb.
Breakpoint rule this.
breakpoint set --method ‘+[NSUUID UUID]’

Breakpoint 2: where = Foundation`+[NSUUID UUID], address = 0x0000000182824360
Process 850 stopped

  • thread #1, queue = ‘com.apple.main-thread’, stop reason = breakpoint 1.1 2.1
    frame #0: 0x0000000182824360 Foundation+[NSUUID UUID] Foundation+[NSUUID UUID]:
    → 0x182824360 <+0>: stp x29, x30, [sp, #-0x10]!
    0x182824364 <+4>: mov x29, sp
    0x182824368 <+8>: adrp x8, 197124
    0x18282436c <+12>: ldr x1, [x8, #0x6d8]

how can i read or print each line ?
i mean
(lldb) p (char *) 0x182824360
(char *) $0 = 0x0000000182824360 “\xfffffffd{\xffffffbf\xffffffa9\xfffffffd\x03”

Thank you for time.

@lolgrep Can you please help with this when you get a chance? Thank you - much appreciated! :]

From here: xcode - LLDB read String - Stack Overflow, credit to Jason Molenda

If you have the address of a c-string in memory, you can use the x/s ADDR command to see it displayed as a string. But in this case you’re using the address of this method as the argument - you will not get a readable string if you print assembly instructions in memory like that. You can see the bytes of each instruction in the method with a command like disassemble -b -f.

If you want to see the source code for the method, you need to have access to the source. Given that this looks like an AppKit method, it’s unlikely that you have access to the source. If you want to inspect or understand what this method is doing, you’ll have to do it at an assembly language level.

This topic was automatically closed after 166 days. New replies are no longer allowed.