[RFA] let record_resume fail immediately on error

Joel Brobecker brobecker@adacore.com
Tue Sep 8 17:05:00 GMT 2009


> It's some kind of error, because we're in the record phase, and
> "do_record_message" (which records the side effects of the instruction)
> returned failure.  Most likely it hit some resource limit, but it is
> possible that something else happened like trying to read from an
> unreadable memory location.
>
> You think simple error would be better?

To me, I see internal_errors as programing errors. From what you are
saying above, calling error would be more appropriate.

Taking a step back, if you had in fact hit a resource limit in
do_record_message, wouldn't it have been better to report the error
there? The error could then be a lot more precise and informative.
However, I see that do_record_message is a simple catch_errors wrapper,
so the error would be trapped, and your error-condition-checking code
would not trigger (catch_errors return zero in that case)... In any
case, these are just idle thoughts - improvements if any can be done
as part of another patch.

-- 
Joel



More information about the Gdb-patches mailing list