当前位置:网站首页>Related concepts of GDB in embedded system
Related concepts of GDB in embedded system
2022-07-03 01:31:00 【TangZhenye】
1. background
Debugger plays a very important role in embedded development , Download program 、 Single step debugging program 、 Lower breakpoint 、 Check the function call relationship through the function call stack . Usually we don't care about how the debugger works , Just debug , But the recognition of underlying principles is very important , This article will open a large piece of knowledge puzzle .
2. GDB What is it?
I understand , Not according to the official explanation , what GNU Plan something .GDB yes gcc A debugging program of tool chain , Notice the procedure .
3. GDB Two concepts of
GDB It's the program , The debugger is just running GDB Embedded tools for programs , In debugger GDB Procedures are often called GDB Server, seeing the name of a thing one thinks of its function , That's it. GDB The server . The server serves the client , Always listen for requests from clients . therefore ,PC There must be a GDB Client Client program .
Frequently used Jlink,ST-link Etc , Usually use your own gdb server The program runs on it , therefore , We usually use on-chip JTAG Interface ,SWD Interface to the debugger , After connecting , We are IDE Click the bug button on the to debug the board , here ,IDE Integrated in GDB Client,IDE Through this Client And ST-link perhaps Jlink Medium Server Communications , For example, send a breakpoint instruction ( stay IDE Click to show a red circle ), Then run at full speed ,Client Will send the command to run at full speed to Server, here Server Send the signal to the internal debugging unit of the chip through the actual DuPont line , The chip runs .
4. GDB Serial protocol
Usually we use the debugger to connect the development board , such Client And Server It is difficult to observe the commands sent between , therefore , Can pass qemu The way , Give Way qemu function Server Program and start the network protocol stack ,Client Connect through the network Server To debug Server End of the code , such , Through the bag capturing tool Client And Server The interactive data between them is caught , You can know what they have said between them .
5. GDB Relevant command
gdb xxx.elf // client End load symbol table
target remote ip:port // Connect Server
load xxx.elf // take elf load To Server End , It is equivalent to downloading the program again for the board
b xxx // stay xxx Break point
c // Run at full speed , Stop at breakpoint
bt // Display function call stack
.
.
.
.
.
边栏推荐
- MySQL basics 03 introduction to MySQL types
- Swiftui component Encyclopedia: using scenekit and swiftui to build interactive 3D pie charts (tutorial with source code)
- C#应用程序界面开发基础——窗体控制(1)——Form窗体
- MySQL foundation 07-dcl
- LeetCode 987. Vertical order transverse of a binary tree - Binary Tree Series Question 7
- Vim 9.0正式发布!新版脚本执行速度最高提升100倍
- Leetcode 2097 - Legal rearrangement of pairs
- The difference between tail -f, tail -f and tail
- What operations need attention in the spot gold investment market?
- [untitled]
猜你喜欢

MySQL --- 数据库查询 - 基本查询

JDBC courses

C application interface development foundation - form control (3) - file control

C#应用程序界面开发基础——窗体控制(3)——文件类控件

QTableWidget懒加载剩内存,不卡!

MySQL basic usage 02

Arduino DY-SV17F自动语音播报

一比特苦逼程序員的找工作經曆
![[C language] detailed explanation of pointer and array written test questions](/img/24/c2c372b5c435cbd6eb83ac34b68034.png)
[C language] detailed explanation of pointer and array written test questions

软考信息系统项目管理师_历年真题_2019下半年错题集_上午综合知识题---软考高级之信息系统项目管理师053
随机推荐
Matlab finds the position of a row or column in the matrix
After reading this article, I will teach you to play with the penetration test target vulnhub - drivetingblues-9
不登陆或者登录解决oracle数据库账号被锁定。
[Cao gongzatan] after working in goose factory for a year in 2021, some of my insights
如今少年已归来,人间烟火气最抚凡人心 复工了~
Key wizard play strange learning - multithreaded background coordinate recognition
【C语言】指针与数组笔试题详解
海量数据冷热分离方案与实践
MySQL基础用法02
Draw love with go+ to express love to her beloved
Top ten regular spot trading platforms 2022
Is there a handling charge for spot gold investment
[shutter] animation animation (the core class of shutter animation | animation | curvedanimation | animationcontroller | tween)
【QT】自定义控件的封装
软考信息系统项目管理师_历年真题_2019下半年错题集_上午综合知识题---软考高级之信息系统项目管理师053
Basic remote connection tool xshell
Vim 9.0正式发布!新版脚本执行速度最高提升100倍
Now that the teenager has returned, the world's fireworks are the most soothing and ordinary people return to work~
产业互联网的产业范畴足够大 消费互联网时代仅是一个局限在互联网行业的存在
按鍵精靈打怪學習-多線程後臺坐標識別