小言_互联网的博客

Linux学习系列十四:使用gdb和gdbserver构建在线调试环境

603人阅读  评论(0)

单片机一般使用Jlink通过SWD或者JTAG接口直接在IDE中在线调试,Linux应用程序通常是加printf输出log去调试,这种方式简单,但是有些隐藏的程序bug只通过加打印信息不那么容易定位,这时可以通过类似单片机调试的gdb调试来实现,本篇为大家介绍linux环境下在线调试环境的搭建,希望对大家有所帮助。

GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it executes -- or what another program was doing at the moment it crashed.

它的工作原理是:在主机Ubuntu下运行gdb,在嵌入式板子上运行gdbserver,这样就可以在线调试了。    

全文内容见:

https://topsemic.com/1609.html

 

本系列往期文章见:

1:Linux学习系列一:开发环境搭建

2:Linux 学习系列二:运行 Hello World

3:Linux学习系列三:uboot编译下载

4:Linux学习系列四:Kernel编译下载

5:Linux学习系列五:Nand Flash根文件系统制作

6:Linux学习系列六:操作GPIO

7:Linux学习系列七:操作UART

8:Linux学习系列八:操作网口

9:Linux学习系列九:使用WIFI

10:Linux学习系列十:使用CAN

11:Linux学习系列十一:使用4G模块

12:Linux学习系列十二:LCD QT UI显示

13:Linux学习系列十三:USB摄像头拍照

 

微信交流群,欢迎加入


转载:https://blog.csdn.net/wangwenxue1989/article/details/102090721
查看评论
* 以上用户言论只代表其个人观点,不代表本网站的观点或立场