From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9417 invoked by alias); 16 Apr 2009 22:19:05 -0000 Received: (qmail 9408 invoked by uid 22791); 16 Apr 2009 22:19:04 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Apr 2009 22:19:00 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3GMIDwU031220; Thu, 16 Apr 2009 18:18:13 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3GMICI1023701; Thu, 16 Apr 2009 18:18:12 -0400 Received: from opsy.redhat.com (vpn-12-173.rdu.redhat.com [10.11.12.173]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3GMIBLS026202; Thu, 16 Apr 2009 18:18:12 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 4E4AE50830B; Thu, 16 Apr 2009 16:18:11 -0600 (MDT) To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [commit/Ada] delete ada-lang.c:extract_string and use target_read_string instead References: <20090416171914.GM7557@adacore.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Thu, 16 Apr 2009 22:19:00 -0000 In-Reply-To: <20090416171914.GM7557@adacore.com> (Joel Brobecker's message of "Thu\, 16 Apr 2009 10\:19\:14 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-04/txt/msg00398.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Joel> + xfree (main_program_name); Joel> + target_read_string (main_program_name_addr, &main_program_name, Joel> + 1024, &err_code); Joel> + Joel> + if (err_code != 0) Joel> + return NULL; Joel> return main_program_name; I don't know what the Ada compiler emits here, but offhand it seems like this needs a conversion to the host charset. I'd imagine in most cases everything is ASCII-compatible and therefore the problem never manifests. Tom