binary/elf/exceptions

This module takes care of symbolization in the exception sections and it generates CFI directives based on the unwind and exception information.

cfi_directive(BlockAddress:address, Offset:unsigned, LocalIndex:unsigned, directive:symbol, ReferenceSym:symbol, Nargs:unsigned, arg1:number, arg2:number)

A CFI directive specifies unwind information directly inlined into the assembly code. This representation is slightly higher level than a raw eh_frame section but mostly equivalent. Most CFI directives are generated 1-to-1 from a fde_instruction. Other CFI directives mark the beginning and end of the FDE (.starproc and .endproc) or contain a pointer to the corresponding LSDA (exception handling information) or to the personality (.cfi_lsda and .cfi_personality respectively).

symbol_special_encoding(EA:address, encoding:symbol)

symbol_special_encoding marks symbols that are encoded with uleb128 or sleb128.

dwarf_encoding_size(Encoding:unsigned, Size:unsigned)

last_fde(Addr:address)

last_fde_instruction(FdeAddr:address, Index:unsigned)

fde_instruction_ref(FdeAddr:address, Index:unsigned, LocalIndex:unsigned, ReferenceAddr:address)

endproc_local_index(FdeAddr:address, LocalIndex:unsigned)

fde_instruction_block_offset(FdeAddr:address, Index:unsigned, LocalIndex:unsigned, BlockAddr:address, Offset:unsigned)

The location a FDE instruction (identified by FdeAddr, Index, and LocalIndex) refers to, expressed as a combination of a BlockAddr and an Offset into the block.

fde_block_addresses(FdeAddr:address, StartAddr:address, EndAddr:address)

lsda_symbol_minus_symbol(EA:address, Size:unsigned, Symbol1:address, Symbol2:address, Scale:unsigned, Offset:number)

Same as symbol_minus_symbol: this is to avoid cyclic aggregation by boundary_sym_expr using symbol_minus_symbol.

cfi_operand_is_register(Insn:symbol, OpNumber:unsigned)

dwarf_to_cfi(DwarfInsn:symbol, OpNumber:unsigned, CfiInsn:symbol)