Sunday 15 April 2012

GDB: What is the purpose of #'s in assembly output? -



GDB: What is the purpose of #'s in assembly output? -

while attempting play around gdb, noticed assembly instructions suffixed #(hex). here example:

0x7ffff1f0f0d6 <inflate+5158> mov %rax,0x18(%r13) 0x7ffff1f0f0da <inflate+5162> jmpq 0x7ffff1f0e3bf <inflate+1807> 0x7ffff1f0f0df <inflate+5167> lea 0x7bca(%rip),%rsi # 0x7ffff1f16cb0 0x7ffff1f0f0e6 <inflate+5174> movl $0x1d,0x0(%r13) 0x7ffff1f0f0ee <inflate+5182> mov %rsi,0x30(%rbp)

what meaning of part says # 0xfffff1f16cb0? looks comment of kind, info trying convey?

extra information: disassembly of x86_64 application without debugging symbols.

that friendly service disassembler, not there in machine code. gdb calculates actual address you, don't have manually. in illustration 0x7bca(%rip) value of %rip 0x7ffff1f0f0e6 (the address of next instruction) , adding 0x7bca gives 0x7ffff1f16cb0 value printed.

assembly gdb

No comments:

Post a Comment