From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 365 invoked by alias); 6 Aug 2008 05:25:19 -0000 Received: (qmail 349 invoked by uid 22791); 6 Aug 2008 05:25:18 -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:24:43 +0000 Received: from zps78.corp.google.com (zps78.corp.google.com [172.25.146.78]) by smtp-out.google.com with ESMTP id m765OZrR004560 for ; Wed, 6 Aug 2008 06:24:35 +0100 Received: from localhost (ruffy.corp.google.com [172.18.118.116]) by zps78.corp.google.com with ESMTP id m765OYp8022837; Tue, 5 Aug 2008 22:24:34 -0700 Received: by localhost (Postfix, from userid 67641) id 5137E1C77BE; Tue, 5 Aug 2008 22:24:34 -0700 (PDT) To: drow@google.com cc: gdb-patches@sourceware.org Subject: [RFC] confusing comment in memory_xfer_partial Message-Id: <20080806052434.5137E1C77BE@localhost> Date: Wed, 06 Aug 2008 05:25:00 -0000 From: dje@google.com (Doug Evans) 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/msg00100.txt.bz2 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);