Ejemplo n.º 1
0
def dispatch_command(s_command, b_wait=False):
    """Given a user command, dispatches and executes it in the right way.
    If b_wait is True, wait for the debugger prompt after each command."""
    fredutil.fred_timer_start(s_command)
    # TODO: Currently we do not log fred commands. Do we need to?
    if is_fred_command(s_command):
        handle_fred_command(s_command)
    else:
        fredio.send_command(s_command)
        g_debugger.log_command(s_command)
        if b_wait:
            fredio.wait_for_prompt()
    fredutil.fred_timer_stop(s_command)
Ejemplo n.º 2
0
def dispatch_command(s_command, b_wait=False):
    """Given a user command, dispatches and executes it in the right way.
    If b_wait is True, wait for the debugger prompt after each command."""
    fredutil.fred_timer_start(s_command)
    # TODO: Currently we do not log fred commands. Do we need to?
    if is_fred_command(s_command):
        handle_fred_command(s_command)
    else:
        fredio.send_command(s_command)
        g_debugger.log_command(s_command)
        if b_wait:
           fredio.wait_for_prompt()
    fredutil.fred_timer_stop(s_command)
Ejemplo n.º 3
0
def dispatch_command(s_command, b_wait=False):
    """Given a user command, dispatches and executes it in the right way.
    If b_wait is True, wait for the debugger prompt after each command."""
    fredutil.fred_timer_start(s_command)
    # TODO: Currently we do not log fred commands. Do we need to?
    if is_fred_command(s_command):
        handle_fred_command(s_command)
    else:
        # XXX: Figure out a more elegant way to do this. We can't set the
        # inferior pid until we know the inferior is alive, so we keep trying
        # to update it with every command issued until it succeeds.
        if fredmanager.get_pid() == -1:
            n_inf_pid = fredutil.get_inferior_pid(fredio.get_child_pid())
            fredmanager.set_pid(n_inf_pid)

        fredio.send_command(s_command)
        g_debugger.log_command(s_command)
        if b_wait:
            fredio.wait_for_prompt()
    fredutil.fred_timer_stop(s_command)