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]

[RFC 0/6] A different approach to startup-with-shell on macOS


Currently the macOS port will disable startup-with-shell on versions
of macOS that have System Integrity Protection.  This is done because
with SIP, gdb cannot ptrace certain executables, including the normal
shells.

This series implements a different approach: copy the user's shell
executable to the cache directory and arrange to use the copy.  This
avoids the SIP restrictions.

Most of the series is just cleanup, rearranging so some private
functions can be shared, and fixing a few small things I noticed along
the way.

This has been regression tested by one of the buildbot builders, and
then I tested the final patch on macOS High Sierra.

One question I have is whether it's possible to build gdb on an older
version of macOS and then run it on a newer version.  If this can be
done, then the #if-based approach taken in the final patch will not
work.

I didn't include any way to control this feature other than "set
startup-with-shell off".  My thinking was that turning this off will
just result in failures, which isn't useful.  However if there's a
reason to do something else, I could add it.

Tom



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