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)
def setup_environment_variables(s_dmtcp_port="7779", b_debug=False): """Set up the given environment variables. If any environment variables are already set, the existing values take precedence. This is so the user can set up environment variables for DMTCP/FReD in their .bashrc, for example.""" fredutil.GB_DEBUG = b_debug fredutil.set_env_var_if_unset("DMTCP_PORT", s_dmtcp_port) fredutil.set_env_var_if_unset("DMTCP_TMPDIR", GS_DMTCP_TMPDIR) fredutil.set_env_var_if_unset("DMTCP_CHECKPOINT_DIR", GS_DMTCP_TMPDIR) fredutil.set_env_var_if_unset("DMTCP_GZIP", '0') fredutil.set_env_var_if_unset("DMTCP_QUIET", '2')
def setup_environment_variables(s_dmtcp_port="7779", b_debug=False): """Set up the given environment variables. If any environment variables are already set, the existing values take precedence. This is so the user can set up environment variables for DMTCP/FReD in their .bashrc, for example.""" fredutil.GB_DEBUG = b_debug fredutil.set_env_var_if_unset("DMTCP_PORT", s_dmtcp_port) fredutil.set_env_var_if_unset("DMTCP_TMPDIR", GS_DMTCP_TMPDIR) fredutil.set_env_var_if_unset("DMTCP_CHECKPOINT_DIR", GS_DMTCP_TMPDIR) fredutil.set_env_var_if_unset("DMTCP_GZIP", "0") fredutil.set_env_var_if_unset("DMTCP_QUIET", "2")