remove next_frame from pst_context since it's not used

This commit is contained in:
2020-01-28 19:27:25 +04:00
parent 097c0f93d3
commit 701976beb0
2 changed files with 3 additions and 14 deletions
+3 -4
View File
@@ -24,7 +24,6 @@ typedef struct __pst_context {
sp = 0; sp = 0;
cfa = 0; cfa = 0;
curr_frame = NULL; curr_frame = NULL;
next_frame = NULL;
frame = NULL; frame = NULL;
dwfl = NULL; dwfl = NULL;
module = NULL; module = NULL;
@@ -48,11 +47,11 @@ typedef struct __pst_context {
unw_context_t context; // context of stack trace unw_context_t context; // context of stack trace
unw_cursor_t cursor; unw_cursor_t cursor;
unw_cursor_t* curr_frame; // callee libunwind frame unw_cursor_t* curr_frame; // callee libunwind frame
unw_cursor_t* next_frame; // caller libunwind frame
Dwarf_Addr base_addr; // base address where process loaded Dwarf_Addr base_addr; // base address where process loaded
Dwarf_Addr sp; Dwarf_Addr sp; // stack pointer of currently processed stack frame
Dwarf_Addr cfa; Dwarf_Addr cfa; // CFA (Canonical Frame Address) of currently processed stack
Dwarf_Frame* frame; // currently examined libdwfl frame Dwarf_Frame* frame; // currently examined libdwfl frame
Dwfl* dwfl; // DWARF context Dwfl* dwfl; // DWARF context
Dwfl_Module* module; // currently processed CU Dwfl_Module* module; // currently processed CU
-10
View File
@@ -1092,19 +1092,9 @@ bool __pst_handler::handle_dwarf()
ctx.log(SEVERITY_INFO, "Function %s(...): module name: %s, base address: %p, CFA: %#lX", fun->name.c_str(), info.dli_fname, info.dli_fbase, fun->parent ? fun->parent->sp : 0); ctx.log(SEVERITY_INFO, "Function %s(...): module name: %s, base address: %p, CFA: %#lX", fun->name.c_str(), info.dli_fname, info.dli_fbase, fun->parent ? fun->parent->sp : 0);
ctx.curr_frame = &fun->cursor; ctx.curr_frame = &fun->cursor;
ctx.sp = fun->sp; ctx.sp = fun->sp;
//ctx.cfa = fun->parent ? fun->parent->sp : 0;
if(fun->parent) {
ctx.next_frame = &fun->parent->cursor;
} else {
ctx.next_frame = 0;
}
ctx.cfa = fun->cfa; ctx.cfa = fun->cfa;
ctx.curr_frame = &fun->cursor; ctx.curr_frame = &fun->cursor;
ctx.next_frame = NULL;
if(fun->parent) {
ctx.next_frame = &fun->parent->cursor;
}
get_dwarf_function(fun); get_dwarf_function(fun);
} }