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: [PATCH] Remove variable in get_startup_shell non-static


>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:

Sergio> IIRC this code was added by a patch of mine.  I think your patch makes
Sergio> sense.  Perhaps, since the SHELL can't change once you start GDB, this
Sergio> function could be made a bit smarter and check whether "ret" has been
Sergio> initialized or not (in order to call "getenv" just once), but really,
Sergio> that's not necessary at all, and your patch is totally fine.

I poked a little at the macOS shell / SIP thing.  One possible solution
is copying the shell, and in this situation it's convenient if
get_startup_shell does not cache.  I already checked this in, but I
thought I'd mention it anyway in case someone was tempted to change it.

Tom


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