Class: Relyze::TCG::TCGNode

Inherits:
Graph::Node show all
Defined in:
C:/Program Files/Relyze/lib/relyze/core/tcg.rb

Instance Attribute Summary collapse

Attributes inherited from Graph::Node

#control_dependencies, #data, #display, #dominance_frontier, #dominator_children, #edges, #graph, #id, #immediate_dominator, #immediate_post_dominator, #name, #post_dominance_frontier, #post_dominator_children

Instance Method Summary collapse

Methods inherited from Graph::Node

#degree, #edge?, #indegree, #outdegree, #remove, #to_dot, #to_svg

Constructor Details

#initialize(graph, id, data = nil) ⇒ TCGNode

Returns a new instance of TCGNode

[View source]

97
98
99
100
# File 'C:/Program Files/Relyze/lib/relyze/core/tcg.rb', line 97

def initialize( graph, id, data=nil )
    super
    @instructions = []
end

Instance Attribute Details

#instructionsObject

Returns the value of attribute instructions


95
96
97
# File 'C:/Program Files/Relyze/lib/relyze/core/tcg.rb', line 95

def instructions
  @instructions
end

Instance Method Details

#to_sObject

[View source]

102
103
104
105
106
107
108
109
110
# File 'C:/Program Files/Relyze/lib/relyze/core/tcg.rb', line 102

def to_s
    txt = ''
    @instructions.each do | tinst |
        txt << "0x%08X.%02X    " % [ tinst.rva, tinst.slot ]
        txt << tinst.to_s
        txt << "\r\n"
    end
    return txt
end