This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 3/5 v3] Darwin: set startup-with-shell to off on Sierra and later.


On 2018-09-09 12:12, Xavier Roirand wrote:
On Mac OS X Sierra and later, the shell is not allowed to be
debug so add a check and disable startup with shell in that
case. This disabling is done temporary before forking
inferior and restored after the fork.

gdb/ChangeLog:

        * darwin-nat.c (should_disable_startup_with_shell):
        New function.
        (darwin_nat_target::create_inferior): Add call.

Change-Id: Ie4d9090f65fdf2e83ecf7a0f9d0647fb1c27cdcc
---
 gdb/darwin-nat.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index be80163d22e..c4fc942b02e 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -1854,11 +1854,38 @@ darwin_execvp (const char *file, char * const
argv[], char * const env[])
   posix_spawnp (NULL, argv[0], NULL, &attr, argv, env);
 }

+/* Read kernel version, and return TRUE on Sierra or later.  */
+
+static int
+should_disable_startup_with_shell ()

Ah, forgot to mention this previously. Please use return a bool, and use small-case true/false. The patch is fine to push with that fixed.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]