Пример #1
0
        import lldb
        host = "lldb"
    except ImportError:
        pass
    try:
        import gdb
        host = "gdb"
    except ImportError:
        pass
    if "vtrace" in locals():
        host = "vdb"
    if not host:
        raise Exception("No debugger host is present")

    # register any plugins that were loaded
    pm.register_plugins()

    # get the debugger plugin for the host we're in
    plugin = pm.debugger_plugin_for_host(host)

    # set up command and adaptor instances
    voltron.debugger = plugin.adaptor_class()
    voltron.command = plugin.command_class()

    # create and start the voltron server
    voltron.server = Server()
    if host != "gdb":
        voltron.server.start()

    print(blessed.Terminal().bold_red("Voltron loaded."))
    if host == 'lldb':
Пример #2
0
        host = "gdb"
    except ImportError:
        pass
    try:
        import pykd
        host = "windbg"
    except:
        pass
    if "vtrace" in locals():
        host = "vdb"
        args = [db]
    if not host:
        raise Exception("No debugger host is present")

    # register any plugins that were loaded
    pm.register_plugins()

    # get the debugger plugin for the host we're in
    plugin = pm.debugger_plugin_for_host(host)

    if not voltron.command:
        # set up command and adaptor instances
        voltron.debugger = plugin.adaptor_class(*args)
        voltron.command = plugin.command_class(*args)

        # create and start the voltron server
        voltron.server = Server()
        if host != "gdb":
            voltron.server.start()

        print(blessed.Terminal().bold_red("Voltron loaded."))