This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [OB] comment fix, corelow.c
On Wed, 2008-01-16 at 09:04 -0500, Daniel Jacobowitz wrote:
> On Tue, Jan 15, 2008 at 05:16:58PM -0800, Michael Snyder wrote:
> > cut and paste botch...
>
> FYI, no objection, but I think it was right the way it was too...
>
> > return (*ops->deprecated_xfer_memory) (offset, readbuf,
> > - len, 0/*write*/, NULL, ops);
> > + len, 0/*read*/, NULL, ops);
>
> The value of the parameter is 0, and its name was write.
I don't think the comment refers to the name of the parameter.
If you look, there are two adjacent calls to xfer_memory:
if (readbuf)
return (*ops->deprecated_xfer_memory) (offset, readbuf,
len, 0/*read*/, NULL, ops);
if (writebuf)
return (*ops->deprecated_xfer_memory) (offset, (gdb_byte *) writebuf,
len, 1/*write*/, NULL, ops);
One call is a read, the other is a write.
None of the other parameters have their names in a comment.