node/lib/metasm/metasm/disassemble.rb
def backtrace_xrefs_di_rw(di)
		get_xrefs_rw(di).each { |type, ptr, len|
			backtrace(ptr, di.address, :origin => di.address, :type => type, :len => len).each { |xaddr|
				next if xaddr == Expression::Unknown
				if @check_smc and type == :w
					#len.times { |off|	# check unaligned ?
					waddr = xaddr	#+ off
					if wdi = di_at(waddr)
						puts "W: disasm: #{di} overwrites #{wdi}" if $VERBOSE
						wdi.add_comment "overwritten by #{di}"
					end
					#}
				end
			}
		}
	end
# trace whose xrefs this di is responsible of
trace whose xrefs this di is responsible of
trace whose xrefs this di is responsible of
def backtrace_xrefs_di_rw(di)
		get_xrefs_rw(di).each { |type, ptr, len|
			backtrace(ptr, di.address, :origin => di.address, :type => type, :len => len).each { |xaddr|
				next if xaddr == Expression::Unknown
				if @check_smc and type == :w
					waddr = xaddr	
					if wdi = di_at(waddr)
						puts "W: disasm: #{di} overwrites #{wdi}" if $VERBOSE
						wdi.add_comment "overwritten by #{di}"
					end
				end
			}
		}
	end
def backtrace_xrefs_di_rw ( di ) get_xrefs_rw ( di ) . each { | type , ptr , len | backtrace ( ptr , di . address , :origin => di . address , :type => type , :len => len ) . each { | xaddr | next if xaddr == Expression :: Unknown if @check_smc and type == :w waddr = xaddr if wdi = di_at ( waddr ) puts "W: disasm: #{di} overwrites #{wdi}" if $VERBOSE wdi . add_comment "overwritten by #{di}" end end } } end
trace whose xrefs this di is responsible of
trace whose xrefs this di is responsible of
#len.times { |off|	# check unaligned ? #+ off #}
di