aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2014-08-11 16:37:10 -0700
committerJoel Brobecker <brobecker@adacore.com>2014-08-18 18:12:53 +0200
commit3cdcd0ce16272ae8e8183699a341d081b6eb1b21 (patch)
tree3309ad37199b955af054b55452df2af528117a60 /gdb/value.c
parent08412b0722301c4ffbd9fd51d4056bc436b69658 (diff)
downloadgdb-3cdcd0ce16272ae8e8183699a341d081b6eb1b21.zip
gdb-3cdcd0ce16272ae8e8183699a341d081b6eb1b21.tar.gz
gdb-3cdcd0ce16272ae8e8183699a341d081b6eb1b21.tar.bz2
Add support for DW_AT_data_location.
gdb/ChangeLog: * gdbtypes.h (struct main_type): Add field "data_location". (TYPE_DATA_LOCATION, TYPE_DATA_LOCATION_BATON) (TYPE_DATA_LOCATION_ADDR, TYPE_DATA_LOCATION_KIND): New macros. * gdbtypes.c (is_dynamic_type): Return 1 if the type has a dynamic data location. (resolve_dynamic_type): Add DW_AT_data_location handling. (copy_recursive, copy_type): Copy the data_location information when present. * dwarf2read.c (set_die_type): Add DW_AT_data_location handling. * value.c (value_from_contents_and_address): Add DW_AT_data_location handling.
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/value.c b/gdb/value.c
index 355194e..3d460bd 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -3398,6 +3398,9 @@ value_from_contents_and_address (struct type *type,
v = allocate_value_lazy (resolved_type);
else
v = value_from_contents (resolved_type, valaddr);
+ if (TYPE_DATA_LOCATION (resolved_type) != NULL
+ && TYPE_DATA_LOCATION_KIND (resolved_type) == PROP_CONST)
+ address = TYPE_DATA_LOCATION_ADDR (resolved_type);
set_value_address (v, address);
VALUE_LVAL (v) = lval_memory;
return v;