In Windows you can use a default debugger (gflag) that is called when a image name is run. Can be this done with GDB and Linux? In Windows it's useful for debugging services.
Regards.
There is no way to do this on Linux, short of hacking your kernel.
Nor is it usually necessary. If you always want to run e.g. /foo/bar under GDB, just do this:
mv /foo/bar /foo/bar.x
cat > /foo/bar <<EOF
#!/bin/bash
exec gdb --args /foo/bar.x "$@"
EOF
chmod +x /foo/bar
Problem solved ;-)