Re: [PATCH] Make STARTUP_WITH_SHELL a runtime toggle -- add new "set/show startup-with-shell" option.

Eli Zaretskii
2013-10-23T15:38:55Z

> From: Pedro Alves <palves@redhat.com>
> Date: Wed, 23 Oct 2013 13:40:24 +0100
>
> Occasionaly we hear about people having problems with GDB not being
> able to start programs (with "run"/"start"). GDB spawns a shell to
> start the program, and most often, it'll be the case that the problem
> is actually with the user's shell setup.
>
> GDB has code to disable the use of the shell to start programs.
> That's the STARTUP_WITH_SHELL macro that native targets could set to 0
> in their nm.h file (though no target actually uses it nowadays).
>
> This patch makes that setting a run-time knob instead. This will be
> useful to quickly diagnose such shell issues, and might also come in
> handy at other times (such as when debugging the shell itself, if you
> don't have a different shell handy).

Thanks.

> Comments? Are the docs OK?

The docs are OK with a few comments.

> +@smallexample
> +(@value{GDBP}) During startup program terminated with signal SIGSEGV, Segmentation fault.
> +@end smallexample

This line is too long, it will cause overflow of the page boundaries.

> +which indicates the shell or the wrapper specified with
> +@samp{exec-wrapper} crashed, not your program. Most often, this is
> +caused by something odd in your shell's initialization file---such as
> +@file{.cshrc} for C-shell, or @file{.bashrc} for BASH. To help
> +diagnose such issues, you can disable use of a shell with @kbd{set
> +startup-with-shell off}.

There should be a prominent note here to the effect that invoking the
inferior bypassing the shell disables command-line redirection.

OK with those changes.