node/lib/metasm/samples/dbg-plugins/trace_func.rb
# we hit the beginning of a block we want to trace
we hit the beginning of a block we want to trace
we hit the beginning of a block we want to trace
def trace_func_block(id)
	blockaddr = pc
	if b = trace_get_block(blockaddr)
		trace_func_add_block(id, blockaddr)
		if b.list.length == 1
			trace_func_blockend(id, blockaddr)
		else
			bpx(b.list.last.address, true) {
				finished = trace_func_blockend(id, blockaddr)
				continue if not finished
			}
		end
	else
		trace_func_blockend(id, blockaddr)
	end
end
def trace_func_block ( id ) blockaddr = pc if b = trace_get_block ( blockaddr ) trace_func_add_block ( id , blockaddr ) if b . list . length == 1 trace_func_blockend ( id , blockaddr ) else bpx ( b . list . last . address , true ) { finished = trace_func_blockend ( id , blockaddr ) continue if not finished } end else trace_func_blockend ( id , blockaddr ) end end
we hit the beginning of a block we want to trace
we hit the beginning of a block we want to trace
# invalid opcode ?
id