x86_64 calling conventions and stack frames

前端 未结 4 1030
轻奢々
轻奢々 2021-02-07 17:36

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 18:05

    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.

提交回复
热议问题