|
|
mkdir c
cd c
touch hello.c
vim hello.c
-------------------------------------------------------------------------------------------------
1 //gdb测试程序
2
3 #include<stdio.h>
4
5 int main (void)
6 {
7 printf("hello welcome to the linux world!\n");
8
9 return 0;
10 }
11
-------------------------------------------------------------------------------------------------
gcc hello.c -o hello -g
ls
hello hello.c
-------------------------------------------------------------------------------------------------
file hello
hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.1, dynamically linked (uses shared libs), not stripped
-------------------------------------------------------------------------------------------------
gdb
GNU gdb 6.4.90-debian
Copyright (C) 2006 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 "x86_64-linux-gnu".
(gdb)
------------------------------------------------------------------------------------------------
file hello
BFD: /home/fender/programming/c/hello: don't know how to handle OS specific section `.gnu.hash' [0x6ffffff6]
"/home/fender/programming/c/hello": not in executable format: 不可识别的文件格式
(gdb)
------------------------------------------------------------------------------------------------
上面就是整个的过程
我以前也是这样做的
但是昨天发现不行了
不知道是什么原因
谁来帮帮我谢谢了先
我在百度上找了一下发现还没有相关的问题
只有一个人说gdb不工作,是file source.c
其他就没有人说自己的gdb有问题
我觉得gdb是gnu的重要项目
不太可能有问题
最近我的操作系统升级过
apt-get dist-upgrade
升级以后发现不能进入桌面
后来dpkg-reconfigure xserver-xorg
不显卡的驱动改成vesa就好了
原来的驱动列表里面好像没有intel升级以后才有
但是用intel也不能进入桌面
后来就改成了vesa
我主要的硬件和系统如下:
Pocessor:Intel PD-915(EM64)
Motherboad:Intel D946gzis
RAM:1.0G/667Mz
HD:160G/8M
OS:Windows XP 32 + Debian Linux etch amd64
是不是升级出现的问题呢? |
|