initial implementation of DWARF Expression state machine parsing and

it's usage for retrieve arguments/variables of function
This commit is contained in:
2020-01-13 17:21:46 +04:00
parent 08ba87ce98
commit 50bebda6a1
5 changed files with 719 additions and 335 deletions
+8 -2
View File
@@ -10,10 +10,16 @@ typedef bool (*dwarf_operation)(pst_context* ctx, const dwarf_op_map* map, Dwarf
typedef struct __dwarf_op_map {
int op_num; // DWARF Operation DW_OP_XXX
int regno; // platform-dependent register number if present
const char* regname; // register name if 'regno' specified
// int regno; // platform-dependent register number if present
// const char* regname; // register name if 'regno' specified
const char* op_name; // string representation of an operation
dwarf_operation operation; // function which handles operation
} dwarf_op_map;
typedef struct __dwarf_reg_map {
int regno; // platform-dependent register number
const char* regname; // register name if
const char* dwarf_name; // name of DWARF operation
} dwarf_reg_map;
const dwarf_op_map* find_op_map(int op);