gdb+gdbserver找不到符号文件的问题

发布时间:2020-07-26 07:16:52 作者:zhegaozhouji
阅读:1280
亿速云数据库,弹性扩容,低至0.3元/天! 查看>>

远端gdbserver已经起来,本地使用gdb已经连接上gdbserver,但是本地提示找不到符号文件:

warning: Could not load vsyscall page because no executable was specified

try using the "file" command first.

那么使用file命令,指定被调试的可执行文件即可:

file /opt/linuxshare/helloworld/main

这里要注意一下,file指定的main已经是一个ELF可执行文件,也就是正在被调试的程序,另外,这个文件其实是存在于远端磁盘上,但是已经被mount到了本地机器上。

file成功后即可看到源码:

(gdb) file /opt/linuxshare/helloworld/main

A program is being debugged already.

Are you sure you want to change the file? (y or n) y

Reading symbols from /opt/linuxshare/helloworld/main...done.

(gdb) b main

Breakpoint 1 at 0x40055c: file main.c, line 3.

(gdb) info b

Num     Type           Disp Enb Address            What

1       breakpoint     keep y   0x000000000040055c in main at main.c:3

(gdb) l

1 #include <stdio.h>

2 int main() {

3    printf("Hello World\n");

4

5    int i = 0;

6    while(1)

7    {

8 sleep(3);

9 printf("time: %d\n", ++i);

10    }

亿速云「云数据库 MySQL」免部署即开即用,比自行安装部署数据库高出1倍以上的性能,双节点冗余防止单节点故障,数据自动定期备份随时恢复。点击查看>>

推荐阅读:
  1. android 关于资源找不到的问题
  2. node.js 模块找不到的问题

开发者交流群:

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

gdb gdbserver 符号文件 bs 找不

上一篇:关于nagios监控页面主机时有时无的问题

下一篇:远程连接oracle数据库设置

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》
开发者交流群×