Search code examples
assemblylldb

how to print on lldb an assembly global string variable


I'm playing around with Assembly and I'm trying to print dst and src define like this:

.section __DATA,__data
  src:
        .string "hey Hello"
  dst:
        .space 20

p src outputs in HEX, but what I really want is printing the ASCII chars for a proper debugging:

(lldb) p src
(void *) $3 = 0x4141414141414141

Solution

  • Try x/s &src.

    (lldb) x/s &src
    0x00004010: "Hello"