首页> 外国专利> Method for dynamically inserting code into a process by enabling taken branch traps to intercept a branch during the execution of the process

Method for dynamically inserting code into a process by enabling taken branch traps to intercept a branch during the execution of the process

机译:通过使采用的分支陷阱在执行过程中拦截分支来动态地将代码插入到过程中的方法

摘要

A method for dynamically inserting code or patching code during the running of a process on a computer is disclosed. The method comprises enabling taken branch traps on the process, intercepting a branch and redirecting processing of the branch instruction to a routine. The intercepting and redirecting may be done by a trap handler, which may respond to a plurality of branches or to any branches. The method may include rewriting a target of the branch instruction to a function call interceptor. The method may include processing the branch instruction after processing the routine. The routine may comprise a stub which might redirect processing to a wrapper function. The method may include avoiding any taken branches when the routine is active so that the method does not become recursive. The branch instruction may be provided with a completer that indicates whether more traps should be generated. The method may act as a profiler or a tracer. Also disclosed is a method of detecting stack or buffer overflows.
机译:公开了一种用于在计算机上运行进程期间动态地插入代码或修补代码的方法。该方法包括在进程上启用采取的分支陷阱,拦截分支并将分支指令的处理重定向到例程。拦截和重定向可以由陷阱处理程序完成,该陷阱处理程序可以响应多个分支或任何分支。该方法可以包括将分支指令的目标重写为功能调用拦截器。该方法可以包括在处理例程之后处理分支指令。该例程可以包括存根,该存根可以将处理重定向到包装器功能。该方法可以包括当例程是活动的时避免任何分支,以使得该方法不会递归。分支指令可以提供有指示是否应生成更多陷阱的完成器。该方法可以充当分析器或跟踪器。还公开了一种检测堆栈或缓冲器溢出的方法。

著录项

  • 公开/公告号GB2417579A

    专利类型

  • 公开/公告日2006-03-01

    原文格式PDF

  • 申请/专利权人 HEWLETT-PACKARD DEVELOPMENT COMPANY L.P.;

    申请/专利号GB20040019003

  • 发明设计人 K SUDHEER;

    申请日2004-08-26

  • 分类号G06F9/445;G06F11/28;G06F11/36;

  • 国家 GB

  • 入库时间 2022-08-21 21:16:33

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号