bunch of changes. mainly is: got right CFA from both libunwind & libdw
This commit is contained in:
+9
-4
@@ -14,7 +14,10 @@ typedef struct __pst_context {
|
||||
offset = 0;
|
||||
buff[0] = 0;
|
||||
base_addr = 0;
|
||||
has_nframe = false;
|
||||
sp = 0;
|
||||
cfa = 0;
|
||||
curr_frame = NULL;
|
||||
next_frame = NULL;
|
||||
}
|
||||
|
||||
bool print(const char* fmt, ...);
|
||||
@@ -23,13 +26,15 @@ typedef struct __pst_context {
|
||||
|
||||
ucontext_t* hcontext; // context of signal handler
|
||||
unw_context_t context; // context of stack trace
|
||||
unw_cursor_t curr_frame; // currently examined frame of context
|
||||
unw_cursor_t next_frame; // caller frame
|
||||
bool has_nframe; // has next frame or not
|
||||
unw_cursor_t cursor;
|
||||
unw_cursor_t* curr_frame; // currently examined frame of context
|
||||
unw_cursor_t* next_frame; // caller frame
|
||||
Dwarf_Addr base_addr; // base address where process loaded
|
||||
|
||||
char buff[8192]; // stack trace buffer
|
||||
uint32_t offset; // offset in the 'buff'
|
||||
Dwarf_Addr sp;
|
||||
Dwarf_Addr cfa;
|
||||
} pst_context;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user