Font Size: a A A

Design And Implementation Of A Gdb Debugger For An Embedded Mobile Platform

Posted on:2013-04-28Degree:MasterType:Thesis
Country:ChinaCandidate:N CuiFull Text:PDF
GTID:2248330374999079Subject:Software engineering
Abstract/Summary:PDF Full Text Request
GDB is an open source debugger. It is a supremely powerful tool and is extremely useful. The GDB supports the following significant features:making easy cross platform, supporting instruction level and function level control (include step, jump, and return), supporting read/write registers, supporting condition breaks and hardware breaks, supporting kernel and application level debugging, and supporting multi-thread/multi-process control.GDB can work on linux/Unix embedded platform, but not on RTOS. This paper introduces GDB remote debugging technology which based on the ARM platform within RTOS kernel.The GDB remote debugging resolution consists of GDB debbuger and GDB-stub. The GDB debugger runs on host and the GDB-stub is a port of program on the target. They are connected by serial port in this project and they could also be connected by parallel port or Ethernet. It is necessary to build GDB debugger, implement GDB-stub, and make some other modifications on the platform (such as setting trap at the beginning of the program, changing vector table, and so on).The GDB debugger source code could be downloaded on the Internet, note to configure the target as ARM before building GDB debugger. The GDB-stub is a very complex agent on the target, responding to GDB debugger by reading or writing memory/register. The GDB debugger communicates with GDB-stub by GDB Remote Serial Protocol (RSP). The GDB RSP is a simple ASCII message based protocol, including reading/writing memory, setting/getting register, controlling the programs. The most of coding works are to implement the GDB-stub. Some other coding is necessary, which is closely related with the platform. It needs to study architecture of ARM to know how to handle exceptions. Maybe this part only has a few codes but it is important.This paper introduces how the GDB works at first, and then shows how to get GDB debugger source code and build GDB debbger for ARM platform on linux server, and then analyzes the features of ARM (including seven modes, thirty-seven registers, CPSR, and exceptions). At last this paper also introduces the GDB-stub and some other modifications on the target program.This paper presents a GDB remote debugging solution for RTOS on ARM platform. The solution can greatly improve the efficiency of the development and reduce costs of the project. Also it is a reference for similar projects.
Keywords/Search Tags:GDB, RTOS, ARM, GDB Remote Serial Protocol
PDF Full Text Request
Related items