This is the mail archive of the gdb-patches@sources.redhat.com 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/rfc] Add backward compat to target read/write partial


Hello,

The attached patch adds backward compatibility to the recently added read/write partial target vector methods. If a given target vector has to_xfer_memory but not to_read/write_partial, the to_xfer_memory method is used.

It was implemented by adding default read/write partial methods to each target vector.

For testing, I tweaked the existing read/write memory thus:
+#if 0
   return target_xfer_memory (memaddr, myaddr, len, 0);
+#else
+  return (target_read (&current_target, TARGET_OBJECT_MEMORY,
+                      NULL, myaddr, memaddr, len)
+         <= 0);
+#endif
(included in the patch for reference, must remember to delete it ...). It turned up one bug.

Comments?

Having taken the change to this point, I'm now wondering if the read/write partial methods should be merged into:
    to_xfer_partial (targ, object, annex,
                     offset, len,
                     readbuf, writebuf)
as that would make migrating existing targets easier.

I'm just checking this in ....


Andrew



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