This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] only update dcache after write succeeds
- From: Doug Evans <dje at google dot com>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Marc Khouzam <marc dot khouzam at ericsson dot com>, Greg Law <glaw at undo-software dot com>, Pedro Alves <pedro at codesourcery dot com>, Hui Zhu <teawater at gmail dot com>
- Date: Mon, 14 Sep 2009 12:43:43 -0700
- Subject: Re: [patch] only update dcache after write succeeds
- References: <20090914191657.E32D6844C3@localhost> <4AAE98F1.3000501@vmware.com>
On Mon, Sep 14, 2009 at 12:26 PM, Michael Snyder <msnyder@vmware.com> wrote:
> Doug Evans wrote:
>>
>> Hi.
>>
>> Marc, Greg: Can you see if this patch fixes things for you?
>
> Hey Doug,
Hey Michael, :-)
> I tested this change, and it does indeed seem to fix the problem
> with target record -- but. ? ;-)
>
> Part of the reason that it works is that record_xfer_partial
> calls error() instead of returning -1. ?If I change it so that
> it returns -1, things get more complicated.
>
> The do-while loop that used to follow and now preceeds this code
> calls target-beneath, which in our case results in several different
> target methods being called, one of which eventually returns > 0.
>
> That just means that in the present case, calling error is correct.
> But I worry about some of the other cases where the target method
> returns -1, and whether badness might occur in some other cases.
How does one reconcile "eventually returns > 0" with "badness"?
IOW, if some target method does return > 0, then the write succeeded, right?
Are there different kinds of "success" in effect here?