First of here is the small C program in question(happens on all other C/C++ programs too) I compile it with gcc hello.c -g -o hello Then ldd hello /lib/libsandbox.so => /lib/libsandbox.so (0x40018000) libc.so.6 => /lib/libc.so.6 (0x40032000) libdl.so.2 => /lib/libdl.so.2 (0x40162000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) Clearly libsandbox & libdl shouldn't even be there. Here is the C program int main(int argc, char** argv){ return 0; } Now the major pain in the ass. Gdb refuses to work, no matter what. Here is a *debugging* session on the above executable gdb ./hello GNU gdb 5.1.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) run Starting program: /home/taras/Projects/axel-sr/./hello Cannot exec : No such file or directory. Program exited with code 0177. You can't do that without a process to debug. As you can see, gdb doesn't even see it. I tried gdb 5.1.1 from gentoo..and even compiled my own 5.2..the results are exactly the same. gdb used to work on this system, and gcc linked fine..But a few weeks ago gdb stopped working( i think its when updated to 1.0) then I moved to the latest. linked my make.profile to default-1.0..etc Still gdb wont work.. I discovered the bogus linkage today, not sure whats causing it either. Please help, I need a working gdb.
What was the fix? I am unable to run GDB because of the same error.