[root@localhost test]# gcc -g -o hello hello.c
[root@localhost test]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) file hello
Reading symbols from /usr/local/test/hello...done.
(gdb) run hello
Starting program: /usr/local/test/hello hello
hello world!
[Inferior 1 (process 109928) exited normally]
Missing separate debuginfos, use: debuginfo-install glibc-2.17-323.el7_9.x86_64
(gdb) r
Starting program: /usr/local/test/hello hello
hello world!
[Inferior 1 (process 109936)
linux 下gdb的调试
最新推荐文章于 2023-06-15 01:00:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)