diff options
author | Anton Gorenkov <xgsa@sourceware.org> | 2012-04-14 12:18:50 +0000 |
---|---|---|
committer | Anton Gorenkov <xgsa@sourceware.org> | 2012-04-14 12:18:50 +0000 |
commit | 8264ba82b71a186e10fddc298c5eb6e68742a94a (patch) | |
tree | 6a127bac3d88db9846b9b2db0a98a21fd31b7f0c /gdb/value.h | |
parent | 5f18041e78f879768645b113054261313517234a (diff) | |
download | gdb-8264ba82b71a186e10fddc298c5eb6e68742a94a.zip gdb-8264ba82b71a186e10fddc298c5eb6e68742a94a.tar.gz gdb-8264ba82b71a186e10fddc298c5eb6e68742a94a.tar.bz2 |
gdb/doc/ChangeLog:
2012-04-14 Anton Gorenkov <xgsa@yandex.ru>
PR mi/13393
* gdb.texinfo (Print Settings): Extend the description for "set print
object".
(GDB/MI Variable Objects): Extend the description for -var-create and
-var-list-children.
gdb/testsuite/ChangeLog:
2012-04-14 Anton Gorenkov <xgsa@yandex.ru>
PR mi/13393
* gdb.mi/mi-var-rtti.cc: New file.
* gdb.mi/mi-var-rtti.exp: New file.
* lib/mi-support.exp (mi_varobj_update_with_child_type_change): New
function.
(mi_varobj_update_with_type_change): updated to avoid code duplication.
gdb/ChangeLog:
2012-04-14 Anton Gorenkov <xgsa@yandex.ru>
PR mi/13393
* value.c (value_actual_type): New function.
* value.h (value_actual_type): New declaration.
* varobj.c (update_type_if_necessary): New function.
(varobj_create): Call value_actual_type instead of
value_type.
(install_dynamic_child): distinct changed and type changed MI variable
objects.
(update_dynamic_varobj_children): Updated for install_dynamic_child
change. All callers updated.
(varobj_update): Support for MI variable object type change if
the value changed and RTTI is used to determine the type.
(create_child_with_value): Call value_actual_type instead of
value_type.
(adjust_value_for_child_access): Extended with a new parameter which
specify whether the given value should be casted to enclosing type.
All callers updated.
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/value.h b/gdb/value.h index 4d04a20..03aa5fd 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -138,6 +138,22 @@ extern struct type *value_enclosing_type (struct value *); extern void set_value_enclosing_type (struct value *val, struct type *new_type); +/* Returns value_type or value_enclosing_type depending on + value_print_options.objectprint. + + If RESOLVE_SIMPLE_TYPES is 0 the enclosing type will be resolved + only for pointers and references, else it will be returned + for all the types (e.g. structures). This option is useful + to prevent retrieving enclosing type for the base classes fields. + + REAL_TYPE_FOUND is used to inform whether the real type was found + (or just static type was used). The NULL may be passed if it is not + necessary. */ + +extern struct type *value_actual_type (struct value *value, + int resolve_simple_types, + int *real_type_found); + extern int value_pointed_to_offset (struct value *value); extern void set_value_pointed_to_offset (struct value *value, int val); extern int value_embedded_offset (struct value *value); |