gdb cannot break
第一次打开“ddd 我的程序”,会显示:... ... /bin-linux<<C++ namespace>> : No such file or directory.
我编译用 “-gdward-2". 这时,我还有机会打开源程序文件。可是对”main.cpp",显示:Line number 1 is out of range for "main.cpp" .
在main中设断点,总说”No line 40 in file main.cpp"
请问应该怎么办?
谢谢
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
没写过,也没调过c++
学习了.
[yangn@localhost bin-linux]$ gdb cduicc
GNU gdb Red Hat Linux (6.3.0.0-1.159.el4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) list
1 <<C++-namespaces>>: No such file or directory.
in <<C++-namespaces>>
(gdb)
觉得就是奇怪,我已经用“-ggdb"选项,gcc用422版本。
谢谢!
不用ddd,先用gdb试试?