20CN网络安全小组第一代论坛
发表新主题  发表回复

个人资料 | 社区目录 用户登录 | | 论坛搜索 | 常见问题 | 论坛主页
  下一个最老的主题   下一个最新的主题
» 20CN网络安全小组第一代论坛   » 电 脑 技 术   » 编程破解   » 关于vi和gcc的小问题

   
作者 标题: 关于vi和gcc的小问题
disguise
未注册


图标 1  发表于         编辑/删除帖子   引用原文回复  
我看过不少这方面的文章,可是还有问题
首先,请具体告诉我vi里,怎么选定一段数据,怎么复制和粘贴这段数据?
gcc怎么调试程序,也就是说,怎么一句一句执行调试程序,找出错误?
IP: 已记录
NetDemon
初级成员
编号: 2

评价成员
图标 1  发表于    NetDemon的个人资料   发送 Email 给NetDemon   发送新的短讯      编辑/删除帖子   引用原文回复  
关于vi看这个 http://www.20cn.net/ns/cn/jc/data/20010515061550.htm

UNIX上调试程序使用gdb
The purpose of a debugger such as GDB is to allow you to see what is going on `inside' another program while it executes--or what another program was doing at the moment it crashed.

GDB can do four main kinds of things (plus other things in support of these) to help you catch bugs in the act:


Start your program, specifying anything that might affect its behavior.
Make your program stop on specified conditions.
Examine what has happened, when your program has stopped.
Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another.

------------------
微软给了我窗户,因此UNIX给了我房子
微软给我窗户了吗?没有
所以UNIX没有给了我房子
我仍然游荡在Internet上

发表: 4 | 注册: 2005-02-27  |  IP: 已记录
disguise
未注册


图标 1  发表于         编辑/删除帖子   引用原文回复  
gdb调试,好象无法调试c源程序,只能调试可执行程序,如可以,告诉我方法?
因为编译时出错,无法生成可执行,我想通过gdb找出问题所在?

------------------
在netdemon,tomychen的领导下,高举unix的伟大旗帜,为了自由奉献终身!

IP: 已记录
SKY
未注册


图标 1  发表于         编辑/删除帖子   引用原文回复  
可以的,你只要在GCC连接的时候用-g
然后就可以在GDB中调试了!
IP: 已记录

 
发表新主题  发表回复 关闭主题 突出主题 移动主题 删除主题 下一个最老的主题   下一个最新的主题
 - 适于打印的主题视图
转到:
联系我们 | 20CN网络安全小组

Powered by Infopop Corporation
UBB.classic™ 6.5.0
NetDemon修改版 1.5.0, 20CN网络安全小组 版权所有。