From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20387 invoked by alias); 23 Oct 2013 15:38:55 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 20377 invoked by uid 89); 23 Oct 2013 15:38:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout21.012.net.il Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Oct 2013 15:38:53 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MV400N00OK21I00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Wed, 23 Oct 2013 18:38:41 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MV400M1MOSHV890@a-mtaout21.012.net.il>; Wed, 23 Oct 2013 18:38:41 +0300 (IDT) Date: Wed, 23 Oct 2013 15:38:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Make STARTUP_WITH_SHELL a runtime toggle -- add new "set/show startup-with-shell" option. In-reply-to: <1382532024-28890-1-git-send-email-palves@redhat.com> To: Pedro Alves Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83ppqwhu98.fsf@gnu.org> References: <1382532024-28890-1-git-send-email-palves@redhat.com> X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00724.txt.bz2 > From: Pedro Alves > 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.