diff options
author | Joel Brobecker <brobecker@gnat.com> | 2010-11-23 01:10:54 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2010-11-23 01:10:54 +0000 |
commit | 96dbd2c1329cb2900621c5057e4068d2e116a15a (patch) | |
tree | 365195813ced163ae3cdf775b0d2880b07919010 /gdb/source.h | |
parent | 27f2a97baff4c840ed98027b7eab67d905fe93c8 (diff) | |
download | gdb-96dbd2c1329cb2900621c5057e4068d2e116a15a.zip gdb-96dbd2c1329cb2900621c5057e4068d2e116a15a.tar.gz gdb-96dbd2c1329cb2900621c5057e4068d2e116a15a.tar.bz2 |
[Ada] array pointers encoded as typedef to fat pointer
A recent change in check_typedef caused the following regression,
considering:
type String_Access is access String;
S1 : String_Access := null;
Trying to print S1, we get:
(gdb) print s1
$1 = (string) (null)
The type name is wrong. We were expecting:
(gdb) print s1
$1 = (string_bug.string_access) (null)
The extensive comment in this patch explains how pointers to arrays
are encoded when the array is a "fat pointer". What happened is
that the change in check_typedef broke a type-equality test that
we were performing. The test really was on the fringe, but it
turns out that, for what we're doing, we're really only interested
in the main-type portion of the type.
The patch adjust the check accordingly.
gdb/ChangeLog:
* ada-lang.c (ada_to_fixed_type): Expand function documentation.
Return the original type if the main type portions match rather
than when the type themselves match.
Diffstat (limited to 'gdb/source.h')
0 files changed, 0 insertions, 0 deletions