aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2014-08-19 14:55:22 +0200
committerJoel Brobecker <brobecker@adacore.com>2014-08-19 15:43:19 +0200
commitcb417230fb10c4f5b97cf8cffa973937f7bc8b6c (patch)
tree9d77480fef2c531c46e82fb4c7017bb4d3ee1092 /gdb
parent13b448cdf796fdc4a92e37a6bc20ce785b7c65dd (diff)
downloadgdb-cb417230fb10c4f5b97cf8cffa973937f7bc8b6c.zip
gdb-cb417230fb10c4f5b97cf8cffa973937f7bc8b6c.tar.gz
gdb-cb417230fb10c4f5b97cf8cffa973937f7bc8b6c.tar.bz2
value_from_pointer: remove call to resolve_dynamic_type
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/value.c9
2 files changed, 8 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8789fe8..49e58a6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/value.c b/gdb/value.c
index 3d460bd..cec1d4a 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -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;
}