dwarf-assembly/src/README.md

26 lines
806 B
Markdown
Raw Normal View History

2018-05-15 18:13:09 +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`