当前位置:网站首页>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
.
.
.
.
.
边栏推荐
- Why can't the start method be called repeatedly? But the run method can?
- MySQL --- 数据库查询 - 基本查询
- 2022 cable crane driver examination registration and cable crane driver certificate examination
- d,ldc構建共享庫
- [shutter] animation animation (shutter animation type | the core class of shutter animation)
- Top ten regular spot trading platforms 2022
- 海量数据冷热分离方案与实践
- What is tone. Diao's story
- How is the mask effect achieved in the LPL ban/pick selection stage?
- The industrial scope of industrial Internet is large enough. The era of consumer Internet is only a limited existence in the Internet industry
猜你喜欢

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

How wide does the dual inline for bread board need?

电信客户流失预测挑战赛

leetcode 2097 — 合法重新排列数对

Why is it not recommended to use BeanUtils in production?

MySQL basics 03 introduction to MySQL types

力扣 204. 计数质数

MySQL --- 数据库查询 - 条件查询

【面试题】1369- 什么时候不能使用箭头函数?

【我的OpenGL学习进阶之旅】关于欧拉角、旋转顺序、旋转矩阵、四元数等知识的整理
随机推荐
[机缘参悟-36]:鬼谷子-飞箝篇 - 面对捧杀与诱饵的防范之道
按鍵精靈打怪學習-多線程後臺坐標識別
Swiftui component Encyclopedia: using scenekit and swiftui to build interactive 3D pie charts (tutorial with source code)
Matlab Doppler effect produces vibration signal and processing
[FPGA tutorial case 6] design and implementation of dual port RAM based on vivado core
Mathematical Knowledge: Steps - Nim Games - Game Theory
C#应用程序界面开发基础——窗体控制(4)——选择类控件
Androd gradle's substitution of its use module dependency
Makefile中wildcard、patsubst、notdir的含义
Druid database connection pool
Appuyez sur l'apprentissage de l'esprit de frappe - reconnaissance des coordonnées de fond multithreadées
Matlab finds the position of a row or column in the matrix
SwiftUI 组件大全之使用 SceneKit 和 SwiftUI 构建交互式 3D 饼图(教程含源码)
Expérience de recherche d'emploi d'un programmeur difficile
Basis of information entropy
[技术发展-23]:DSP在未来融合网络中的应用
Meibeer company is called "Manhattan Project", and its product name is related to the atomic bomb, which has caused dissatisfaction among Japanese netizens
Machine learning terminology
Arduino dy-sv17f automatic voice broadcast
【系统分析师之路】第五章 复盘软件工程(开发模型开发方法)