On 2013-01-30 16:36:42 -0500, Samuel Bronson wrote:
> "set env SHELL = /bin/sh" sets the value given to the target when *it*
> runs; this is not the same as GDB's own SHELL value, and naturally
> this does not apply to the "shell" command.  It *could* reasonably apply
> to invoking the debuggee, but it's just as reasonable for it not to do so.

OK, it seems that I had misread the gdb manual.

> Anyway, the point is that you need to set the variable *before*
> running GDB, as in:
> 
>     $ SHELL=/bin/sh gdb

Yes, this could be suggested in the warning paragraph at the end of
Section 4.4 (Your Program's Environment) of the gdb manual.

Note: What is suggested in this section about moving the setting of
environment variables to files like .login or .profile may not be a
good idea, because a command run via ssh would no longer get the
correct environment. Setting the shell to /bin/sh for gdb avoids
this problem.

> It would be nice if there was a "set shell" command, so you could put
> the following in .gdbinit:
> 
>     set shell /bin/sh

Yes.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to