初次使用gdb调试器,出现的No symbol table is loaded. Use the "file" command.问题
2013-10-11 21:51
399 查看
初次使用gdb调试器,中间出了好多问题,例如标题所说的No symbol table is loaded. Use the "file" command.问题,是最常见的。看书时,开章就提示注意-g问题,结果还是在这个-g上栽了沟,请初次使用者一定要注意这个问题!
总结一下进入gdb环境的基本步骤:
1. 首先使用gcc -g .c文件 -o 可执行文件名 进行编译,再使用gdb + 可执行文件名进入gdb环境,进行调试。
命令如下如:
(1) gcc -g test.c -o test
(2) gdb test
(3) list等gdb命令;
2.出现问题的可能性:
(1)当编译时,未加 - g 选项,则进入gdb环境中执行命令会出现No symbol table is loaded. Use the "file" command.提示;
(2)当进入gdb环境时,未加可执行文件名,也会出现No symbol table is loaded. Use the "file" command.提示;
3.补充说明一下-g选项的作用:
在linux C中gcc编译器一章有说,-g选项的意义是“生成调试信息,该程序可以被调试器调试”
总结一下进入gdb环境的基本步骤:
1. 首先使用gcc -g .c文件 -o 可执行文件名 进行编译,再使用gdb + 可执行文件名进入gdb环境,进行调试。
命令如下如:
(1) gcc -g test.c -o test
(2) gdb test
(3) list等gdb命令;
2.出现问题的可能性:
(1)当编译时,未加 - g 选项,则进入gdb环境中执行命令会出现No symbol table is loaded. Use the "file" command.提示;
(2)当进入gdb环境时,未加可执行文件名,也会出现No symbol table is loaded. Use the "file" command.提示;
3.补充说明一下-g选项的作用:
在linux C中gcc编译器一章有说,-g选项的意义是“生成调试信息,该程序可以被调试器调试”
相关文章推荐
- gdb调试中出现No symbol table is loaded. Use the "file" command.问题
- 使用Vimdiff出现“Cannot read temp file"的问题
- 使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
- nginx升级到 0.8.53 之后,使用老的配置出现duplicate MIME type "text/html"问题的解决办法
- 使用appcompat这个包之后出现Attribute "height" has already been defined这个问题。
- 使用反射出现的问题 the type *** exists in both "###.dll" and "###.dll"
- Flex使用Weborb与.NET交互的问题:使用DataSet出现"提供的索引超出范围"异常
- 解决使用ajaxFileUpload上传控件出现的问题:回调函数总是进入error或success
- (转)使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
- 初次使用dwr出现的问题
- 在Eclipse中运行C++程序出现"Launch failed. Binary not foud"和"Program file not Specified"的问题
- ServiceMix 中使用file组件时出现无效的property的错误问题的解决
- 使用dsoframer控件出现"Unable to display the inactive document. Click here to reactivate the document."的问题
- Erlang 编译时出现"no such file or directory" 与 当前工作目录问题
- linux-ubuntu14.04下面使用gdb出现的问题
- 最近使用ajaxFileUpload和Jcrop来实现图片上传和截图,出现一个图片无法更换的问题
- 使用python(command line)出现的ImportError: No module named 'xxx'问题
- 初次使用ubuntu出现的部分问题与解决方案记录
- 在初次使用 phpMyAdmin 时,出现红色提示信息: "无法载入 mcrypt 扩展。的解决办法
- Eclipse中编译和运行时使用的JDK和JRE级别问题(关于"Bad version number in .class file"的异常解决)