yhara.jp

Recent Posts

LLDBチートシート

Tech

起動

lldb ./a.out

-oを付けると起動と同時にコマンドを打てる

lldb -o run -o bt a.sk.out

レジスタの値を見る

(lldb) register read  または、re r
General Purpose Registers:
       rax = 0x00000001004711b0
       rbx = 0x0000000000000000
       rcx = 0x0000000100472e40
       rdx = 0x0000000100475ba0
       rdi = 0x000000000000000f
       rsi = 0x00000001004711b0
       rbp = 0x00007ffeefbfeee0
       rsp = 0x00007ffeefbfee50
        r8 = 0x0000000100165060  a.debug.out`shiika_vtable_String
        r9 = 0x0000000100164e01  a.debug.out`shiika_vtable_Fn4 + 193
       r10 = 0x00000001001483a8  a.debug.out`str.1 + 2648
       r11 = 0xfffffffffffffff0
       r12 = 0x0000000000000000
       r13 = 0x0000000000000000
       r14 = 0x0000000000000000
       r15 = 0x0000000000000000
       rip = 0x0000000100122db1  a.debug.out`lambda_1_in_toplevel + 65
    rflags = 0x0000000000000206
        cs = 0x000000000000002b
        fs = 0x0000000000000000
        gs = 0x0000000000000000

re r --allで全部のレジスタ

メモリの値を見る

rspが0x00007ffeefbfee50だとして、そこから先を見てみる

(lldb) memory read --size 8 --format x --count 4 0x00007ffeefbfee50
0x7ffeefbfee50: 0x00007ffeefbfef28 0x000000000000000f
0x7ffeefbfee60: 0x00000001004711b0 0x00000001000343fd

8バイトずつ、16進数で4個取り出した。それぞれrsp+0x0, rsp+0x8, rsp+0x10, rsp+0x18ということ。

More posts

Posts

(more...)

Articles

(more...)

Category

Ads

About

About the author