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: [patch] only update dcache after write succeeds


Doug Evans wrote:
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?

Well, maybe only in our case. ;-)


If nobody else has any worries about it, I'm OK with it.

----
* In our case (process record), it's a bad thing for the target
beneath to be called after the user has said "no".


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