首页 | 本学科首页   官方微博 | 高级检索  
     

Linux应用程序调试技术的研究
引用本文:彭闻宇,陈朔鹰.Linux应用程序调试技术的研究[J].微计算机信息,2006,22(29):181-183.
作者姓名:彭闻宇  陈朔鹰
作者单位:100081,北京市海淀区北京理工大学计算机学院
摘    要:本文介绍了C/C++函数调用机制,由此引入堆栈回朔(Stack Backtraces)方法,通过从用户堆栈中提取出执行程序的函数调用序列,迅速定位程序异常发生的位置。同时,论文结合Linux信号机制,剖析了Linux内核的核心转储(Core Dump)机制,当程序异常终止时,核心转储机制会自动将程序运行的上下文和现场信息转储到文件中,然后交由GDB进行分析。最后,本文通过比较上述两种方法的优劣,提出并实现了一种轻量级的Linux应用程序调试模型——Crash Trace。该模型借鉴了堆栈回朔的基本思想,并采纳了核心转储的基本原理,为桌面Linux和嵌入式Linux系统的应用程序调试提供了新的解决方案。

关 键 词:Linux调试技术  堆栈回朔  核心转储
文章编号:1008-0570(2006)10-2-0181-03
修稿时间:2006年1月30日

Linux Application Debugging Techniques Investigation
Peng,Wenyu,Chen,Shuoying.Linux Application Debugging Techniques Investigation[J].Control & Automation,2006,22(29):181-183.
Authors:Peng  Wenyu  Chen  Shuoying
Abstract:After a program has crashed, it is vital to reconstruct why the failure occurred, or what actions led to the error. In this pa per, it firstly introduces two different debugging techniques for Linux application: Stack Backtraces and Core Dump. Based on C/C++ function call mechanism, Stack Backtraces construct the application' s call trace from stack to reproduce its execution path and find out what went wrong and where. Compared to Stack Backtraces, Core Dump acts as an inline approach in Linux kernel and provides a powerful ability to collect information that represents the final snapshot of execution state when the program crashed. Subsequently the thesis proposes a lightweight debugging module--Crash Trace, which mainly considers the shortcoming of the above solutions andintergrates their strongpoint. In additon, it explores the implementation of Crash Trace.
Keywords:Crash Trace
本文献已被 CNKI 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号