Fredrik Fornwall
7 years ago
7 changed files with 62 additions and 49 deletions
@ -1,11 +0,0 @@ |
|||
diff -u -r ../gdb-7.6.2/gdb/fork-child.c ./gdb/fork-child.c
|
|||
--- ../gdb-7.6.2/gdb/fork-child.c 2013-12-08 05:33:13.000000000 +0100
|
|||
+++ ./gdb/fork-child.c 2014-01-07 16:43:01.862311352 +0100
|
|||
@@ -36,7 +36,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 "@TERMUX_PREFIX@/bin/sh"
|
|||
|
|||
extern char **environ; |
@ -0,0 +1,15 @@ |
|||
diff -u -r ../gdb-8.1/gdb/common/job-control.c ./gdb/common/job-control.c
|
|||
--- ../gdb-8.1/gdb/common/job-control.c 2018-01-05 05:07:23.000000000 +0100
|
|||
+++ ./gdb/common/job-control.c 2018-02-01 21:19:44.732858138 +0100
|
|||
@@ -45,10 +45,7 @@
|
|||
if (job_control) |
|||
{ |
|||
#ifdef HAVE_SETPGID |
|||
- /* The call setpgid (0, 0) is supposed to work and mean the same
|
|||
- thing as this, but on Ultrix 4.2A it fails with EPERM (and
|
|||
- setpgid (getpid (), getpid ()) succeeds). */
|
|||
- retval = setpgid (getpid (), getpid ());
|
|||
+ retval = setpgid (0, 0);
|
|||
#else |
|||
#ifdef HAVE_SETPGRP |
|||
#ifdef SETPGRP_VOID |
@ -1,19 +1,19 @@ |
|||
On Android signal handlers are setup by the linker (through debuggerd_client): |
|||
https://github.com/android/platform_system_core/blob/6fff551728f75e35b69bd59f2bc722a72d5c6d61/debuggerd/client/debuggerd_client.cpp#L290 |
|||
|
|||
diff -u -r ../gdb-7.12/gdb/common/signals-state-save-restore.c ./gdb/common/signals-state-save-restore.c
|
|||
--- ../gdb-7.12/gdb/common/signals-state-save-restore.c 2016-10-07 13:04:17.000000000 -0400
|
|||
+++ ./gdb/common/signals-state-save-restore.c 2016-10-09 18:39:27.866619885 -0400
|
|||
@@ -58,10 +58,12 @@
|
|||
else if (res == -1) |
|||
perror_with_name (("sigaction")); |
|||
|
|||
diff -u -r ../gdb-8.1/gdb/common/signals-state-save-restore.c ./gdb/common/signals-state-save-restore.c
|
|||
--- ../gdb-8.1/gdb/common/signals-state-save-restore.c 2018-01-31 03:58:50.000000000 +0100
|
|||
+++ ./gdb/common/signals-state-save-restore.c 2018-02-01 21:38:47.791540495 +0100
|
|||
@@ -69,6 +69,7 @@
|
|||
&& oldact->sa_handler != SIG_DFL |
|||
&& oldact->sa_handler != SIG_IGN) |
|||
{ |
|||
+#ifndef __ANDROID__
|
|||
/* If we find a custom signal handler already installed, then |
|||
this function was called too late. */ |
|||
if (oldact->sa_handler != SIG_DFL && oldact->sa_handler != SIG_IGN) |
|||
internal_error (__FILE__, __LINE__, _("unexpected signal handler")); |
|||
found_preinstalled = true; |
|||
|
|||
/* Use raw fprintf here because we're being called in early |
|||
@@ -78,6 +79,7 @@
|
|||
_("warning: Found custom handler for signal " |
|||
"%d (%s) preinstalled.\n"), i, |
|||
strsignal (i)); |
|||
+#endif
|
|||
} |
|||
} |
|||
#endif |
|||
} |
|||
|
|||
|
@ -1,18 +0,0 @@ |
|||
diff -u -r ../gdb-7.10.1/gdb/inflow.c ./gdb/inflow.c
|
|||
--- ../gdb-7.10.1/gdb/inflow.c 2015-12-05 10:16:45.000000000 -0500
|
|||
+++ ./gdb/inflow.c 2016-02-07 19:28:38.979181296 -0500
|
|||
@@ -862,10 +862,10 @@
|
|||
{ |
|||
#if defined (HAVE_TERMIOS) || defined (TIOCGPGRP) |
|||
#ifdef HAVE_SETPGID |
|||
- /* The call setpgid (0, 0) is supposed to work and mean the same
|
|||
- thing as this, but on Ultrix 4.2A it fails with EPERM (and
|
|||
- setpgid (getpid (), getpid ()) succeeds). */
|
|||
- retval = setpgid (getpid (), getpid ());
|
|||
+ /* Termux change: setpgid(getpid(), getpid()), which is used upstream
|
|||
+ for working around Ultrix 4.2A issue, does not work on Android but
|
|||
+ fails with ESRCH. So revert back to simple setpgid(0,0). */
|
|||
+ retval = setpgid (0, 0);
|
|||
#else |
|||
#ifdef HAVE_SETPGRP |
|||
#ifdef SETPGRP_VOID |
@ -0,0 +1,12 @@ |
|||
diff -u -r ../gdb-8.1/gdb/nat/fork-inferior.c ./gdb/nat/fork-inferior.c
|
|||
--- ../gdb-8.1/gdb/nat/fork-inferior.c 2018-01-05 05:07:23.000000000 +0100
|
|||
+++ ./gdb/nat/fork-inferior.c 2018-02-01 21:49:06.148349274 +0100
|
|||
@@ -32,7 +32,7 @@
|
|||
|
|||
/* Default shell file to be used if 'startup-with-shell' is set but |
|||
$SHELL is not. */ |
|||
-#define SHELL_FILE "/bin/sh"
|
|||
+#define SHELL_FILE "@TERMUX_PREFIX@/bin/sh"
|
|||
|
|||
/* Build the argument vector for execv(3). */ |
|||
|
@ -0,0 +1,12 @@ |
|||
diff -u -r ../gdb-8.1/gdb/ser-pipe.c ./gdb/ser-pipe.c
|
|||
--- ../gdb-8.1/gdb/ser-pipe.c 2018-01-05 04:07:23.000000000 +0000
|
|||
+++ ./gdb/ser-pipe.c 2018-01-31 22:21:26.902931647 +0000
|
|||
@@ -122,7 +122,7 @@
|
|||
} |
|||
|
|||
close_most_fds (); |
|||
- execl ("/bin/sh", "sh", "-c", name, (char *) 0);
|
|||
+ execl ("@TERMUX_PREFIX@/bin/sh", "sh", "-c", name, (char *) 0);
|
|||
_exit (127); |
|||
} |
|||
|
Loading…
Reference in new issue