diff options
author | Jerome Guitton <guitton@adacore.com> | 2014-02-12 12:08:23 +0100 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2014-03-10 14:40:35 +0100 |
commit | 5ec18f2b48ab74bbbaf436324ce3947df3bc048e (patch) | |
tree | 5f01e6d0aa8c860be1e8befb994d2b15ec8d415b /gdb/ser-pipe.c | |
parent | 7d03f2eb64305b386f2ae8b733e0a2a143fd4ffd (diff) | |
download | gdb-5ec18f2b48ab74bbbaf436324ce3947df3bc048e.zip gdb-5ec18f2b48ab74bbbaf436324ce3947df3bc048e.tar.gz gdb-5ec18f2b48ab74bbbaf436324ce3947df3bc048e.tar.bz2 |
[Ada] Full view of tagged type with ptype
When evaluating an expression, if it is of a tagged type, GDB reads
the tag in memory and deduces the full view. At parsing time, however,
this operation is done only in the case of OP_VAR_VALUE. ptype does
not go through a full evaluation of expressions so it may return some
odd results:
(gdb) print c.menu_name
$1 = 0x0
(gdb) ptype $
type = system.strings.string_access
(gdb) ptype c.menu_name
type = <void>
This change removes this peculiarity by extending the tag resolution
to UNOP_IND and STRUCTOP_STRUCT. As in the case of OP_VAR_VALUE, this
implies switching from EVAL_AVOID_SIDE_EFFECTS to EVAL_NORMAL when a
tagged type is dereferenced.
gdb/
* ada-lang.c (ada_evaluate_subexp): Resolve tagged types to
full view in the case of UNOP_IND and STRUCTOP_STRUCT.
gdb/testsuite/
* gdb.ada/tagged_access: New testcase.
Diffstat (limited to 'gdb/ser-pipe.c')
0 files changed, 0 insertions, 0 deletions