bestyt@localhost bestyt$> gdb GNU gdb 5.2.1 Copyright 2002 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 "i686-pc-linux-gnu". (gdb) file kim Reading symbols from kim...done. (gdb) list 1 #include 2 3 int main() 4 { 5 int i; 6 7 printf("Hello World\n"); 8 9 return 1; 10 } (gdb) run Starting program: /home/bestyt/kim Cannot exec : No such file or directory. Program exited with code 0177. You can't do that without a process to debug. (gdb) quit This scripts run onto xterm with Xfree86-4.2.1. kim program, Hello World, exists /home/bestyt directory. I guess, this problem is fault's X in gentoo 1.4rc1. I had tried to run this program on console terminal without X. bestyt@localhost bestyt$> gdb GNU gdb 5.2.1 Copyright 2002 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 "i686-pc-linux-gnu". (gdb) file kim Reading symbols from kim...done. (gdb) run Starting program: /home/bestyt/kim Hello World Program exited with code 01. (gdb) quit I don't know why my computer do that. Is it a bug? ps. CPU 755MHz, RAM 256M,... Toshiba portege 2000 notebook Gentoo System 1.4rc1
just as a possibility... gdb-5.3 is currently in portage. Can you please test and see if you have the same problem with this version?
I have done many successful gdb sessions using 5.3 in an xterm.