コード例 #1
0
 def do_checkpoint(self):
     """Perform a new checkpoint, returning the index of the new ckpt."""
     global gn_time_checkpointing, gn_total_checkpoints
     fredutil.fred_timer_start("checkpoint")
     n_index = self.branch.do_checkpoint()
     gn_time_checkpointing += fredutil.fred_timer_stop("checkpoint")
     gn_total_checkpoints += 1
     return n_index
コード例 #2
0
ファイル: freddebugger.py プロジェクト: bbarker/fred
 def do_checkpoint(self):
     """Perform a new checkpoint, returning the index of the new ckpt."""
     global gn_time_checkpointing, gn_total_checkpoints
     fredutil.fred_timer_start("checkpoint")
     n_index = self.branch.do_checkpoint()
     gn_time_checkpointing += fredutil.fred_timer_stop("checkpoint")
     gn_total_checkpoints += 1
     return n_index
コード例 #3
0
 def test_expression(self, s_expr, s_expr_val):
     global gn_time_evaluating, gn_total_evaluations
     ls_truths = ["1", "true"]
     ls_falsehoods = ["0", "false", ""]  # Empty string needed for Perl.
     fredutil.fred_timer_start("evaluation")
     s_result = self.evaluate_expression(s_expr)
     gn_time_evaluating += fredutil.fred_timer_stop("evaluation")
     gn_total_evaluations += 1
     if s_result in ls_truths and s_expr_val in ls_truths:
         return True
     elif s_result in ls_falsehoods and s_expr_val in ls_falsehoods:
         return True
     else:
         return s_result == s_expr_val
コード例 #4
0
ファイル: freddebugger.py プロジェクト: bbarker/fred
 def test_expression(self, s_expr, s_expr_val):
     global gn_time_evaluating, gn_total_evaluations
     ls_truths = ["1", "true"]
     ls_falsehoods = ["0", "false", ""] # Empty string needed for Perl.
     fredutil.fred_timer_start("evaluation")
     s_result = self.evaluate_expression(s_expr)
     gn_time_evaluating += fredutil.fred_timer_stop("evaluation")
     gn_total_evaluations += 1
     if s_result in ls_truths and s_expr_val in ls_truths:
         return True
     elif s_result in ls_falsehoods and s_expr_val in ls_falsehoods:
         return True
     else:
         return s_result == s_expr_val
コード例 #5
0
ファイル: freddebugger.py プロジェクト: karya0/fred
 def do_restart(self, n_index=-1, b_clear_history=False):
     """Restart from the current or specified checkpoint.
     n_index defaults to -1, which means restart from current checkpoint."""
     global gn_time_restarting, gn_total_restarts
     fredutil.fred_timer_start("restart")
     self.branch.do_restart(n_index, b_clear_history, self.reset_on_restart)
     gn_time_restarting += fredutil.fred_timer_stop("restart")
     gn_total_restarts += 1
     # XXX Figure out a way to do this without fredio.
     import fredio
     self.set_real_debugger_pid(fredio.get_child_pid())
     del fredio
     self.update_state()
     # Reset real inferior pid, as it gets a new real pid on restart.
     fredmanager.reset_real_inferior_pid(self.get_real_debugger_pid())
コード例 #6
0
 def do_restart(self, n_index=-1, b_clear_history=False):
     """Restart from the current or specified checkpoint.
     n_index defaults to -1, which means restart from current checkpoint."""
     global gn_time_restarting, gn_total_restarts
     fredutil.fred_timer_start("restart")
     self.branch.do_restart(n_index, b_clear_history, self.reset_on_restart)
     gn_time_restarting += fredutil.fred_timer_stop("restart")
     gn_total_restarts += 1
     # XXX Figure out a way to do this without fredio.
     import fredio
     self.set_real_debugger_pid(fredio.get_child_pid())
     del fredio
     self.update_state()
     if self.personality_name() == "gdb":
         # Reset real inferior pid, as it gets a new real pid on restart.
         fredmanager.reset_real_inferior_pid(self.get_real_debugger_pid())