1 / 51
文档名称:

嵌入式Linux交叉调试器设计与实现技术研究.pdf

格式:pdf   页数:51
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

嵌入式Linux交叉调试器设计与实现技术研究.pdf

上传人:peach1 2014/2/24 文件大小:0 KB

下载得到文件列表

嵌入式Linux交叉调试器设计与实现技术研究.pdf

文档介绍

文档介绍:华中科技大学
硕士学位论文
嵌入式Linux交叉调试器设计与实现技术研究
姓名:许佳力
申请学位级别:硕士
专业:计算机应用技术
指导教师:阳富民
20080606
摘要
随着计算机应用的不断普及和深化,嵌入式系统及其应用已经成为全球 IT 产业
发展的一个热点。嵌入式系统的调试作为嵌入式软件开发的一个不可或缺的辅助手
段,占有十分重要的位置。
为 Linux 程序开发提供一个友好的、易操作的交叉调试环境,开发了基于嵌入
式 Linux 的源码级交叉调试器。该调试器运行于 Windows 环境下,目标端为基于 ARM
体系结构的嵌入式 CPU 芯片,调试代理采用 GDBServer,调试对象为采用 DWARF2
调试信息格式的 ELF 目标文件。
在该交叉调试器中,RSP 协议是调试器与 GDBServer 的消息通信规范。宿主端
调试器采用 RSP 协议对调试命令进行封装并发送给目标机上的调试代理
GDBServer,接收调试代理返回的调试信息并依据 RSP 协议对调试信息进行解析,
以获取目标程序的当前运行状态。为了协调配合调试器和调试代理之间的有效通信,
提供了 RSP 协议的消息发送与接收程序。
源代码与目标代码之间的映射关系是源码级调试的关键。为此,研究了 ELF 目
标文件格式和 DWARF2 调试信息格式,设计了相应的符号表数据结构,使用 BFD
库提供的接口读取 ELF 目标文件上的采用 DWARF2 格式的调试信息,为源码中的每
一个符号提供了相关的调试信息,实现了源代码和目标程序之间的映射。
最后,分析了交叉调试的工作过程,设计了一组调试命令,定义了相关数据结
构,介绍了宿主端调试器的主控循环,并以断点设置、连续执行和单步执行为例,
介绍了相应调试功能的实现技术。


关键字: 嵌入式系统,交叉调试,远程串行通信协议

I
Abstract
From the time that the puter was born to the present,with the ration and
deepening puter application,embedded systems application has e a hot in the
global IT industry Systems debugging,as an indispensable mean
during the embedded software development plays a very important ,the
research of embedded software debugging technology has important significance.
Baseed on the IDE of Embedded System,the souce-level crosss debugger is running
under Windows target is embedded CPU chip based on the ARM
debug-agent is object being debugged is ELF files
including DWARF2 debugging whole debugging system aims at
offering a friendly,ease operation cross debugging environment for developing Linux
simply introducing RSP and the principle of symbol table,according to the
requirement of functions of debugger,basic functions of source-level cross debugger is
implemented.
On munication module, the municates with debug-agent via
RSP, the corresponding algorithm is given. On the symbol-processing module,according to
the