From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3514 invoked by alias); 6 Aug 2008 05:41:34 -0000 Received: (qmail 3485 invoked by uid 22791); 6 Aug 2008 05:41:33 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 06 Aug 2008 05:40:58 +0000 Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id m765epFM024410 for ; Wed, 6 Aug 2008 06:40:52 +0100 Received: from rv-out-0506.google.com (rvbg37.prod.google.com [10.140.83.37]) by wpaz21.hot.corp.google.com with ESMTP id m765eobm028710 for ; Tue, 5 Aug 2008 22:40:51 -0700 Received: by rv-out-0506.google.com with SMTP id g37so2609851rvb.25 for ; Tue, 05 Aug 2008 22:40:50 -0700 (PDT) Received: by 10.140.128.3 with SMTP id a3mr8653223rvd.195.1218001250525; Tue, 05 Aug 2008 22:40:50 -0700 (PDT) Received: by 10.141.99.20 with HTTP; Tue, 5 Aug 2008 22:40:50 -0700 (PDT) Message-ID: Date: Wed, 06 Aug 2008 05:41:00 -0000 From: "Doug Evans" To: "Daniel Jacobowitz" Subject: Re: [RFC] confusing comment in memory_xfer_partial Cc: gdb-patches@sourceware.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080806052434.5137E1C77BE@localhost> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00103.txt.bz2 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 wrote: > Ah. "Never mind." > > On Tue, Aug 5, 2008 at 10:24 PM, Doug Evans 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 >> >> * 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); >> >> >