当前位置:网站首页>Gdb debugging common concepts finishing
Gdb debugging common concepts finishing
2022-07-29 13:57:00 【Biaobiao】
GDB 调试模型
There are two main debug models:Code debugging tracking and optimization(一)--- 如何用GDB 调试代码?_流云IoT的博客-CSDN博客
- 本地调试:调试程序和被调试程序运行在同一台电脑中.

- 远程调试:调试程序运行在一台电脑中,被调试程序运行在另一台电脑中(Or an embedded development board).红线表示GDB(也叫host)与GdbServer(也叫target)之间通过串口线或者网络进行通讯(GdbServerPort monitoring will be performed,比如3333,GDB进行remote target 3333Connect like this),用于传输GDB 调试消息的通讯协议可以称为GDB Remote Serial Protocol(GDB RSP).GDP RSP The message mainly includes four parts,Fixed start character(’$’)和结束字符(’#’),Intermediate debug message data and final checksum.可参阅文档:Howto: GDB Remote Serial

注意:就算GDBand the debugged program on one computer,We can still use this remote debugging method.
GDB 调试功能
GDB 主要有2debug function:
- gdb program:使用GDB Start executing the debugged programprogram,可通过GDB 命令控制program 的行为;
还可以:gdb program core:使用GDB Execute the debugged program at the same timeprogram 和core 文件(When a program aborts or exits abnormally,Saved memory image plus debug info file,Contains the program's current memory、寄存器、堆栈等信息),It is convenient to locate the cause of the abnormal abort or exit of the analyzer; - gdb attach PID (gdb -p PID):使用GDB 接管(attach)一个正在运行的被调试程序,PID for the program being debuggedprocess-ID(可通过pidof program 查看),可通过GDB 命令控制program 的行为.
GDB Debug command interface type
主要有3种接口:About the debugger and IDE的一些认识_标biao的博客-CSDN博客_ide调试器
- cll接口,就是用户接口,我们在命令行执行gdb进行调试,Enter the next step,Commands such as breakpoints,Even this interface
- mi接口,That is, the machine interface,To be someone else'sIDEThe backend sends commands(很多主流IDE都是用这个).
- 还有个emacsEditor version of the interface,It is estimated that it is for the editordiyFor lovers.
参考文章:
Embedded debuggingGDB使用_标biao的博客-CSDN博客_gdb 嵌入式
Summary of processor debugging breakpoint principle_标biao的博客-CSDN博客
GDB实现原理_标biao的博客-CSDN博客_gdb实现原理
关于ELFInterpretation of debugging information in the format file_标biao的博客-CSDN博客_elf调试信息
边栏推荐
猜你喜欢

C语言小游戏------贪吃蛇----小白专用

A recent paper summarizes

Bika LIMS - SENAITE using open source LIMS set (users, roles and departments)

2022年七夕情人节有什么值得推荐的礼物选择?实用且高级礼物推荐

Project Manager: Not bad!The SSO single sign-on code is written, and the sequence diagram is also drawn?

Vscode搭建ESP32-C3开发环境

万字长文,揭秘华为数据治理体系!

trivy如何从非关系型数据库查询数据

ISME | 沈其荣团队韦中组-土壤生物障碍发生的根际微生物组诊断

MySQL基础篇(四)-- 数据表的基本操作
随机推荐
常坐飞机的你,为什么老惦记着“升舱”?
C# autoCAD 几个经常用到的功能代码。
Nacos hierarchical storage model - the cluster configuration and NacosRule load balance
HCIP第十三天笔记(BGP的路由过滤、BGP的社团属性、MPLS)
【论文阅读】Anomaly Detection in Video via Self-Supervised and Multi-Task Learning
期货合约知多少
app小程序开发的营销优势有什么?
The core principles of electronic games
即时通讯场景下安全合规的实践和经验
计算机专业面试进阶指南
A recent paper summarizes
苹果手机用久了卡顿,学会这样清理缓存,清理后和新机一样流畅
关于知识付费的一些思考
关于ESI研究前沿的思考和使用方法研究
开关电源-半桥LLC控制
Project Manager: Not bad!The SSO single sign-on code is written, and the sequence diagram is also drawn?
R Error in :missing values are not allowed in subscripted assignments of data frames
Mysql stored procedures, rounding
何享健“A拆A”又败一局,美的旗下美智光电终止创业板IPO
Meta,元宇宙和广告双败的一季