From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28292 invoked by alias); 1 Mar 2007 18:37:15 -0000 Received: (qmail 28284 invoked by uid 22791); 1 Mar 2007 18:37:15 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 01 Mar 2007 18:37:04 +0000 Received: from dsl093-172-095.pit1.dsl.speakeasy.net ([66.93.172.95] helo=caradoc.them.org) by nevyn.them.org with esmtp (Exim 4.63) (envelope-from ) id 1HMq9F-0003uN-8V; Thu, 01 Mar 2007 13:37:01 -0500 Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HMq9E-00059c-Ew; Thu, 01 Mar 2007 13:37:00 -0500 Date: Thu, 01 Mar 2007 18:37:00 -0000 From: Daniel Jacobowitz To: Jose Flavio Aguilar Paulino Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 24700] Message-ID: <20070301183700.GA19796@caradoc.them.org> Mail-Followup-To: Jose Flavio Aguilar Paulino , gdb-patches@sourceware.org References: <1172777198.10229.11.camel@kadinsky.prado> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1172777198.10229.11.camel@kadinsky.prado> User-Agent: Mutt/1.5.13 (2006-08-11) 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: 2007-03/txt/msg00003.txt.bz2 On Thu, Mar 01, 2007 at 03:26:38PM -0400, Jose Flavio Aguilar Paulino wrote: > This patch modifies the file. > It was noticed in GDB for PPC64 that the command "set var" failed when > used to change a string value, the intent of this patch is to solve this > gdb64's problem. Ex: > > char *ptr = NULL; > printf("ptr string is %s\n", ptr); > (gdb) set var ptr="def" > ---Problem Description--- > gdb64: failed to set a string variable's value. > > I could not detect any regressions that could be caused by this patch in GDB's testsuite. What is the problem, and how did the patch fix it? There are a number of style issues with the patch, but no point at looking at them until we understand the overall issue. > + if (targ != ¤t_target) > + return get_target_memory_unsigned (targ, addr2deref, 8); > + else > + { > + gdb_assert (8 <= sizeof (buf)); > + target_read_memory(addr, buf, 8); > + return extract_unsigned_integer (buf, 8); > + } What's the point of special casing based on the target? -- Daniel Jacobowitz CodeSourcery