node/lib/metasm/metasm/cpu/z80/decode.rb
def backtrace_update_function_binding(dasm, faddr, f, retaddrlist, *wantregs)
		b = f.backtrace_binding

		bt_val = lambda { |r|
			next if not retaddrlist
			b[r] = Expression::Unknown
			bt = []
			retaddrlist.each { |retaddr|
				bt |= dasm.backtrace(Expression[r], retaddr, :include_start => true,
					     :snapshot_addr => faddr, :origin => retaddr)
			}
			if bt.length != 1
				b[r] = Expression::Unknown
			else
				b[r] = bt.first
			end
		}

		if not wantregs.empty?
			wantregs.each(&bt_val)
		else
			bt_val[:sp]
		end

		b
	end
# updates the function backtrace_binding
# if the function is big and no specific register is given, do nothing (the binding will be lazily updated later, on demand)
updates the function backtrace_binding
if the function is big and no specific register is given, do nothing (the binding will be lazily updated later, on demand)
updates the function backtrace_binding if the function is big and no specific register is given do nothing ( the binding will be lazily updated later on demand )
def backtrace_update_function_binding(dasm, faddr, f, retaddrlist, *wantregs)
		b = f.backtrace_binding
		bt_val = lambda { |r|
			next if not retaddrlist
			b[r] = Expression::Unknown
			bt = []
			retaddrlist.each { |retaddr|
				bt |= dasm.backtrace(Expression[r], retaddr, :include_start => true,
					     :snapshot_addr => faddr, :origin => retaddr)
			}
			if bt.length != 1
				b[r] = Expression::Unknown
			else
				b[r] = bt.first
			end
		}
		if not wantregs.empty?
			wantregs.each(&bt_val)
		else
			bt_val[:sp]
		end
		b
	end
def backtrace_update_function_binding ( dasm , faddr , f , retaddrlist , * wantregs ) b = f . backtrace_binding bt_val = lambda { | r | next if not retaddrlist b [ r ] = Expression :: Unknown bt = [ ] retaddrlist . each { | retaddr | bt |= dasm . backtrace ( Expression [ r ] , retaddr , :include_start => true , :snapshot_addr => faddr , :origin => retaddr ) } if bt . length != 1 b [ r ] = Expression :: Unknown else b [ r ] = bt . first end } if not wantregs . empty? wantregs . each ( & bt_val ) else bt_val [ :sp ] end b end
updates the function backtrace_binding
if the function is big and no specific register is given, do nothing (the binding will be lazily updated later, on demand)
updates the function backtrace_binding if the function is big and no specific register is given do nothing ( the binding will be lazily updated later on demand )
dasm
faddr
f
retaddrlist
wantregs