dwarf-assembly/src
Théophile Bastian 6854eb56e4 [BREAKING CHANGE] Unwinding stops at the end
This introduces a breaking change: [undefined] was previously
represented by 0, and is now represented by
`numeric_limits<uintptr_t>::max()`
2018-05-16 16:51:01 +02:00
..
.gitignore Refactor code generation: use shared/context_struct.h 2018-04-25 18:11:59 +02:00
CodeGenerator.cpp [BREAKING CHANGE] Unwinding stops at the end 2018-05-16 16:51:01 +02:00
CodeGenerator.hpp Fix various problems in PC list handling 2018-05-11 15:52:38 +02:00
DwarfReader.cpp eh_elf generator: now also producing global switch 2018-05-02 14:58:48 +02:00
DwarfReader.hpp SimpleDwarf, DwarfReader: fix machine registers 2018-04-23 16:46:03 +02:00
main.cpp Fix various problems in PC list handling 2018-05-11 15:52:38 +02:00
Makefile Add C++ code to make use of .pc_list 2018-05-11 13:09:35 +02:00
PcListReader.cpp Fix various problems in PC list handling 2018-05-11 15:52:38 +02:00
PcListReader.hpp Fix various problems in PC list handling 2018-05-11 15:52:38 +02:00
README.md Add READMEs 2018-05-15 18:13:09 +02:00
settings.cpp Add C++ code to make use of .pc_list 2018-05-11 13:09:35 +02:00
settings.hpp Add C++ code to make use of .pc_list 2018-05-11 13:09:35 +02:00
SimpleDwarf.cpp SimpleDwarf, DwarfReader: fix machine registers 2018-04-23 16:46:03 +02:00
SimpleDwarf.hpp eh_elf generator: now also producing global switch 2018-05-02 14:58:48 +02:00

Dwarf-assembly

Generates C code from the DWARF embedded in an ELF file. This code can then be compiled into a .so, and used to unwind stack frames.

Options

Switch generation policy

The code can either generate one big switch statement for every PC in the ELF, or one switch and a function per FDE, plus a lookup function.

One of the two options must be passed:

  • --switch-per-func: one switch and function per FDE;
  • --global-switch: a single big switch for the whole ELF.

PC list

Instead of generating interval switches (eg case 0x42 ... 0x100), it is possible to provide a binary file (generated by ../extract_pc.py) containing a list of all PCs in the ELF. The file contains one 8-bytes chunk per PC, which is the PC in little endian.

--pc-list PC_LIST_FILE_PATH