node/lib/metasm/samples/dbg-plugins/trace_func.rb
# a new trace is about to begin
a new trace is about to begin
a new trace is about to begin
def trace_func_newtrace(id)
	@trace_func_counter ||= {}
	@trace_func_counter[id] = 0
	puts "start tracing #{Expression[id[0]]}"
	if not defined? @trace_func_dasmcolor
		@trace_func_dasmcolor = true
		return if not disassembler.gui
		oldcb = disassembler.gui.bg_color_callback
		disassembler.gui.bg_color_callback = lambda { |addr|
			if oldcb and c = oldcb[addr]
				c
			elsif di = disassembler.di_at(addr) and di.block.list.first.comment.to_s =~ /functrace/
				'ff0'
			end
		}
	end
end
def trace_func_newtrace ( id ) @trace_func_counter ||= { } @trace_func_counter [ id ] = 0 puts "start tracing #{Expression[id[0]]}" if not defined? @trace_func_dasmcolor @trace_func_dasmcolor = true return if not disassembler . gui oldcb = disassembler . gui . bg_color_callback disassembler . gui . bg_color_callback = lambda { | addr | if oldcb and c = oldcb [ addr ] c elsif di = disassembler . di_at ( addr ) and di . block . list . first . comment . to_s =~ / functrace / 'ff0' end } end end
a new trace is about to begin
a new trace is about to begin
# setup a bg_color_callback on the disassembler
id