当前位置:网站首页>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
.
.
.
.
.
边栏推荐
- Type expansion of non ts/js file modules
- 【C语言】指针与数组笔试题详解
- Dotconnect for PostgreSQL data provider
- Soft exam information system project manager_ Real topic over the years_ Wrong question set in the second half of 2019_ Morning comprehensive knowledge question - Senior Information System Project Man
- Why can't the start method be called repeatedly? But the run method can?
- tail -f 、tail -F、tailf的区别
- What is tone. Diao's story
- Leetcode 2097 - Legal rearrangement of pairs
- 【我的OpenGL学习进阶之旅】关于欧拉角、旋转顺序、旋转矩阵、四元数等知识的整理
- [my advanced journey of OpenGL learning] collation of Euler angle, rotation order, rotation matrix, quaternion and other knowledge
猜你喜欢
Excel calculates the difference between time and date and converts it into minutes
【C语言】指针与数组笔试题详解
Telephone network problems
看完这篇 教你玩转渗透测试靶机Vulnhub——DriftingBlues-9
C application interface development foundation - form control (3) - file control
CF1617B Madoka and the Elegant Gift、CF1654C Alice and the Cake、 CF1696C Fishingprince Plays With Arr
【FPGA教程案例6】基于vivado核的双口RAM设计与实现
MySQL - database query - basic query
[principles of multithreading and high concurrency: 2. Solutions to cache consistency]
Draw love with go+ to express love to her beloved
随机推荐
力扣 204. 计数质数
LDC Build Shared Library
Matlab finds the position of a row or column in the matrix
SSL flood attack of DDoS attack
[技术发展-23]:DSP在未来融合网络中的应用
MySQL foundation 04 MySQL architecture
Machine learning terminology
Why can't the start method be called repeatedly? But the run method can?
Create your first Kivy program Hello word (tutorial includes source code)
[shutter] animation animation (the core class of shutter animation | animation | curvedanimation | animationcontroller | tween)
产业互联网的产业范畴足够大 消费互联网时代仅是一个局限在互联网行业的存在
How is the mask effect achieved in the LPL ban/pick selection stage?
Learn the five skills you need to master in cloud computing application development
Database SQL language 02 connection query
Kivy教程大全之如何在 Kivy 中创建下拉列表
MySQL基础用法02
The difference between tail -f, tail -f and tail
kivy教程之在 Kivy App 中使用 matplotlib 的示例
MySQL foundation 05 DML language
Meibeer company is called "Manhattan Project", and its product name is related to the atomic bomb, which has caused dissatisfaction among Japanese netizens