Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [commit/Ada] Remove dead function (extract_string)...
Date: Tue, 12 Jan 2010 08:56:00 -0000	[thread overview]
Message-ID: <20100112085541.GI11748@adacore.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 317 bytes --]

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  <brobecker@adacore.com>

        Delete dead function.
        * ada-lang.c (extract_string): Delete.  No longer used.

Checked in.

-- 
Joel

[-- Attachment #2: extract-string.diff --]
[-- Type: text/x-diff, Size: 1345 bytes --]

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.  */

             reply	other threads:[~2010-01-12  8:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12  8:56 Joel Brobecker [this message]
2010-01-12 16:19 ` Tom Tromey
2010-01-12 18:14   ` Joel Brobecker
2010-01-12 19:43     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100112085541.GI11748@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox