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: [RFA] let record_resume fail immediately on error


The callers are very lazy, they like call a function directly.  :)

Thanks,
Hui

On Wed, Nov 11, 2009 at 06:04, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> ">" == Hui Zhu <teawater@gmail.com> writes:
>
>>> It add a new argument "catch" to do_record_message. ?If catch is true,
>>> it will call "record_message" with catch errors. ?If not, it will call
>>> "record_message" directly.
>
> I don't like this much either. ?It is trivial for callers that want to
> catch errors to catch them. ?They can use TRY_CATCH or catch_errors(...,
> record_message).
>
> Callers that don't want to catch errors should just call
> do_record_message directly. ?This is both for type safety and also
> because such calls are plain old C, and should therefore look like it.
>
> Tom
>


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