From 314c7de970512fe51bcd24829306c4aee2ada762 Mon Sep 17 00:00:00 2001 From: Sanimir Agovic Date: Thu, 29 Aug 2013 12:21:29 +0000 Subject: [PATCH] cleanup: replace allocate_value and memcpy with value_from_contents 2013-08-29 Sanimir Agovic * value.c (value_from_contents_and_address): Replace allocate_value and memcpy with value_from_contents. --- gdb/ChangeLog | 5 +++++ gdb/value.c | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 23ca7689bba..7f9056cc2ea 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-08-29 Sanimir Agovic + + * value.c (value_from_contents_and_address): Replace allocate_value and + memcpy with value_from_contents. + 2013-08-29 Phil Muldoon * python/py-framefilter.c (py_print_frame): Remove usage of diff --git a/gdb/value.c b/gdb/value.c index d96c07b10cd..73702571dd1 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -3188,10 +3188,7 @@ value_from_contents_and_address (struct type *type, if (valaddr == NULL) v = allocate_value_lazy (type); else - { - v = allocate_value (type); - memcpy (value_contents_raw (v), valaddr, TYPE_LENGTH (type)); - } + v = value_from_contents (type, valaddr); set_value_address (v, address); VALUE_LVAL (v) = lval_memory; return v; -- 2.30.2