Ejemplo n.º 1
0
def setup_debugger(s_debugger_name):
    """Initialize global ReversibleDebugger instance g_debugger."""
    global g_debugger, gs_resume_dir_path
    if s_debugger_name == "gdb":
        fredutil.fred_debug("Using gdb personality.")
        from fred.personality.personalityGdb import PersonalityGdb

        g_debugger = freddebugger.ReversibleDebugger(PersonalityGdb())
        del PersonalityGdb
    elif s_debugger_name == "pdb":
        fredutil.fred_debug("Using python personality.")
        from fred.personality.personalityPython import PersonalityPython

        g_debugger = freddebugger.ReversibleDebugger(PersonalityPython())
        del PersonalityPython
    elif s_debugger_name == "perl":
        fredutil.fred_debug("Using perl personality.")
        from fred.personality.personalityPerl import PersonalityPerl

        g_debugger = freddebugger.ReversibleDebugger(PersonalityPerl())
        del PersonalityPerl
    elif s_debugger_name.endswith("MATLAB"):
        fredutil.fred_debug("Using matlab personality.")
        from fred.personality.personalityMatlab import PersonalityMatlab

        g_debugger = freddebugger.ReversibleDebugger(PersonalityMatlab())
        del PersonalityMatlab
    else:
        fredutil.fred_fatal("Unimplemented debugger '%s'" % s_debugger_name)
Ejemplo n.º 2
0
def setup_debugger(s_debugger_name):
    """Initialize global ReversibleDebugger instance g_debugger."""
    global g_debugger, gs_resume_dir_path
    if s_debugger_name == "gdb":
        fredutil.fred_debug("Using gdb personality.")
        from fred.personality.personalityGdb import PersonalityGdb
        g_debugger = freddebugger.ReversibleDebugger(PersonalityGdb())
        del PersonalityGdb
    elif s_debugger_name == "python":
        fredutil.fred_debug("Using python personality.")
        from fred.personality.personalityPython import PersonalityPython
        g_debugger = freddebugger.ReversibleDebugger(PersonalityPython())
        del PersonalityPython
    elif s_debugger_name == "perl":
        fredutil.fred_debug("Using perl personality.")
        from fred.personality.personalityPerl import PersonalityPerl
        fredutil.set_env_var_if_unset("PERLDB_OPTS", "ornaments=ue,me")
        g_debugger = freddebugger.ReversibleDebugger(PersonalityPerl())
        del PersonalityPerl
    elif s_debugger_name.endswith("MATLAB"):
        fredutil.fred_debug("Using matlab personality.")
        from fred.personality.personalityMatlab import PersonalityMatlab
        g_debugger = freddebugger.ReversibleDebugger(PersonalityMatlab())
        del PersonalityMatlab
    else:
        fredutil.fred_fatal("Unimplemented debugger '%s'" % s_debugger_name)
Ejemplo n.º 3
0
def verify_critical_files_present():
    """Check for DMTCP binaries, fredhijack.so, and other required files.
    If any are not found, exit with a fatal error and appropriate message."""
    if not dmtcpmanager.is_dmtcp_in_path():
        fredutil.fred_fatal("No DMTCP binaries available in your PATH.\n")
    if not fredmanager.is_fredhijack_found():
        fredutil.fred_fatal("No fredhijack.so library found in %s.\n"
                            "Please edit fredmanager.py and change "
                            "GS_FREDHIJACK_PATH to point to the directory "
                            "containing fredhijack.so." %
                            fredmanager.get_fredhijack_path())
Ejemplo n.º 4
0
def verify_critical_files_present():
    """Check for DMTCP binaries, fredhijack.so, and other required files.
    If any are not found, exit with a fatal error and appropriate message."""
    if not dmtcpmanager.is_dmtcp_in_path():
        fredutil.fred_fatal("No DMTCP binaries available in your PATH.\n")
    if not fredmanager.is_fredhijack_found():
        fredutil.fred_fatal("No fredhijack.so library found in %s.\n"
                            "Please edit fredmanager.py and change "
                            "GS_FREDHIJACK_PATH to point to the directory "
                            "containing fredhijack.so."%
                            fredmanager.get_fredhijack_path())