Module: Zemu::Debug

Defined in:
lib/zemu/debug.rb

Overview

Handles debugging functionality, like mapping of symbols to addresses, disassembling of instructions, etc.

Defined Under Namespace

Classes: Symbol, Symbols

Class Method Summary collapse

Class Method Details

.load_map(path) ⇒ Object

Loads a map file at the given path, and returns a hash of address => Symbol for the symbols defined within.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/zemu/debug.rb', line 7

def self.load_map(path)
    symbols = []

    File.open(path, "r") do |f|
        f.each_line do |l|
            s = Symbol.parse(l)

            symbols << s
        end
    end

    return Symbols.new(symbols)
end