about summary refs log tree commit diff stats
path: root/src/elfs/elfdwarf_private.h
blob: 2a1c39b02884ece4eb9cbad034c5c8020232b56c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef __ELFDWARF_PRIVATE_H_
#define __ELFDWARF_PRIVATE_H_

#include "emu/x64emu_private.h"

typedef struct dwarf_unwind_s {
    uint8_t reg_count;
    uint64_t *regs;
} dwarf_unwind_t;
typedef struct elfheader_s elfheader_t;

dwarf_unwind_t *init_dwarf_unwind_registers(x64emu_t *emu);
void free_dwarf_unwind_registers(dwarf_unwind_t **unwind_struct);

// Returns the callee's address on success or NULL on failure (may be NULL regardless).
// If success equals 2, the frame is a signal frame.
uintptr_t get_parent_registers(dwarf_unwind_t *emu, const elfheader_t *ehdr, uintptr_t addr, char *success);

#endif // __ELFDWARF_PRIVATE_H_