aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/gdb/value.c b/gdb/value.c
index aec3b4b..7566921 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -2025,34 +2025,6 @@ value_from_pointer (struct type *type, CORE_ADDR addr)
}
-/* Create a value for a string constant to be stored locally
- (not in the inferior's memory space, but in GDB memory).
- This is analogous to value_from_longest, which also does not
- use inferior memory. String shall NOT contain embedded nulls. */
-
-struct value *
-value_from_string (char *ptr)
-{
- struct value *val;
- int len = strlen (ptr);
- int lowbound = current_language->string_lower_bound;
- struct type *string_char_type;
- struct type *rangetype;
- struct type *stringtype;
-
- rangetype = create_range_type ((struct type *) NULL,
- builtin_type_int32,
- lowbound, len + lowbound - 1);
- string_char_type = language_string_char_type (current_language,
- current_gdbarch);
- stringtype = create_array_type ((struct type *) NULL,
- string_char_type,
- rangetype);
- val = allocate_value (stringtype);
- memcpy (value_contents_raw (val), ptr, len);
- return val;
-}
-
/* Create a value of type TYPE whose contents come from VALADDR, if it
is non-null, and whose memory address (in the inferior) is
ADDRESS. */