x86_64 calling conventions and stack frames

前端 未结 4 1476
孤独总比滥情好
孤独总比滥情好 2021-02-07 17:21

I am trying to make sense out of the executable code that GCC (4.4.3) is generating for an x86_64 machine running under Ubuntu Linux. In particular, I don\'t understand how the

4条回答
  •  独厮守ぢ
    2021-02-07 17:56

    GDB uses the DWARF CFI for unwinding. For unstripped binaries compiled with -g, this will be in the .debug_info section. For stripped x86-64 binaries, there's unwind info in the .eh_frame section. This is defined in the x86-64 ABI, section 3.7, page 56. Handling this info yourself is pretty hard, since parsing DWARF is very involved, but I believe libunwind contains support for it.

提交回复
热议问题