当前位置:网站首页>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调试信息
边栏推荐
- [WeChat applet] One article to solve button, input, image components
- Sql file import database - nanny level tutorial
- 从零开发一款相机APP, Day03: Camera 常用api和最新框架介绍
- 简单了解单例模式
- 开关电源-LLC基本原理
- IJCAI 2022杰出论文公布,大陆作者中稿298篇拿下两项第一
- 中国电信首发全新加密通话产品!有效防止网络监听
- 程序员入门的第一个程序,打印输出 “ HelloWorld “
- 即时通讯移动端开发之网络连接优化
- 传奇版本添加npc修改增加npc方法以及配置参数教程
猜你喜欢

Leetcode67. 二进制求和

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

【MySQL】ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘

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

Linux下 mysql5.7的彻底卸载

Bika LIMS - SENAITE using open source LIMS set (users, roles and departments)
![[Numpy] 创建数组](/img/a8/1c2dc07d08b70a4ec66d8070f218b9.png)
[Numpy] 创建数组

Vscode搭建ESP32-C3开发环境

企业如何走出固定资产管理的困境?

计算机专业面试进阶指南
随机推荐
Go-Excelize API源码阅读(七)—— CopySheet(from, to int)
【C#】WCF和TCP消息通信练习,实现聊天功能
Gee engine modification UI interface graphic tutorial
大一(下)暑假作业
如何监控海外服务器性能
JS_ deleting the invalid data in the array undefined '0' null false NaN
snap软件中哨兵2A数据预处理及六种常用植被指数的计算
超年轻!34岁教授,任985王牌学院副院长!
传奇服务端GOM引擎和GEE引擎区别在哪里?
HCIP第十三天笔记(BGP的路由过滤、BGP的社团属性、MPLS)
程序员是职业病高发群体,别天真的以为只有秃头那么简单,才不是呢。
Go - reading (7), CopySheet Excelize API source code (the from and to the int)
一口气说出4种主流数据库ID自增长,面试官懵了
线上支付,出款和收款
关于知识付费的一些思考
How Navicat Connects to MySQL
C language game ------ greedy snake ---- for Xiaobai
学习的时候碰见的一个sql问题,希望大佬们可以解答一二?
如何使用MISRA改进嵌入式编程
[10:00 Open Class]: Application Exploration of Kuaishou GPU/FPGA/ASIC Heterogeneous Platform