Clean up libelfin_wrap functions api

This commit is contained in:
kamkow1
2025-03-13 14:03:04 +01:00
parent a9f555d916
commit 4f60dfcd4d
3 changed files with 63 additions and 56 deletions

View File

@@ -17,18 +17,18 @@
typedef struct {
ssize_t line;
const char *file;
uint64_t addr;
uintptr_t addr;
} AddrInfo;
typedef struct {
const char *name;
uintptr_t addr;
} Symbol;
AddrInfo *ai;
} Func;
typedef struct {
Symbol *items;
Func *items;
size_t count, capacity;
} Symbols;
} Funcs;
typedef void * PLibelfinBinding;
@@ -36,6 +36,7 @@ DEBUGUS_EXTERNC PLibelfinBinding libelfin_wrap_get_binding(int fd, uintptr_t loa
DEBUGUS_EXTERNC void libelfin_wrap_free_binding(PLibelfinBinding pbind);
DEBUGUS_EXTERNC AddrInfo *libelfin_wrap_info_from_rip(PLibelfinBinding pbind, uint64_t rip);
DEBUGUS_EXTERNC void libelfin_wrap_free_info(AddrInfo *ai);
DEBUGUS_EXTERNC void libelfin_wrap_get_syms(PLibelfinBinding *pbind, Symbols *syms);
DEBUGUS_EXTERNC void libelfin_wrap_get_funcs(PLibelfinBinding pbind, Funcs *funcs);
DEBUGUS_EXTERNC uintptr_t libelfin_wrap_func_addr(PLibelfinBinding pbind, Func *f);
#endif // LIBELFIN_WRAP_H_