This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Remove variable in get_startup_shell non-static
- From: Tom Tromey <tom at tromey dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Fri, 14 Sep 2018 20:59:41 -0600
- Subject: Re: [PATCH] Remove variable in get_startup_shell non-static
- References: <20180913223416.12824-1-tom@tromey.com> <87k1npotux.fsf@redhat.com>
>>>>> "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