Skip to content

Commit

Permalink
vla: temp. fix for FC20 32bit regression.
Browse files Browse the repository at this point in the history
Temp. fix for FC20 32bit regression.

Change-Id: I667a0461f8d782e145220d9219b723c5b30876f5
  • Loading branch information
Keven Boell committed Aug 12, 2014
1 parent 9023458 commit 364a416
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
10 changes: 10 additions & 0 deletions gdb/gdbtypes.c
Expand Up @@ -2001,6 +2001,16 @@ resolve_dynamic_type (struct type *type, CORE_ADDR addr)
return resolve_dynamic_type_internal (type, addr, 1);
}

/* See gdbtypes.h */

LONGEST *
dynamic_prop_get_const_val_ptr (struct dynamic_prop *prop)
{
gdb_assert (prop->kind == PROP_CONST);

return &prop->data.const_val;
}

/* Find the real type of TYPE. This function returns the real type,
after removing all layers of typedefs, and completing opaque or stub
types. Completion changes the TYPE argument, but stripping of
Expand Down
10 changes: 7 additions & 3 deletions gdb/gdbtypes.h
Expand Up @@ -1212,9 +1212,9 @@ extern void allocate_gnat_aux_type (struct type *);
#define TYPE_INDEX_TYPE(type) TYPE_FIELD_TYPE (type, 0)
#define TYPE_RANGE_DATA(thistype) TYPE_MAIN_TYPE(thistype)->flds_bnds.bounds
#define TYPE_LOW_BOUND(range_type) \
TYPE_RANGE_DATA(range_type)->low.data.const_val
(*dynamic_prop_get_const_val_ptr (&TYPE_RANGE_DATA(range_type)->low))
#define TYPE_HIGH_BOUND(range_type) \
TYPE_RANGE_DATA(range_type)->high.data.const_val
(*dynamic_prop_get_const_val_ptr (&TYPE_RANGE_DATA(range_type)->high))
#define TYPE_LOW_BOUND_UNDEFINED(range_type) \
(TYPE_RANGE_DATA(range_type)->low.kind == PROP_UNDEFINED)
#define TYPE_HIGH_BOUND_UNDEFINED(range_type) \
Expand All @@ -1230,7 +1230,7 @@ extern void allocate_gnat_aux_type (struct type *);
#define TYPE_BYTE_STRIDE_LOCLIST(range_type) \
TYPE_RANGE_DATA(range_type)->stride.data.loclist
#define TYPE_BYTE_STRIDE_KIND(range_type) \
TYPE_RANGE_DATA(range_type)->stride.kind
(*dynamic_prop_get_const_val_ptr (&TYPE_RANGE_DATA(range_type)->stride))


/* Attribute accessors for the type data location. */
Expand Down Expand Up @@ -1767,6 +1767,10 @@ extern struct type *resolve_dynamic_type (struct type *type, CORE_ADDR addr);
/* * Predicate if the type has dynamic values, which are not resolved yet. */
extern int is_dynamic_type (struct type *type);

/* * Fetch const_val reference from PROP. It is never dynamically resolved,
the correct KIND is checked by gdb_assert. */
extern LONGEST *dynamic_prop_get_const_val_ptr (struct dynamic_prop *prop);

extern struct type *check_typedef (struct type *);

#define CHECK_TYPEDEF(TYPE) \
Expand Down

0 comments on commit 364a416

Please sign in to comment.