当前位置:网站首页>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
.
.
.
.
.
边栏推荐
- Matlab finds the position of a row or column in the matrix
- JDBC courses
- Button wizard play strange learning - automatic return to the city route judgment
- Vim 9.0正式发布!新版脚本执行速度最高提升100倍
- [flutter] icons component (fluttericon Download Icon | customize SVG icon to generate TTF font file | use the downloaded TTF icon file)
- [untitled]
- dotConnect for PostgreSQL数据提供程序
- Database SQL language 01 where condition
- 數學知識:臺階-Nim遊戲—博弈論
- MySQL foundation 04 MySQL architecture
猜你喜欢

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

Draw love with go+ to express love to her beloved

Force buckle 204 Count prime

MySQL基础用法02

Give you an array numbers that may have duplicate element values. It was originally an array arranged in ascending order, and it was rotated once according to the above situation. Please return the sm

MySQL

C#应用程序界面开发基础——窗体控制(2)——MDI窗体

Top ten regular spot trading platforms 2022

C application interface development foundation - form control (2) - MDI form

MySQL foundation 05 DML language
随机推荐
Machine learning terminology
如今少年已归来,人间烟火气最抚凡人心 复工了~
tail -f 、tail -F、tailf的区别
2022 cable crane driver examination registration and cable crane driver certificate examination
[day 29] given an integer, please find its factor number
Test shift right: Elk practice of online quality monitoring
Leetcode 6103 - minimum fraction to delete an edge from the tree
【FH-GFSK】FH-GFSK信号分析与盲解调研究
[FPGA tutorial case 5] ROM design and Implementation Based on vivado core
Button wizard play strange learning - automatic return to the city route judgment
[C language] detailed explanation of pointer and array written test questions
Swiftui component Encyclopedia: using scenekit and swiftui to build interactive 3D pie charts (tutorial with source code)
测试右移:线上质量监控 ELK 实战
[interview question] 1369 when can't I use arrow function?
Why is it not recommended to use BeanUtils in production?
Expérience de recherche d'emploi d'un programmeur difficile
【第29天】给定一个整数,请你求出它的因子数
Vim 9.0正式发布!新版脚本执行速度最高提升100倍
Learn the five skills you need to master in cloud computing application development
力扣 204. 计数质数