cleanup: replace allocate_value and memcpy with value_from_contents
authorSanimir Agovic <sagovic@sourceware.org>
Thu, 29 Aug 2013 12:21:29 +0000 (12:21 +0000)
committerSanimir Agovic <sagovic@sourceware.org>
Thu, 29 Aug 2013 12:21:29 +0000 (12:21 +0000)
2013-08-29  Sanimir Agovic  <sanimir.agovic@intel.com>

* value.c (value_from_contents_and_address): Replace allocate_value and
memcpy with value_from_contents.

gdb/ChangeLog
gdb/value.c

index 23ca7689bba6c1cd419d8de3ffa5233c22270538..7f9056cc2ea27a6bef87b59ca51f8d97c4040d94 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-29  Sanimir Agovic  <sanimir.agovic@intel.com>
+
+       * value.c (value_from_contents_and_address): Replace allocate_value and
+       memcpy with value_from_contents.
+
 2013-08-29  Phil Muldoon  <pmuldoon@redhat.com>
 
        * python/py-framefilter.c (py_print_frame): Remove usage of
index d96c07b10cdc61cd73576b66adc7986784aae33c..73702571dd153f9633e3526f5805abe8638ebc97 100644 (file)
@@ -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;
This page took 0.031078 seconds and 4 git commands to generate.