-
公开(公告)号:US20130036331A1
公开(公告)日:2013-02-07
申请号:US13647190
申请日:2012-10-08
Applicant: Huawei Technologies Co., Ltd.
Inventor: Dacheng ZHANG , Yichao LI , Dan LIU , Qinyuan CHEN , Zepeng LIU , Bingxue QIU
IPC: G06F11/36
CPC classification number: G06F11/362
Abstract: A debugging method includes: modifying a fault handling function address corresponding to a page attribute fault in an interrupt descriptor table of a system processor to a user-defined fault handling function address; obtaining current information when a designated page attribute fault occurs in a target program; storing the current information into a virtual execution buffer corresponding to a current thread; pushing the current information in the buffer into a stack; determining whether an extended instruction pointer of the target program matches a preset breakpoint address of a faulty page; if the matching succeeds, interacting with a user; otherwise, copy-constructing an instruction, pointed to by the extended instruction pointer of the target program, to the virtual execution buffer corresponding to the current thread; and popping the current information out of the stack, executing the instruction in the buffer, and repeating the determination about whether the address matches the preset breakpoint address.
Abstract translation: 调试方法包括:将系统处理器的中断描述符表中的页属性故障对应的故障处理功能地址修改为用户定义的故障处理功能地址; 在目标程序中发生指定的页面属性故障时获取当前信息; 将当前信息存储到与当前线程对应的虚拟执行缓冲器中; 将缓冲区中的当前信息推送到堆栈中; 确定目标程序的扩展指令指针是否匹配故障页的预设断点地址; 如果匹配成功,则与用户进行交互; 否则,将由目标程序的扩展指令指针指向的指令复制到对应于当前线程的虚拟执行缓冲器; 并将当前信息从堆栈中弹出,在缓冲器中执行指令,并重复关于地址是否匹配预设断点地址的确定。