Print function name and file location when caught a SIGSEGV
This commit is contained in:
@@ -12,17 +12,30 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "da.h"
|
||||
|
||||
typedef struct {
|
||||
ssize_t line;
|
||||
const char *file;
|
||||
uint64_t addr;
|
||||
} AddrInfo;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
uintptr_t addr;
|
||||
} Symbol;
|
||||
|
||||
typedef struct {
|
||||
Symbol *items;
|
||||
size_t count, capacity;
|
||||
} Symbols;
|
||||
|
||||
typedef void * PLibelfinBinding;
|
||||
|
||||
DEBUGUS_EXTERNC PLibelfinBinding libelfin_wrap_get_binding(int fd);
|
||||
DEBUGUS_EXTERNC PLibelfinBinding libelfin_wrap_get_binding(int fd, uintptr_t loadoffset);
|
||||
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);
|
||||
|
||||
#endif // LIBELFIN_WRAP_H_
|
||||
|
||||
Reference in New Issue
Block a user