ISSN 1000-1239 CN 11-1777/TP

Journal of Computer Research and Development ›› 2017, Vol. 54 ›› Issue (7): 1569-1576.doi: 10.7544/issn1000-1239.2017.20160094

Previous Articles     Next Articles

QEMU-Based Dynamic Function Call Tracing

Xiang Yong1, Cao Ruidong1, Mao Yingming2   

  1. 1(Department of Computer Science and Technology, Tsinghua University, Beijing 100084);2(School of Computer Science, Beijing Institute of Technology, Beijing 100081)
  • Online:2017-07-01

Abstract: Function call has always been an important research topic in Linux kernel analysis. There are two main approaches to obtain function calls, static analysis and dynamic analysis. Using dynamic tracing approach can provide accurate and real-time function calls. It is great help to analyze and debug software programs. Considering that existing tools need some particular compile options or their tracing data is not very comprehensive, a new dynamic function call tracing tool that supports multiple CPU architectures based on an open source emulator QEMU is designed and implemented. It can provide function call and function return information including those in the Linux kernel booting phase on three architectures, x86_32, x86_64 and ARM. When the system is running, this tool intercepts procedure call and return assembly instructions. Then it logs necessary state information to file. Based on the property that these kinds of instructions must be the last one of a QEMU translation block, the amount of checked instructions is lowered and the efficiency is promoted. Only the symbol table of the program not the source code is needed to parse function call data. Test result shows that the behavior indicated by tracing data concurs with the corresponding source code. This tool has higher performance and supports more CPU architectures than S2E. It is easier to extend to other architectures.

Key words: function call, dynamic tracing, emulator, multiple platform, Linux kernel analysis

CLC Number: