binutils-gdb/gdb/nat
Tom Tromey 974e684463 Unify shell-finding logic
I noticed several places in gdb that were using getenv("SHELL") and
then falling back to "/bin/sh" if it returned NULL.  This unifies
these into a single function.

gdb/ChangeLog
2018-10-27  Tom Tromey  <tom@tromey.com>

	* procfs.c (procfs_target::create_inferior): Use get_shell.
	* cli/cli-cmds.c (shell_escape): Use get_shell.
	* windows-nat.c (windows_nat_target::create_inferior): Use
	get_shell.
	* common/pathstuff.c (get_shell): New function.
	* nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
	(fork_inferior): Use get_shell.
	* common/pathstuff.h (get_shell): Declare.
2018-10-27 11:58:40 -06:00
..
aarch64-linux-hw-point.c
aarch64-linux-hw-point.h
aarch64-linux.c
aarch64-linux.h
aarch64-sve-linux-ptrace.c
aarch64-sve-linux-ptrace.h
aarch64-sve-linux-sigcontext.h
amd64-linux-siginfo.c
amd64-linux-siginfo.h
fork-inferior.c Unify shell-finding logic 2018-10-27 11:58:40 -06:00
fork-inferior.h
gdb_ptrace.h
gdb_thread_db.h
glibc_thread_db.h
linux-btrace.c
linux-btrace.h
linux-namespaces.c
linux-namespaces.h
linux-nat.h
linux-osdata.c Simple -Wshadow=local fixes 2018-10-04 22:51:45 -06:00
linux-osdata.h
linux-personality.c
linux-personality.h
linux-procfs.c
linux-procfs.h
linux-ptrace.c
linux-ptrace.h
linux-waitpid.c
linux-waitpid.h
mips-linux-watch.c
mips-linux-watch.h
ppc-linux.c
ppc-linux.h [PowerPC] Add support for HTM registers 2018-10-26 10:23:01 -03:00
x86-cpuid.h
x86-dregs.c
x86-dregs.h
x86-gcc-cpuid.h
x86-linux-dregs.c
x86-linux-dregs.h
x86-linux.c
x86-linux.h