gdb - the gnu debugger.doc


文档分类:高等教育 | 页数:约4页 举报非法文档有奖
1/4
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/4
文档列表 文档介绍
gdb - the Gnu Debugger The purpose of these notes is to quickly introduce just a few useful features of gdb, the interactive debugger that goes with the Gnu piler (gcc). The notes are for impatient folks who have an immediate problem to solve and don't want to take the time to read more than the bare essentials. This debugger has many powerful features, and is especially convenient to call from inside the Gnu emacs text editor. If you want to learn all about gdb you should read more. Finding Where your Program Dies Suppose your program has died with a discouraging error message from the shell like "Segmentation fault" or "Bus error". These messages generally indicate that your program has tried to use an invalid pointer or array index. To fix the error you need to find out where the program was executing when it died. That is easy to do with gdb. First make sure piled all your code using the "-g" option of the piler. This is necessary for you to be able to use symbolic names of subprograms, variables, etc. in gdb. Suppose the name of the program you are debugging is prog4 . Now, run gdb as follows: gdb prog4 You will see a e message and prompt from gdb, something like this: GNU gdb Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are e to change it and/or distribute copies of it under certain conditions.

gdb - the gnu debugger 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数4
  • 收藏数0 收藏
  • 顶次数0
  • 上传人薄荷牛奶
  • 文件大小0 KB
  • 时间2016-05-14
最近更新