aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index bd630ee..c5145af 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -2493,8 +2493,12 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
struct value *val;
for (pinfo = addr_stack; pinfo != NULL; pinfo = pinfo->next)
- if (pinfo->type == baton->referenced_type)
- break;
+ {
+ /* This approach lets us avoid checking the qualifiers. */
+ if (TYPE_MAIN_TYPE (pinfo->type)
+ == TYPE_MAIN_TYPE (baton->referenced_type))
+ break;
+ }
if (pinfo == NULL)
error (_("cannot find reference address for offset property"));
if (pinfo->valaddr != NULL)