This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/Ada] Remove dead function (extract_string)...
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 12 Jan 2010 12:55:41 +0400
- Subject: [commit/Ada] Remove dead function (extract_string)...
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
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. */