当前位置: 技术问答>linux和unix
linux gdb: 我在一台机器上编译的程序用GDB可以调试,把程序放到另外一台机器上调试,调试信息就没有了 这是什么原因呢?
来源: 互联网 发布时间:2017-01-17
本文导语: 我在一台机器上编译的程序用GDB可以调试,把程序放到另外一台机器上调试,调试信息就没有了 这是什么原因呢? 可以调试: [root@eix bussiness]# gdb bussiness GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.2) Copyright...
我在一台机器上编译的程序用GDB可以调试,把程序放到另外一台机器上调试,调试信息就没有了 这是什么原因呢?
可以调试:
[root@eix bussiness]# gdb bussiness
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.2)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
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 "i386-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/bruce/oa-srv/project/bussiness/bussiness...done.
(gdb) l
118 // TRACE_EXCEPTION(pException);
119 SERVICE::instance ()->SetEvent();
120 // exit(0);
121
122 return EXCEPTION_EXECUTE_HANDLER;
123 }
124
125 #endif
126
127 int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
(gdb)
不可以调试:
[bill@localhost ~]$ gdb bussiness
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-32.el5_6.2)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
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 "i386-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/bill/bussiness...done.
(gdb) l
118 ../../com/service/ProcessSVR.cpp: 没有那个文件或目录.
in ../../com/service/ProcessSVR.cpp
(gdb)
可以调试:
[root@eix bussiness]# gdb bussiness
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.2)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
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 "i386-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/bruce/oa-srv/project/bussiness/bussiness...done.
(gdb) l
118 // TRACE_EXCEPTION(pException);
119 SERVICE::instance ()->SetEvent();
120 // exit(0);
121
122 return EXCEPTION_EXECUTE_HANDLER;
123 }
124
125 #endif
126
127 int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
(gdb)
不可以调试:
[bill@localhost ~]$ gdb bussiness
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-32.el5_6.2)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
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 "i386-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/bill/bussiness...done.
(gdb) l
118 ../../com/service/ProcessSVR.cpp: 没有那个文件或目录.
in ../../com/service/ProcessSVR.cpp
(gdb)
|
118 ../../com/service/ProcessSVR.cpp: 没有那个文件或目录.
====
不是没有调试信息,是没有源代码。
====
不是没有调试信息,是没有源代码。
|
要是只要加-g就能看到源码,那别人还敢发布debug版本吗?。。。
|
|
必须有源码,调试时才能看到具体代码
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。