class Metasm::BacktraceTrace

holds information on a backtracked expression near begin and end of instruction blocks (#backtracked_for)

Attributes

address[RW]

address of the instruction in the block from which rebacktrace should start (use with #from_subfuncret bool) address is nil if the backtrace is from block start #exclude_instr is a bool saying if the backtrace should start at address or at the preceding instruction these are optional: if absent, expr is to be rebacktracked when a new codepath arrives at the beginning of the block

detached[RW]

bool: true if this maps to a :x that should not have a from when resolved

exclude_instr[RW]

address of the instruction in the block from which rebacktrace should start (use with #from_subfuncret bool) address is nil if the backtrace is from block start #exclude_instr is a bool saying if the backtrace should start at address or at the preceding instruction these are optional: if absent, expr is to be rebacktracked when a new codepath arrives at the beginning of the block

expr[RW]

the Expression to backtrace at this point

from_subfuncret[RW]

address of the instruction in the block from which rebacktrace should start (use with #from_subfuncret bool) address is nil if the backtrace is from block start #exclude_instr is a bool saying if the backtrace should start at address or at the preceding instruction these are optional: if absent, expr is to be rebacktracked when a new codepath arrives at the beginning of the block

len[RW]

length of r/w xref (in bytes)

maxdepth[RW]

maxdepth at the point of the object creation

orig_expr[RW]

the original backtracked Expression

origin[RW]

address of the instruction that initiated the backtrace

type[RW]

:r/:w/:x

Public Class Methods

new(expr, origin, orig_expr, type, len=nil, maxdepth=nil) click to toggle source
# File metasm/disassemble.rb, line 104
def initialize(expr, origin, orig_expr, type, len=nil, maxdepth=nil)
        @expr, @origin, @orig_expr, @type = expr, origin, orig_expr, type
        @len = len if len
        @maxdepth = maxdepth if maxdepth
end

Public Instance Methods

==(o)
Alias for: eql?
eql?(o) click to toggle source
# File metasm/disassemble.rb, line 111
def eql?(o)
        o.class == self.class and
        [  address,   from_subfuncret,   exclude_instr,   origin,   orig_expr,   len,   type,   detached] ==
        [o.address, o.from_subfuncret, o.exclude_instr, o.origin, o.orig_expr, o.len, o.type, o.detached]
end
Also aliased as: ==
hash() click to toggle source
# File metasm/disassemble.rb, line 110
def hash ; [origin, expr].hash ; end