node/lib/metasm/metasm/disassemble_api.rb
# return the graph of function => subfunction list
# for which a (sub-sub)function includes addr
return the graph of function => subfunction list
for which a (sub-sub)function includes addr
return the graph of function = > subfunction list for which a ( sub - sub ) function includes addr
def function_graph_to(addr)
		addr = normalize(addr)
		addr = find_function_start(addr) || addr
		full = function_graph
		ret = {}
		todo = [addr]
		done = []
		while a = todo.pop
			next if done.include? a
			done << a
			full.each { |f, sf|
				next if not sf.include? a
				ret[f] ||= []
				ret[f] |= [a]
				todo << f
			}
		end
		ret
	end
def function_graph_to ( addr ) addr = normalize ( addr ) addr = find_function_start ( addr ) || addr full = function_graph ret = { } todo = [ addr ] done = [ ] while a = todo . pop next if done . include? a done << a full . each { | f , sf | next if not sf . include? a ret [ f ] ||= [ ] ret [ f ] |= [ a ] todo << f } end ret end
return the graph of function => subfunction list
for which a (sub-sub)function includes addr
return the graph of function = > subfunction list for which a ( sub - sub ) function includes addr
addr