From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1613 invoked by alias); 12 Jan 2010 08:56:03 -0000 Received: (qmail 1600 invoked by uid 22791); 12 Jan 2010 08:56:02 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jan 2010 08:55:58 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 348C3410ED for ; Tue, 12 Jan 2010 03:55:57 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TwKDmwBNsfTy for ; Tue, 12 Jan 2010 03:55:57 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id A66FE410EA for ; Tue, 12 Jan 2010 03:55:56 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id DB588F595E; Tue, 12 Jan 2010 12:55:41 +0400 (RET) Date: Tue, 12 Jan 2010 08:56:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [commit/Ada] Remove dead function (extract_string)... Message-ID: <20100112085541.GI11748@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Y7xTucakfITjPcLV" Content-Disposition: inline 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-01/txt/msg00296.txt.bz2 --Y7xTucakfITjPcLV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 317 I just noticed this unused function in ada-lang.c. It turns out I was supposed to have deleted it last year, but somehow I forgot. Fixed thusly. 2010-01-12 Joel Brobecker Delete dead function. * ada-lang.c (extract_string): Delete. No longer used. Checked in. -- Joel --Y7xTucakfITjPcLV Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="extract-string.diff" Content-length: 1345 Index: ada-lang.c =================================================================== RCS file: /cvs/src/src/gdb/ada-lang.c,v retrieving revision 1.240 diff -u -p -r1.240 ada-lang.c --- ada-lang.c 12 Jan 2010 05:48:56 -0000 1.240 +++ ada-lang.c 12 Jan 2010 08:48:43 -0000 @@ -65,8 +65,6 @@ #define TRUNCATION_TOWARDS_ZERO ((-5 / 2) == -2) #endif -static void extract_string (CORE_ADDR addr, char *buf); - static void modify_general_field (struct type *, char *, LONGEST, int, int); static struct type *desc_base_type (struct type *); @@ -359,25 +357,6 @@ ada_print_array_index (struct value *ind fprintf_filtered (stream, " => "); } -/* Read the string located at ADDR from the inferior and store the - result into BUF. */ - -static void -extract_string (CORE_ADDR addr, char *buf) -{ - int char_index = 0; - - /* Loop, reading one byte at a time, until we reach the '\000' - end-of-string marker. */ - do - { - target_read_memory (addr + char_index * sizeof (char), - buf + char_index * sizeof (char), sizeof (char)); - char_index++; - } - while (buf[char_index - 1] != '\000'); -} - /* Assuming VECT points to an array of *SIZE objects of size ELEMENT_SIZE, grow it to contain at least MIN_SIZE objects, updating *SIZE as necessary and returning the (new) array. */ --Y7xTucakfITjPcLV--