nnosov
0064239418
call_site_XXX moved to C language, added my oldest hash_map
...
implementation
2020-02-01 21:19:55 +04:00
nnosov
dbd8e31129
define pst_log macro to use global log
2020-02-01 18:11:50 +04:00
nnosov
7c13dfa9e1
define pst_alloc & pst_free macro to use global allocator
2020-02-01 17:57:43 +04:00
nnosov
e27f0c5c18
move pst_call_site & pst_parameter to C language and separate them
2020-02-01 17:09:12 +04:00
nnosov
8251ba526f
all code except of pst_function & pst_handler rewritten on C language.
...
Logger nad Allocator decided to be a global for all library
2020-02-01 15:19:55 +04:00
nnosov
fcdb15ba95
remove unused code from dwarf_stack
2020-01-29 10:05:18 +04:00
nnosov
340abfc31c
fix pst_alloc_init.. names and stub for pst_alloc_init_cutom()
2020-01-28 20:17:47 +04:00
nnosov
701976beb0
remove next_frame from pst_context since it's not used
2020-01-28 19:27:25 +04:00
nnosov
097c0f93d3
added stub for pst_alloc_fini()
2020-01-28 19:26:33 +04:00
nnosov
e62db2210d
move pst_context to separate files
2020-01-28 16:44:43 +04:00
nnosov
6da79926d0
add simple libc-based allocat to extend it in future
2020-01-28 16:31:32 +04:00
nnosov
c2fdeccd34
move register-related code to separate files, move DWARF module & handle
...
to pst_context, move get_frame() from pst_handler to pst_function
2020-01-28 14:24:32 +04:00
nnosov
f9635841f6
right caculation of DW_OP_GNU_entry_value, use caller's information
2020-01-26 15:36:33 +04:00
nnosov
898fa1e5e8
add dictionary implementation
2020-01-25 17:26:16 +04:00
nnosov
daf58bce70
save call-site parameters in caller
2020-01-25 17:25:59 +04:00
nnosov
4f94a9e1c2
dwarf stack: save expression and add is_exp_equal() to compare
...
expressions
2020-01-25 17:24:36 +04:00
nnosov
e48cfddeb0
print_stack() raw implementation
2020-01-25 17:22:45 +04:00
nnosov
80018f8808
use CFA derived from DWARF info instad of libunwind caller's SP since
...
libunwind don't show right SP for callers in shared objects
2020-01-24 16:54:05 +04:00
nnosov
48f37ec3e8
better logging formatting, print_registers()
2020-01-24 15:45:33 +04:00
nnosov
fdad3480f9
colorize log messages written to console correspondingly to severity of
...
the message
2020-01-24 14:57:20 +04:00
nnosov
f48bf41cbb
added print_registers() to context
2020-01-24 14:43:43 +04:00
nnosov
952b71d9d3
bunch of changes. mainly is: got right CFA from both libunwind & libdw
2020-01-23 19:49:51 +04:00
nnosov
15a56dfc63
fix dw_op_deref: fetch 8 byte value instead of 4
2020-01-17 09:47:28 +04:00
nnosov
dcfbcd0952
implemented base support of DWARF lexical block and call site
2020-01-17 09:44:59 +04:00
nnosov
e215c6af76
added dw_op_deref_size, adjusted dw_op_deref, fixed
...
DW_OP_GNU_entry_value handling
2020-01-17 09:44:01 +04:00
nnosov
6d6f0d2d45
another one fix to dw_op_breg_x. try to calc DW_OP_GNU_entry_value in
...
caller frame
2020-01-16 17:48:06 +04:00
nnosov
524c4fa52d
fixes for operations: dw_op_addr, dw_op_deref, dw_op_breg_x. Dereference
...
memory location if it's last on the dwarf stack
2020-01-16 17:21:26 +04:00
nnosov
1e395e5cac
fix for find dwarf CU for function, fix for find library base address
2020-01-16 16:51:36 +04:00
nnosov
18450ef1b2
added Makefile for framework
2020-01-16 16:41:33 +04:00
nnosov
7b69c304a9
.gitignore for framework
2020-01-16 16:41:03 +04:00
nnosov
ba9db80f07
introduce parent frame
2020-01-16 16:22:17 +04:00
nnosov
ab58889d93
better debug messaging
2020-01-16 15:30:05 +04:00
nnosov
1cddd773bc
use two stage unwinding: 1st is simply detection of function name using
...
libunwind and save functions cursor. 2nd - use dwarf information to cath
as more info as possible. this approach also allows to dereference
DW_OP_GNU_value operation since it need access to caller frame from
callee context
2020-01-16 14:54:42 +04:00
nnosov
eadbe9a80a
small comment that seems that DW_OP_GNU_entry_value does something that
...
DW_OP_entry_value
2020-01-16 12:34:02 +04:00
nnosov
132e0d3854
temporary extract from pst_parameter location dwarf handling to
...
handle_location()
2020-01-16 12:33:07 +04:00
nnosov
80285dd94e
fix SF in print_expr_block() due to wrong dereference of stack pointer
...
to memory location
2020-01-16 12:31:55 +04:00
nnosov
a60045d9f4
do not handle return parameter value since it's unaccessible in stack
...
trace (no functions returns)
2020-01-14 19:28:38 +04:00
nnosov
e2bdd31cef
use internal linkedlist implementation instead of std::list,
...
std::vector. make stack trace a bit more complex
2020-01-14 18:03:11 +04:00
nnosov
b49318cd11
retrieve return value of function, show frame number on print
2020-01-14 16:57:21 +04:00
nnosov
4bc8c15918
take care that parameter may have 'undefined' or 'constant' values
2020-01-14 14:54:47 +04:00
nnosov
2b3db0f936
better and more dwarf info printing
2020-01-14 14:20:03 +04:00
nnosov
eb9dc1341d
introduce printing functions and their parameters on base of dwarf info
2020-01-14 13:47:08 +04:00
nnosov
fc6a81b460
move calc_expression() & get_value() from context to DWARF stack
2020-01-14 12:21:00 +04:00
nnosov
5ee3935dc2
move out value retrieval from expression evaluation. add get_value()
2020-01-14 11:48:08 +04:00
nnosov
6b43827894
create and use mapping between DW_OP_Rex/breg(x) and appropriate
...
platform-dependent register number
2020-01-14 09:12:00 +04:00
nnosov
b955926d86
added DW_OP_GNU_entry_value operation handling
2020-01-14 08:56:49 +04:00
nnosov
fdfce06ee0
one bug fix & reformeatting of the code
2020-01-13 22:13:39 +04:00
nnosov
2f7dfeca0b
small reformatting of the code
2020-01-13 22:13:08 +04:00
nnosov
964c6d888e
remove unused code
2020-01-13 19:45:08 +04:00
nnosov
1abe271d10
small refactoring and bug fixing of DWARF operations processing
2020-01-13 18:49:11 +04:00