From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3080 invoked by alias); 6 Aug 2008 05:29:18 -0000 Received: (qmail 3072 invoked by uid 22791); 6 Aug 2008 05:29:17 -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:28:37 +0000 Received: from zps18.corp.google.com (zps18.corp.google.com [172.25.146.18]) by smtp-out.google.com with ESMTP id m765SVjM002846 for ; Wed, 6 Aug 2008 06:28:32 +0100 Received: from rv-out-0708.google.com (rvbl33.prod.google.com [10.140.88.33]) by zps18.corp.google.com with ESMTP id m765SOcL014618 for ; Tue, 5 Aug 2008 22:28:31 -0700 Received: by rv-out-0708.google.com with SMTP id l33so2564642rvb.58 for ; Tue, 05 Aug 2008 22:28:31 -0700 (PDT) Received: by 10.141.49.6 with SMTP id b6mr8663726rvk.223.1218000511026; Tue, 05 Aug 2008 22:28:31 -0700 (PDT) Received: by 10.141.99.20 with HTTP; Tue, 5 Aug 2008 22:28:30 -0700 (PDT) Message-ID: Date: Wed, 06 Aug 2008 05:29:00 -0000 From: "Doug Evans" To: drow@google.com Subject: Re: [RFC] confusing comment in memory_xfer_partial Cc: gdb-patches@sourceware.org In-Reply-To: <20080806052434.5137E1C77BE@localhost> 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/msg00101.txt.bz2 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); > >