From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17025 invoked by alias); 18 Jan 2006 23:33:35 -0000 Received: (qmail 17011 invoked by uid 22791); 18 Jan 2006 23:33:33 -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; Wed, 18 Jan 2006 23:33:32 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EzMny-00057S-Df for gdb-patches@sourceware.org; Wed, 18 Jan 2006 18:33:30 -0500 Date: Wed, 18 Jan 2006 23:33:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: [ob] More warnings; Call for assistance Message-ID: <20060118233330.GA19612@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20060117151730.GA2420@nevyn.them.org> <8f2776cb0601171715h4afaf38cm6e25b1983e73b1a9@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f2776cb0601171715h4afaf38cm6e25b1983e73b1a9@mail.gmail.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00240.txt.bz2 On Tue, Jan 17, 2006 at 05:15:24PM -0800, Jim Blandy wrote: > On 1/17/06, Daniel Jacobowitz wrote: > > LA_PRINT_STRING takes a const gdb_byte * argument for the string. But this > > is a NUL-terminated string in the debugger's memory; I think stepping back > > to char * is the best fix here. That's the expprint.c warnings. > > I wrote that up, but then I didn't like it. The use of 'char *' > should be reserved for host-format character strings, but it looks to > me like LA_PRINT_STRING expects a string in the target format. (Not > that the interface documentation offers much help here.) Look at the > way c_printstr unpacks the string character by character using > extract_unsigned_integer. Look at the way LA_EMIT_CHAR is responsible > for calling target_char_to_host. > > If folks agree, then I'll make the comments in language.h clearer, and > try to finish off this change. Makes sense to me. That requires messing with the type of the char in the expression union (or just dropping it when we drop the warning, which is fine by me too - we're well out into the swamps at this point). -- Daniel Jacobowitz CodeSourcery