node/lib/metasm/samples/dbg-plugins/trace_func.rb
# setup the initial breakpoint at func start
setup the initial breakpoint at func start
setup the initial breakpoint at func start
def trace_func(addr, oneshot = false)
	@trace_terminate = false
	counter = 0
	bp = bpx(addr, oneshot) {
		counter += 1
		id = [disassembler.normalize(addr), counter, func_retaddr]
		trace_func_newtrace(id)
		trace_func_block(id)
		continue
	}
	if addr == pc
		del_bp bp if oneshot
		bp.action.call
	end
end
def trace_func ( addr , oneshot = false ) @trace_terminate = false counter = 0 bp = bpx ( addr , oneshot ) { counter += 1 id = [ disassembler . normalize ( addr ) , counter , func_retaddr ] trace_func_newtrace ( id ) trace_func_block ( id ) continue } if addr == pc del_bp bp if oneshot bp . action . call end end
setup the initial breakpoint at func start
setup the initial breakpoint at func start
# distinguish different hits on the same function entry
addr
oneshot