do not use struct function pointers elsewhere, use them only in case
when polymorphysm needed
This commit is contained in:
+4
-12
@@ -32,18 +32,6 @@
|
||||
#include "dwarf_function.h"
|
||||
|
||||
typedef struct pst_handler {
|
||||
// methods
|
||||
void (*clear) (pst_handler* h);
|
||||
pst_function* (*add_function) (pst_handler* h, pst_function* fun);
|
||||
void (*del_function) (pst_function* f);
|
||||
pst_function* (*next_function) (pst_handler* h, pst_function* f);
|
||||
pst_function* (*prev_function) (pst_handler* h, pst_function* fn);
|
||||
|
||||
bool (*handle_dwarf) (pst_handler* h);
|
||||
void (*print_dwarf) (pst_handler* h);
|
||||
bool (*unwind) (pst_handler* h);
|
||||
|
||||
// fields
|
||||
pst_context ctx; // context of unwinding
|
||||
void* handle; // process handle
|
||||
Dwarf_Addr addr; // address of currently processed function
|
||||
@@ -54,4 +42,8 @@ typedef struct pst_handler {
|
||||
void pst_handler_init(pst_handler* h, ucontext_t* hctx);
|
||||
void pst_handler_fini(pst_handler* h);
|
||||
|
||||
bool pst_handler_handle_dwarf(pst_handler* h);
|
||||
void pst_handler_print_dwarf(pst_handler* h);
|
||||
bool pst_handler_unwind(pst_handler* h);
|
||||
|
||||
#endif /* SC_SYSUTILS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user