This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Change exceptions.h functions to use gdb::function_view
- From: Tom Tromey <tom at tromey dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 27 Sep 2017 14:25:52 -0600
- Subject: Re: [RFA] Change exceptions.h functions to use gdb::function_view
- Authentication-results: sourceware.org; auth=none
- References: <20170927165302.30177-1-tom@tromey.com> <4098e86f-d084-fb3b-ea9b-0d5565ddd930@redhat.com>
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> I'm borderline about this. I have to say that I question the value of
Pedro> catch_exceptions&co, over just using TRY/CATCH + a scoped_restore(current_uiout)
Pedro> in the try scope + printing the exception. A TRY/CATCH is likely to be
Pedro> easier to understand and debug, I think.
[...]
Pedro> Did you consider this?
Nope. This was actually just a preparatory patch for another const change.
I can look into the change though. I agree it would be better.
>> + {
>> + return do_captured_thread_select (inner_uiout, tidstr);
>> + },
Pedro> Note the patch has several cases of tabs vs spaces like above.
Sorry about that.
Was there ever a decision about not using tabs?
In this case I think the problem is that Emacs isn't indenting lambdas
well.
Pedro> I don't think we need the casts nowadays. catch_errors takes a const
Pedro> string (since the -Wwrite-strings patch).
Ok.
Tom