コード例 #1
0
 def test_create_from_file(self):
     (fd, path) = tempfile.mkstemp()
     tmp_file = os.fdopen(fd, 'w')
     tmp_file.write('test \ndr \r\noptions string')
     tmp_file.flush()
     options = DynamoRIOOptions.create_from_file(path)
     self.assertEqual('test  dr   options string', options.options_string)
コード例 #2
0
ファイル: load2.py プロジェクト: kumarak/Granary-Drk
def main(gdb_stub):
    debugger = GDBDebugger(gdb_stub)
    machine = QEMU.create_from_running_vm('akshayk', 5556)
    shell = machine.get_shell()
    loader = RemoteLoader(shell, debugger,
                          LoaderOptions(),
                          DynamoRIOOptions.create_from_file('dr_options'))
    debugger.set_main_symbol_file('../debugging/linux-2.6.32/vmlinux')
    loader.load()
    machine.attach_debugger(debugger)
    for bp in ['external_error', 'os_terminate', 'panic', 'oops_begin',
               'handle_unknown_interrupt','non_maskable_interrupt',
               'null_next_tag_curiosity']:
        debugger.add_breakpoint(bp)
    debugger.resume()
    loader.init()