From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11690 invoked by alias); 9 May 2011 03:11:05 -0000 Received: (qmail 11670 invoked by uid 22791); 9 May 2011 03:11:05 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,TW_CP,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, 09 May 2011 03:10:50 +0000 Received: (qmail 13505 invoked from network); 9 May 2011 03:10:49 -0000 Received: from unknown (HELO ?192.168.0.102?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 May 2011 03:10:49 -0000 Message-ID: <4DC75B31.2020501@codesourcery.com> Date: Mon, 09 May 2011 03:11:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: RFC: fix `gdb -write' case References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 2011-05/txt/msg00214.txt.bz2 On 05/07/2011 01:12 AM, Tom Tromey wrote: > I'd appreciate comments on this. In the absence of comments I will > check it in. I plan to put it on the 7.3 branch as well. > > This comes from: > > https://bugzilla.redhat.com/show_bug.cgi?id=696148 > FYI, I can't access this bug. I am told "You are not authorized to access bug #696148." > + > + result = allocate_value (expect_type); > + memcpy (value_contents_raw (result), obstack_base (&output), > + obstack_object_size (&output)); Compared with value_cstring, the difference is that expect_type is used here, while type used in value_cstring is got from lookup_array_range_type. struct type *stringtype = lookup_array_range_type (char_type, lowbound, highbound + lowbound - 1); Any difference on these two type variables (expect_type vs. stringtype)? > + } > + else > + result = value_cstring (obstack_base (&output), > + obstack_object_size (&output), > + type); > } > do_cleanups (cleanup); > return result; -- Yao (齐尧)