summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2011-11-07 14:38:00 +0059
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2011-11-07 14:38:00 +0059
commitaabf926a67e1e470282021cf2ea766c8dd3585cd (patch)
tree11fadca76ed8132741dc1f305107013f1f9b2feb
parent57edbc9982131fca2044ea9481efec50ec5b3aed (diff)
downloadgdb-aabf926a67e1e470282021cf2ea766c8dd3585cd.tar.gz
gdb: Fix locating shelllinaro-android-gdb-7.3-2011.10
Android's sh is located in /system/bin rather than /bin Make sure gdb and related tools can find it there. Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--gdb/cli/cli-cmds.c2
-rw-r--r--gdb/fork-child.c2
-rw-r--r--gdb/procfs.c2
-rw-r--r--gdb/ser-pipe.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 7fd2f50..ea5f8f6 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -733,7 +733,7 @@ shell_escape (char *arg, int from_tty)
const char *p, *user_shell;
if ((user_shell = (char *) getenv ("SHELL")) == NULL)
- user_shell = "/bin/sh";
+ user_shell = "/system/bin/sh";
/* Get the name of the shell for arg0. */
p = lbasename (user_shell);
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index bb173e7..37e2f72 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -38,7 +38,7 @@
#include <signal.h>
/* This just gets used as a default if we can't find SHELL. */
-#define SHELL_FILE "/bin/sh"
+#define SHELL_FILE "/system/bin/sh"
extern char **environ;
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 917e122..dfc2b35 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -4879,7 +4879,7 @@ procfs_create_inferior (struct target_ops *ops, char *exec_file,
struct stat statbuf;
if (path == NULL)
- path = "/bin:/usr/bin";
+ path = "/system/bin:/bin:/usr/bin";
tryname = alloca (strlen (path) + strlen (shell_file) + 2);
for (p = path; p != NULL; p = p1 ? p1 + 1: NULL)
diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c
index 9bf0d04..2c01616 100644
--- a/gdb/ser-pipe.c
+++ b/gdb/ser-pipe.c
@@ -132,7 +132,7 @@ pipe_open (struct serial *scb, const char *name)
for (old = pidlist; old; old = old->next)
close (fileno (old->fp)); /* Don't allow a flush. */
#endif
- execl ("/bin/sh", "sh", "-c", name, (char *) 0);
+ execl ("/system/bin/sh", "sh", "-c", name, (char *) 0);
_exit (127);
}