计算机科学 ›› 2021, Vol. 48 ›› Issue (5): 9-15.doi: 10.11896/jsjkx.200600152

• 计算机软件* 上一篇    下一篇

反向调试技术研究综述

徐建波, 舒辉, 康绯   

  1. 信息工程大学数学工程与先进计算国家重点实验室 郑州450001
  • 收稿日期:2020-06-24 修回日期:2020-08-24 出版日期:2021-05-15 发布日期:2021-05-09
  • 通讯作者: 舒辉(415314938@qq.com)
  • 基金资助:
    国家重点研发计划(2016YFB08011601)

Summary on Reverse Debugging Technology

XU Jian-bo, SHU Hui, KANG Fei   

  1. State Key Laboratory of Mathematical Engineering and Advanced Computing,Information Engineering University,Zhengzhou 450001,China
  • Received:2020-06-24 Revised:2020-08-24 Online:2021-05-15 Published:2021-05-09
  • About author:XU Jian-bo,born in 1987,master.His main research interests include compu-ter application and information security.(xujianbo2018@163.com)
    SHU Hui,born in 1974,Ph.D,professor.His main research interests include reverse engineering and network information security.
  • Supported by:
    National Key R&D Program of China(2016YFB08011601).

摘要: 在软件的开发测试部署过程中,调试工作耗费了开发人员非常多的精力和时间,有时一个很难被发现的错误会导致多次重启调试。反向调试是软件调试的一种技术,无需重启即可向后查看运行的指令及状态,这能够大大提高软件调试的速度,降低软件开发的难度,有效修复程序运行时发生的错误。该技术的核心问题是运行状态的恢复,目前针对该问题的解决方法主要有状态保存和状态重构。文中主要从反向调试的原理、学术研究、产品实现、技术应用等方面梳理其发展情况,对该技术进行分析研究,总结了基于时间和基于指令的状态保存反向调试技术以及两种反向执行重构状态的方法,并提出了有关记录重放程序执行、定位分析软件错误、反向数据流恢复这3方面的应用,可为反向调试技术的研究应用提供一定的参考。

关键词: 调试, 反向调试, 反向执行, 软件错误, 状态保存, 状态重构

Abstract: In the process of software development and test deployment,debugging consumes a lot of developers' energy and time.Sometimes,in order to find a critical bug,debugging needs to restart many times.Reverse debugging is a technology of software debugging.It can check running instructions and status backward without restarting,which can greatly improve the speed of software debugging,reduce the difficulty of software development,and effectively repair the errors during the running of the program.The core issue of this technology is the recovery of running state.At present,current solutions are state preservation and state reconstruction.This paper mainly reviews the development of reverse debugging from the aspects of principle,academic research,products implementation and technical application.It focuses on the time-based and instruction-based state preservation and two methods of reverse execution reconstruction states.It summarizes 3 specific applications of record replay program execution,location analysis software error,reverse data flow recovery,which provides a reference for the research and application of reverse debugging technology.

Key words: Debugging, Reverse debugging, Reverse execution, Software failure, State reconstruct, State save

中图分类号: 

  • TP311
[1]ZHANG Y K.Software Debugging[M].Chongqing:PublishingHouse of Electronics Industry.2008:3-5.
[2]LIU M L,YANG X S,ZHAO L,et al.Discrete Characteristic-based Test Execution Selection for Software Fault Localization and Understanding[J].Computer Science,2016,43(3):179-187.
[3]CAO H L,JIANG S J,JU X L.Survey of Software Fault Localization[J].Computer Science,2014,41(2):1-6,14.
[4]ENGBLOM J.A review of reverse debugging[C]//Proceedings of the 2012 System,Software,SoC and Silicon DebugConfe-rence.IEEE,2012:1-6.
[5]JIANG S,WANG W W,JIANG L,et al.A Fast bug-locating record and replay debugging system[J].Computer Applications and Software,2016(10):219-222.
[6]ENGBLOM J.Reverse Debugging Products[EB/OL].[2020-5-12].http://jakob.engbloms.se/archives/1564.
[7]ENGBLOM J,ARNO D,WERNER B.Full-System Simulation from Embedded to High-Performance Systems[M].Springer,US,2010.
[8]UNDO Corp.What is Reverse Debugging,and why do we need it[EB/OL].[2020-5-12].http://undo.io/resources/reversedebugging-whitepaper/.
[9]FSF.GDB and Reverse Debugging.[EB/OL].[2020-5-12].http://www.gnu.org/software/gdb/news/reversible.html.
[10]MARK.Introducing Time Travel Debugging for Visual StudioEnterprise 2019[EB/OL].[2020-5-12].http://devblogs.microsoft.com/visualstudio/.
[11]Microsoft Corp.IntelliTrace Features[EB/OL].[2020-5-12].http://docs.microsoft.com/en-us/visualstudio/debugger/inte-llitrace-features.
[12]CALLAHAN R,JONES C,FROYD N,et al.Engineering record and replay for deployability:Extended technical report[J].ar-Xiv:1705.05937,2017.
[13]GITHUB.Pomp[EB/OL].[2020-5-12].http://github.com/junxzm1990/pomp.
[14]Microsoft Corp.Debugging Using WinDbg Preview[EB/OL].[2020-5-12].http://docs.micro-soft.com/en-us/windowshardware/drivers/debugger/.
[15]Microsoft Corp.Time Travel Debugging Over-view.[EB/OL].[2020-5-12].http://docs.microsoft.com/en-us/windowshardware/drivers/debugger/.
[16]CUI W,GE X,KASIKCI B,et al.{REPT}:Reverse Debugging of Failures in Deployed Software[C]//13th {USENIX} Symposium on Operating Systems Design and Implementation ({OSDI} 18).2018:17-32.
[17]MU D,GUO W,CUEVAS A,et al.RENN:Efficient Reverse Execution with Neural-network-assisted Alias Analysis[C]//2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE).IEEE,2019:924-935.
[18]HOEY J,ULIDOWSKI I,YUEN S.Reversing imperative parallel programs[J].arXiv:1709.00828,2017.
[19]HOEY J,ULIDOWSKI I,YUEN S.Reversing parallel programswith blocks and procedures[J].arXiv:1808.08651,2018.
[20]HOEY J,ULIDOWSKI I.Reversible imperative parallel pro-grams and debugging[C]//International Conference on Reversible Computation.Springer,Cham,2019:108-127.
[21]HOEY J,LANESE I,NISHIDA N,et al.A Case Study for Reversible Computing:Reversible Debugging of Concurrent Programs[C]//International Conference on Reversible Computation.Springer,Cham,2020:108-127.
[22]UNDO Corp.The interactive reverse debugger for Linux-based applications[EB/OL].[2020-5-12].http://undo.io/solutions/products/un-dodb-reverse-debugger/.
[23]UNDO Corp.UndoDB Documentation[EB/OL].[2020-5-12].http://docs.undo.io/TechnicalDetails.html.
[24]Reverse Debugging with GDB[EB/OL].(2014-4-9)[2020-5-12].http://sourceware.org/gdb/wiki/ReverseDebug.
[25]ZHANG D F,HU X L,WANG L J.Intelligent Tracking and Debugging Technology Based on Domestic Platform[J].Computer Systems and Applications,2019,28(8):101-108.
[26]KLIMUSHENKOVA A,DOVGALYUK M.Improving the performance of reverse debugging[J].Programming and Computer Software,2017,43(1):60-66.
[27]Process-Record-and-Replay[EB/OL].[2020-5-15].http://sourceware.org/gdb/onlinedocs/gdb/Process-Record-and-Replay.html.
[28]MOZILLA Corp.what rr does[EB/OL].[2020-5-12].http://rr-project.org/.
[29]GITHUB.rr[EB/OL].[2020-5-12].http://github.com/mozi-lla/rr.
[30]O'CALLAHAN R,JONES C,FROYD N,et al.Engineering record and replay for deploy-ability[C]//2017 Annual Technical Conference ({USENIX}{ATC}).2017:377-389.
[31]AKGUL T,MOONEY J.Assembly instruction level reverse exe-cution for debugging[J].ACM Transactions on Software Engineering and Methodology (TOSEM),2004,13(2):149-198.
[32]AKGUL T,MOONEY J.Instruction-level reverse execution for debugging[J].ACM SIGSOFT Software Engineering Notes,2002,28(1):18-25.
[33]AKGUL T,MOONEY J,PANDE S.A fast assembly level reverse execution method via dynamic slicing[C]//26th International Conference on Software Engineering.IEEE,2004:522-531.
[34]LEE J.Dynamic reverse code generation for backward execution[J].Electronic Notes in Theoretical Computer Science,2007,174(4):37-54.
[35]YI J.A Case for Dynamic Reverse-code Generation to DebugNon-deterministic Programs[J].arXiv:1309.5152,2013.
[36]GITHUB.Intel PT[EB/OL].[2020-5-12].https://github.com/intelpt.
[37]XU J,MU D,XING X,et al.Postmortem program analysis with hardware-enhanced post-crash artifacts[C]//26th {USENIX} Security Symposium ({USENIX} Security 17).2017:17-32.
[38]MU D,DU Y,XU J,et al.POMP++:Facilitating Postmortem Program Diagnosis with Value-set Analysis [J].IEEE Transactions on Software Engineering,2019(99):1.
[39]CUI W,PEINADO M,CHA S K,et al.Retracer:Triaging crashes by reverse execution from partial memory dumps[C]//IEEE/ACM 38th International Conference on Software Engineering (ICSE).IEEE,2016:820-831.
[40]GE X,NIU B,CUI W.Reverse Debugging of Kernel Failures in Deployed Systems[C]//2020 Annual Technical Conference ({USENIX}{ATC} 20).2020:281-292.
[41]NORDMARK E F.The fundamentals of debuggers and thechallenges of Reverse Debugging[D].Trondheim:Norwegian University of Science and Technology,2019.
[42]GURDEEP S R,TORRES L C,MARR S,et al.Multiverse Debugging:Non-Deterministic Debugging for Non-Deterministic Programs (Artifact)[J].Dagstuhl Artifacts Series,2019,5(2):1-3.
[43]DOVGALYUK P.Deterministic Replay of System's Execution with Multi-target QEMU Simulator for Dynamic Analysis and Reverse Debugging[C]//CSMR.2012:553-556.
[1] 苏庆, 黎智洲, 刘添添, 吴伟民, 黄剑锋, 李小妹.
程序调试中的树形结构演变可视化模型
Tree Structure Evaluation Visualization Model for Program Debugging
计算机科学, 2021, 48(5): 68-74. https://doi.org/10.11896/jsjkx.200100133
[2] 孙昌爱, 张守峰, 朱维忠.
一种基于变异分析的BPEL程序故障定位技术
Mutation Based Fault Localization Technique for BPEL Programs
计算机科学, 2021, 48(1): 301-307. https://doi.org/10.11896/jsjkx.200900051
[3] 李文海, 彭鑫, 丁丹, 向麒麟, 郭晓峰, 周翔, 赵文耘.
基于日志可视化分析的微服务系统调试方法
Method of Microservice System Debugging Based on Log Visualization Analysis
计算机科学, 2019, 46(11): 145-155. https://doi.org/10.11896/jsjkx.181102210
[4] 张广梅,李景霞.
面向软件错误检测的数据流分析
Data-flow Analysis for Software Error Detection
计算机科学, 2016, 43(Z6): 497-501. https://doi.org/10.11896/j.issn.1002-137X.2016.6A.117
[5] 刘梦冷,杨小双,赵磊,王丽娜.
面向软件错误定位与理解的测试执行离散特征筛选
Discrete Characteristic-based Test Execution Selection for Software Fault Localization and Understanding
计算机科学, 2016, 43(3): 179-187. https://doi.org/10.11896/j.issn.1002-137X.2016.03.034
[6] 张广梅,李景霞.
利用变量状态转换模型进行部分软件错误的检测
Detecting Software Error by Using State Transition Model of Variable
计算机科学, 2015, 42(Z11): 504-507.
[7] 杨楠,吴凌,王千祥.
POP-PHP:支持PHP应用的在线集成开发环境
POP-PHP:Online Integrated Development Environment for PHP Applications
计算机科学, 2014, 41(9): 38-44. https://doi.org/10.11896/j.issn.1002-137X.2014.09.006
[8] 傅腾,高建华.
Web工程中基于不变性的元数据检查和测试
Metadata Checking and Testing of Web Application Based on Invariance
计算机科学, 2014, 41(8): 224-228. https://doi.org/10.11896/j.issn.1002-137X.2014.08.048
[9] 曹鹤玲,姜淑娟,鞠小林.
软件错误定位研究综述
Survey of Software Fault Localization
计算机科学, 2014, 41(2): 1-6.
[10] 张 平,李清宝,崔 晨.
基于路径驱动的多路径分析算法
Exploring Multiple Execution Paths Based on Execution Path Driven
计算机科学, 2013, 40(2): 145-147.
[11] 徐金秀,李志辉,尹万旺.
MPI并行调试与优化策略在三维绕流气体运动 论数值模拟中的应用
Applications of MPI Parallel Debugging and Optimization Strategy in the Gas-Kinetic Numerical Algorithm for 3-D Flows
计算机科学, 2012, 39(5): 300-303.
[12] 赵岭忠,廖伟志,钱俊彦,古天龙.
基于计算解语义的逻辑程序测试和调试框架
Framework for Integrated Testing and Debugging of Logic Programs Based on Computed Answers Semantics
计算机科学, 2009, 36(9): 115-121.
[13] 王新平,顾庆,陈翔,张鑫,陈道蓄.
基于执行轨迹的软件缺陷定位方法研究
Research on Software Fault Localization Based on Execution Trace
计算机科学, 2009, 36(10): 168-171.
[14] 鲍爱华 姚莉 刘芳 张维明.
本体变化管理技术研究综述

计算机科学, 2007, 34(9): 151-155.
[15] 孟雷 张德喜.
基于S3C4510B的嵌入式系统SDRAM接口电路的实现

计算机科学, 2006, 33(B12): 205-207.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!