现在的位置: 首页 > 综合 > 正文

How debugger works

2013年06月21日 ⁄ 综合 ⁄ 共 415字 ⁄ 字号 评论关闭

http://www.alexonlinux.com/how-debugger-works

先藏着,以后学习。

原文中的代码有一点错。应该改成这样。

+       /* and restore the original instruction */
+       ptrace(PTRACE_POKETEXT, child, (void *)addr, orig_data);
+
       /* Debuggie is now ready to get resumed... Waiting ten seconds... */
       printf("Time before debugger falling asleep: %ld\n", (long)time(NULL));
       sleep(5);
       printf("Time after debugger falling asleep: %ld. Resuming debuggie...\n", (long)time(NULL));
 

抱歉!评论已关闭.