过渡观察点:教老用户新技巧
Transition Watchpoints: Teaching Old Debuggers New Tricks
摘要:
可逆调试器和进程重放至少从1970年就开始开发了。这个愿景使人们能够在调试器下向后执行。实践中的两个重要问题是,第一,当前的可逆调试器在长时间内反转时速度很慢,第二,在构建一个可逆调试器之后,很难将该成果转移到新的编程环境中。用户在发现错误时观察到一个bug。向后搜索相应的故障可能需要许多相反的步骤。最终,用户更喜欢编写一个表达式,该表达式在到达错误时将转换为false。解决方案是一个基于快照和记录/重放的表达式转换观察点工具。表达转变观察点被实现为通过程序执行的时间轴的二进制搜索,同时使用快照作为该时间轴内的界标。这允许调试仅在程序执行几分钟或更长时间后出现的细微错误。当程序启动后几秒钟内发生错误时,重复调试会话就足够了。对于几分钟后才能看到的bug,首选可逆调试。该架构允许在常规调试器之上的高效且易于编写的基于快照的可逆性调试器。这种方法的有效性通过开发四种个性(GDB、MATLAB、Perl和Python)进行了测试,每种个性通常只需要100行代码。
英文摘要:
Reversible debuggers and process replay have been developed at least since 1970. This vision enables one to execute backwards in time under a debugger. Two important problems in practice are that, first, current reversible debuggers are slow when reversing over long time periods, and, second, after building one reversible debugger, it is difficult to transfer that achievement to a new programming environment. The user observes a bug when arriving at an error. Searching backwards for the corresponding fault may require many reverse steps. Ultimately, the user prefers to write an expression that will transition to false upon arriving at the fault. The solution is an expression-transition watchpoint facility based on top of snapshots and record/replay. Expression-transition watch- points are implemented as binary search through the timeline of a program execution, while using the snapshots as landmarks within that timeline. This allows for debugging of subtle bugs that appear only after minutes or more of program execution. When a bug occurs within seconds of program startup, repeated debugging sessions suffice. Reversible debugging is preferred for bugs seen only after minutes. This architecture allows for an efficient and easy-to-write snapshot-based reversibe debugger on top of a conventional debugger. The validity of this approach was tested by developing four personalities (for GDB, MATLAB, Perl, and Python), with each personality typically requiring just 100 lines of code.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。