* [RFC] confusing comment in memory_xfer_partial
@ 2008-08-06 5:25 Doug Evans
2008-08-06 5:29 ` Doug Evans
0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2008-08-06 5:25 UTC (permalink / raw)
To: drow; +Cc: gdb-patches
Hi. I don't understand this comment in memory_xfer_partial.
The code has already checked for writing to read-only memory
and reading from write-only memory. And in this `else' clause
we know readbuf is NULL.
Can you elaborate on what the comment is about?
Preserve who's const correctness?
2008-08-05 Doug Evans <dje@google.com>
* target.c (memory_xfer_partial): Delete outdated comment.
Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.169
diff -u -p -u -p -r1.169 target.c
--- target.c 9 Jul 2008 22:42:42 -0000 1.169
+++ target.c 6 Aug 2008 05:15:03 -0000
@@ -1071,9 +1071,6 @@ memory_xfer_partial (struct target_ops *
res = dcache_xfer_memory (target_dcache, memaddr, readbuf,
reg_len, 0);
else
- /* FIXME drow/2006-08-09: If we're going to preserve const
- correctness dcache_xfer_memory should take readbuf and
- writebuf. */
res = dcache_xfer_memory (target_dcache, memaddr,
(void *) writebuf,
reg_len, 1);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] confusing comment in memory_xfer_partial
2008-08-06 5:25 [RFC] confusing comment in memory_xfer_partial Doug Evans
@ 2008-08-06 5:29 ` Doug Evans
2008-08-06 5:41 ` Doug Evans
0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2008-08-06 5:29 UTC (permalink / raw)
To: drow; +Cc: gdb-patches
Ah. "Never mind."
On Tue, Aug 5, 2008 at 10:24 PM, Doug Evans <dje@google.com> wrote:
> Hi. I don't understand this comment in memory_xfer_partial.
> The code has already checked for writing to read-only memory
> and reading from write-only memory. And in this `else' clause
> we know readbuf is NULL.
> Can you elaborate on what the comment is about?
> Preserve who's const correctness?
>
> 2008-08-05 Doug Evans <dje@google.com>
>
> * target.c (memory_xfer_partial): Delete outdated comment.
>
> Index: target.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/target.c,v
> retrieving revision 1.169
> diff -u -p -u -p -r1.169 target.c
> --- target.c 9 Jul 2008 22:42:42 -0000 1.169
> +++ target.c 6 Aug 2008 05:15:03 -0000
> @@ -1071,9 +1071,6 @@ memory_xfer_partial (struct target_ops *
> res = dcache_xfer_memory (target_dcache, memaddr, readbuf,
> reg_len, 0);
> else
> - /* FIXME drow/2006-08-09: If we're going to preserve const
> - correctness dcache_xfer_memory should take readbuf and
> - writebuf. */
> res = dcache_xfer_memory (target_dcache, memaddr,
> (void *) writebuf,
> reg_len, 1);
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] confusing comment in memory_xfer_partial
2008-08-06 5:29 ` Doug Evans
@ 2008-08-06 5:41 ` Doug Evans
0 siblings, 0 replies; 3+ messages in thread
From: Doug Evans @ 2008-08-06 5:41 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
drow@google.com? A comedy of errors tonight, sigh.
[That's what I get for switching back and forth between mail programs.]
On Tue, Aug 5, 2008 at 10:28 PM, Doug Evans <dje@google.com> wrote:
> Ah. "Never mind."
>
> On Tue, Aug 5, 2008 at 10:24 PM, Doug Evans <dje@google.com> wrote:
>> Hi. I don't understand this comment in memory_xfer_partial.
>> The code has already checked for writing to read-only memory
>> and reading from write-only memory. And in this `else' clause
>> we know readbuf is NULL.
>> Can you elaborate on what the comment is about?
>> Preserve who's const correctness?
>>
>> 2008-08-05 Doug Evans <dje@google.com>
>>
>> * target.c (memory_xfer_partial): Delete outdated comment.
>>
>> Index: target.c
>> ===================================================================
>> RCS file: /cvs/src/src/gdb/target.c,v
>> retrieving revision 1.169
>> diff -u -p -u -p -r1.169 target.c
>> --- target.c 9 Jul 2008 22:42:42 -0000 1.169
>> +++ target.c 6 Aug 2008 05:15:03 -0000
>> @@ -1071,9 +1071,6 @@ memory_xfer_partial (struct target_ops *
>> res = dcache_xfer_memory (target_dcache, memaddr, readbuf,
>> reg_len, 0);
>> else
>> - /* FIXME drow/2006-08-09: If we're going to preserve const
>> - correctness dcache_xfer_memory should take readbuf and
>> - writebuf. */
>> res = dcache_xfer_memory (target_dcache, memaddr,
>> (void *) writebuf,
>> reg_len, 1);
>>
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-06 5:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-06 5:25 [RFC] confusing comment in memory_xfer_partial Doug Evans
2008-08-06 5:29 ` Doug Evans
2008-08-06 5:41 ` Doug Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox