value_from_pointer: remove call to resolve_dynamic_type
authorJoel Brobecker <brobecker@adacore.com>
Tue, 19 Aug 2014 12:55:22 +0000 (14:55 +0200)
committerJoel Brobecker <brobecker@adacore.com>
Tue, 19 Aug 2014 13:43:19 +0000 (15:43 +0200)
The given type is expected to always be a TYPE_CODE_PTR, for which
resolve_dynamic_type does nothing.  So this patch removes this call.

gdb/ChangeLog:

        * value.c (value_from_pointer): Remove use of resolve_dynamic_type.
        Adjust code accordingly.  Adjust function description comment.

gdb/ChangeLog
gdb/value.c

index 8789fe841c6c999836a5329e18d381b4776f1fd7..49e58a6fe3c508ca24d1f2b38bb9388b43304bba 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-19  Joel Brobecker  <brobecker@adacore.com>
+
+       * value.c (value_from_pointer): Remove use of resolve_dynamic_type.
+       Adjust code accordingly.  Adjust function description comment.
+
 2014-08-19  Yao Qi  <yao@codesourcery.com>
 
        * arm-tdep.c (arm_vfp_cprc_sub_candidate): Handle _Complex
index 3d460bd3d0be9b6555dbfb0f85bc7376bf89cd30..cec1d4a9f0994fbcec96aef11579d37b94196194 100644 (file)
@@ -3342,18 +3342,15 @@ value_from_ulongest (struct type *type, ULONGEST num)
 
 
 /* Create a value representing a pointer of type TYPE to the address
-   ADDR.  The type of the created value may differ from the passed
-   type TYPE. Make sure to retrieve the returned values's new type
-   after this call e.g. in case of an variable length array.  */
+   ADDR.  */
 
 struct value *
 value_from_pointer (struct type *type, CORE_ADDR addr)
 {
-  struct type *resolved_type = resolve_dynamic_type (type, addr);
-  struct value *val = allocate_value (resolved_type);
+  struct value *val = allocate_value (type);
 
   store_typed_address (value_contents_raw (val),
-                      check_typedef (resolved_type), addr);
+                      check_typedef (type), addr);
   return val;
 }
 
This page took 0.030888 seconds and 4 git commands to generate.