Abstract
Reverse debugging is the software development technique that effectively helps fix bugs occurring at the nondeterministic program behavior. It allows one to examine the past states of the program without rerunning it. An implementation of reverse debugging based on deterministic replay in the QEMU 2.0 emulator is described. A number of techniques improving the debugging performance due to reducing the amount of saved data, optimized storage of system snapshots, indexing, and compressing of the event log are proposed. The emulator can work together with the interactive GDB debugger, which makes it possible to use the reverse-continue, reverse-nexti, reverse-stepi and reverse-finish commands in the course of debugging. The execution time of these commands depends on the frequency of recording the system’s state snapshots. An estimate of the optimal frequency for the reverse-continue command is obtained.
Similar content being viewed by others
References
Dovgalyuk, P.M., Reverse Software Debugging, Velikii Novgorod: Novg. Gos. Univ, 2013 [in Russian].
Dovgalyuk, P.M., Deterministic replay of the program execution path on a virtual machine, Trudy Inst. Syst. Programm. Ross Akad Nauk, 2011, vol. 21, pp. 123–132.
Dunlap, G.W., King, S.T., Cinar, S., Basrai, M.A., and Chen, P.M., ReVirt: Enabling intrusion analysis through virtual-machine logging and replay. ACM SIGOPS Operating Systems Review OSDI’02: in Proc. of the 5th Symposium on Operating Systems Design and Implementation (OSDI-2), ACM SIGOPS Operating Systems Review, 2002, vol. 36, pp. 211–224.
Haikun Liu, Hai Jin, Xiaofei Liao and Zhengqiu Pan, XenLR: Xen-based Logging for Deterministic Replay, in Proc. of Japan-China Joint Workshop on Frontier of Computer Science and Technology, 2008, pp. 149–154.
Integrated Virtual Debugger for Visual Studio Developer’s Guide. http://www.vmware.com/pdf/ws7_visualstudio_debug.pdf. Accessed June 11, 2015.
King, S.T., Dunlap, G.W., and Chen, P.M., Debugging operating systems with time-traveling virtual machines, in Proc. of the 2005 USENIX Annual Technical Conference, USENIX, 2005, pp. 1–15.
Dike, J., A user-mode port of the Linux kernel, in Proc. of the 2000 Linux Showcase and Conference, 2000.
QEMU—Open source processor emulator. http:// wiki.qemu.org/Main_Page
Chia-Wei Hsu and Shiuhpyng Shieh, FREE: A Finegrain replaying executions by using emulation, in Proc. of the 20th Cryptology and Information Security Conference (CISC 2010), Taiwan, 2010.
Bochs—The cross platform IA-32 emulator. http://bochs.sourceforge.net
De Oliveira, D.A.S., Crandall, J.R., Wassermann, G., Wu, S.F., Zhendong Su, and Chong, F.T., ExecRecorder: VM-based full-system replay for attack analysis and system recovery, in Proc. of the 1st Workshop on Architectural and System Support for Improving Software Dependability (ASID’06), 2006, pp. 66–71.
GDB and Reverse Debugging. http://sourceware.org/gdb/news/reversible.html
Boothe, B., Efficient algorithms for bidirectional debugging, in Proc. of the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2000, pp. 299–310.
Rittinghaus, M., Miller, K., Hillenbrand, M., and Bellosa, F., Simuboost: Scalable parallelization of functional system simulation, in Proc. of the 11th International Workshop on Dynamic Analysis, WODA’03, Houston, Texas, 2013.
Robert O’Callahan, Efficient collection and storage of indexed program traces. https://www.cs.purdue.edu/homes/xyzhang/fall07/Papers/Amber.pdf
Volatility—An advanced memory forensics framework. https://code.google.com/p/volatility/
Standalone Debugging Tools for Windows (WinDbg). http://msdn.microsoft.com/enus/windows/hardware/hh852365
Using DDMS. http://developer.android.com/tools/debugging/ddms.html
Fursova, N.I., Dovgalyuk, P.M., Vasil’ev, I.A., Klimushenkova, M.A., and Makarov, V.A., Reverse debugging techniques for mobile applications, Problemy informacionnojbezopasnosti. Komp’yuternye sistemy, 2014, vol. 3, pp. 50–56.
Wireshark User’s Guide. https://www.wireshark.org/docs/wsug_html/
Author information
Authors and Affiliations
Corresponding author
Additional information
Original Russian Text © M.A. Klimushenkova, P.M. Dovgalyuk, 2017, published in Trudy Instituta Sistemnogo Programmirovaniya, vol. 27, issue 2, 2015, pp. 127–144.
Rights and permissions
About this article
Cite this article
Klimushenkova, M.A., Dovgalyuk, P.M. Improving the performance of reverse debugging. Program Comput Soft 43, 60–66 (2017). https://doi.org/10.1134/S0361768817010042
Received:
Published:
Issue Date:
DOI: https://doi.org/10.1134/S0361768817010042