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: RFC: lazily call save_current_space_and_thread


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

>> +      if (current_space_cleanup == NULL)
>> +	current_space_cleanup = save_current_space_and_thread ();

Jan> save_current_space_and_thread - like any make_cleanup derivation -
Jan> may return NULL even for successfully pushed cleanup function.  For
Jan> example inside TRY_CATCH, due to its save_cleanups.

In this case I still think it is safe -- but it is silly to rely on that
when a flag is just as easy.

I think I can actually make make_cleanup_restore_current_thread more
efficient.  But if not, I will reimplement this with a flag.

Tom


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