This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Weird x86 Linux/GNU crashes
On Wed, Jul 31, 2002 at 09:33:41AM -0700, Joe Buck wrote:
> David Miller writes:
> > GDB exec's a shell to setup your environment properly then execute the
> > program to be debugged. In this way GDB's environemnt doesn't need
> > to be altered among other things.
>
> This "feature" of gdb has caused me nothing but pain over the years; no
> other program thinks it needs to "setup your environment properly" rather
> than just use the environment as is. In almost every case where I have
> trouble, the environment *was* set up properly before GDB destroyed it by
> exec-ing a shell. Life tends to be worse for csh/tcsh users, but bash
> users can also be messed up.
This explains so much... GDB has suddenly become useable for me, now that
I know of this "feature" (and can turn it the #!$& off).
> Unfortunately, gdb's developers like it this way, so the rest of us just
> have to work around the damage.
Freaky. You'd think if they wanted GDB to run with a different environment,
they'd use env(1) or something when starting the debugger.
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams