From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17478 invoked by alias); 4 Oct 2010 22:59:50 -0000 Received: (qmail 17469 invoked by uid 22791); 4 Oct 2010 22:59:49 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Oct 2010 22:59:43 +0000 Received: (qmail 18914 invoked from network); 4 Oct 2010 22:59:41 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Oct 2010 22:59:41 -0000 Date: Mon, 04 Oct 2010 22:59:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: Ken Werner , gdb-patches@sourceware.org, Joel Brobecker Subject: Re: [patch] fix pre-/post- in-/decrement Message-ID: <20101004225938.GZ6985@caradoc.them.org> References: <20101004204538.GA1052@caradoc.them.org> <201010042157.o94LvlhY018611@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201010042157.o94LvlhY018611@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-10/txt/msg00034.txt.bz2 On Mon, Oct 04, 2010 at 11:57:47PM +0200, Ulrich Weigand wrote: > It would appear that even the current behavior, as shown in your trace, > already contains an unnecessary load. There should be no need to perform > a memory read to evaluate "print *$p = 1". In fact, we rely on this unintuitive behavior. If you write to any kind of memory other than RAM, then it's not possible for GDB to predict what value was actually written. Suppose you write a value to ROM with "print"; GDB should show the old value, to reflect that the variable was not modified. I can't think of a good way to test this other than by matching debug output... -- Daniel Jacobowitz CodeSourcery