Debugger.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:hrmulator 作者: wolf 项目源码 文件源码
def run(self):
        self.program_counter = 0
        self.total_steps_executed = 0
        if self.inbox is None:
            self.inbox = deque([])
        self.original_inbox = list(self.inbox)
        self.outbox = []
        escape = False
        try:
            while self.program_counter < len(self.program) and not escape:
                if self.program_counter in self.breakpoints.union(self.temporary_breakpoints):
                    self.temporary_breakpoints = set()
                    escape = self._menu()
                self.program[self.program_counter].execute(self)
        except InboxIsEmptyError:
            pass
        if not escape:
            print()
            print('Program ran to completion.  Post-mortem:')
            self._menu()
        self.program_counter = None
        readline.write_history_file(self.history_file)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号