breakpoint.py 文件源码

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

项目:specto 作者: mrknow 项目源码 文件源码
def __clear_break(self, pid, address):
        """
        Used by L{dont_break_at} and L{dont_stalk_at}.

        @type  pid: int
        @param pid: Process global ID.

        @type  address: int or str
        @param address:
            Memory address of code instruction to break at. It can be an
            integer value for the actual address or a string with a label
            to be resolved.
        """
        if type(address) not in (int, long):
            unknown = True
            label = address
            try:
                deferred = self.__deferredBP[pid]
                del deferred[label]
                unknown = False
            except KeyError:
##                traceback.print_last()      # XXX DEBUG
                pass
            aProcess = self.system.get_process(pid)
            try:
                address = aProcess.resolve_label(label)
                if not address:
                    raise Exception()
            except Exception:
##                traceback.print_last()      # XXX DEBUG
                if unknown:
                    msg = ("Can't clear unknown code breakpoint"
                           " at %s in process ID %d")
                    msg = msg % (label, pid)
                    warnings.warn(msg, BreakpointWarning)
                return
        if self.has_code_breakpoint(pid, address):
            self.erase_code_breakpoint(pid, address)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号