我的gdb为什么不能正常运行?
郭翔阳 2002-02-28 06:41:27 我的gdb为什么不能正常运行?
我的 GDB 不会 RUN ???
我的 GDB 装在sun solaris 7 下,一切设置妥当,我开始写了个
自己的小程序,很简单。
文件名 : myc.c
#include <stdio.h>
int main()
{ int i;
i=1;
i=2;
printf("Hello World!\n");
return 0;}
我用gcc 对它进行编译 gcc -g -o myc myc.c
当前目录下生成了可执行的 myc
输入命令 myc
#myc
Hello World
#
输出结果正确.
可是我用gdb 载入它时, gdb myc
结果如下
Copyright 1998 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-pc-solaris2.7"...
(gdb) run
Starting program: /export/home/guo/DataStr/myc
/proc/577/ctl: Inappropriate ioctl for device
/proc/577/status: No such file or directory.
can't open process file
(gdb)
注意,我运行了 run 命令,可是它却报这种错,为什么会这样?? 如何才可以调试??