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


> 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


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