This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] let record_resume fail immediately on error
- From: Michael Snyder <msnyder at vmware dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Hui Zhu <teawater at gmail dot com>
- Date: Tue, 08 Sep 2009 09:49:09 -0700
- Subject: Re: [RFA] let record_resume fail immediately on error
- References: <4AA5D713.1060305@vmware.com> <20090908065843.GO30677@adacore.com>
Joel Brobecker wrote:
if (!RECORD_IS_REPLAY)
{
if (do_record_message (get_current_regcache ()))
- {
- record_resume_error = 0;
- }
- else
- {
- record_resume_error = 1;
- return;
- }
+ internal_error (__FILE__, __LINE__,
+ _("record_resume: do_record_message failed."));
+
Forgive me if I'm wrong, as I don't know the record.c code at all, but
I cannot help but think that the internal_error is suspicious here.
Why is this an internal_error?
I'm certainly open to alternatives.
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?