aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPierre-Marie de Rodat <derodat@adacore.com>2015-04-03 14:53:12 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2015-04-03 15:23:49 +0200
commit25755e2b85e2bd5b313ea87f32000bf9a47dbbf8 (patch)
treec03127ce0c63a9af30f19d9ad6d9c9e80ffe30f5 /gdb
parent961f41602529c9cd4f88af6c02fb61fb55100e27 (diff)
downloadgdb-25755e2b85e2bd5b313ea87f32000bf9a47dbbf8.zip
gdb-25755e2b85e2bd5b313ea87f32000bf9a47dbbf8.tar.gz
gdb-25755e2b85e2bd5b313ea87f32000bf9a47dbbf8.tar.bz2
gdbtypes.c: remove the usuned "top_level" parameter
This paramater is no longer useful after the previous commit, so remove it as a cleanup. gdb/ChangeLog: * gdbtypes.c (is_dynamic_type_internal): Remove the unused "top_level" parameter. (resolve_dynamic_type_internal): Remove the unused "top_level" parameter. Update call to is_dynamic_type_internal. (is_dynamic_type): Update call to is_dynamic_type_internal. (resolve_dynamic_range): Update call to resolve_dynamic_type_internal. (resolve_dynamic_union): Likewise. (resolve_dynamic_struct): Likewise. (resolve_dynamic_type): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/gdbtypes.c30
2 files changed, 27 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d8a684f..fed4e9e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,18 @@
2015-04-03 Pierre-Marie de Rodat <derodat@adacore.com>
+ * gdbtypes.c (is_dynamic_type_internal): Remove the unused
+ "top_level" parameter.
+ (resolve_dynamic_type_internal): Remove the unused "top_level"
+ parameter. Update call to is_dynamic_type_internal.
+ (is_dynamic_type): Update call to is_dynamic_type_internal.
+ (resolve_dynamic_range): Update call to
+ resolve_dynamic_type_internal.
+ (resolve_dynamic_union): Likewise.
+ (resolve_dynamic_struct): Likewise.
+ (resolve_dynamic_type): Likewise.
+
+2015-04-03 Pierre-Marie de Rodat <derodat@adacore.com>
+
* gdbtypes.c (is_dynamic_type_internal): Remove special handling of
TYPE_CODE_REF types so that they are not considered as dynamic
depending on the referenced type.
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 6fb2e9a..4aec5ec 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1748,7 +1748,7 @@ stub_noname_complaint (void)
/* Worker for is_dynamic_type. */
static int
-is_dynamic_type_internal (struct type *type, int top_level)
+is_dynamic_type_internal (struct type *type)
{
type = check_typedef (type);
@@ -1773,7 +1773,7 @@ is_dynamic_type_internal (struct type *type, int top_level)
of the range type are static. It allows us to assume that
the subtype of a static range type is also static. */
return (!has_static_range (TYPE_RANGE_DATA (type))
- || is_dynamic_type_internal (TYPE_TARGET_TYPE (type), 0));
+ || is_dynamic_type_internal (TYPE_TARGET_TYPE (type)));
}
case TYPE_CODE_ARRAY:
@@ -1782,9 +1782,9 @@ is_dynamic_type_internal (struct type *type, int top_level)
/* The array is dynamic if either the bounds are dynamic,
or the elements it contains have a dynamic contents. */
- if (is_dynamic_type_internal (TYPE_INDEX_TYPE (type), 0))
+ if (is_dynamic_type_internal (TYPE_INDEX_TYPE (type)))
return 1;
- return is_dynamic_type_internal (TYPE_TARGET_TYPE (type), 0);
+ return is_dynamic_type_internal (TYPE_TARGET_TYPE (type));
}
case TYPE_CODE_STRUCT:
@@ -1794,7 +1794,7 @@ is_dynamic_type_internal (struct type *type, int top_level)
for (i = 0; i < TYPE_NFIELDS (type); ++i)
if (!field_is_static (&TYPE_FIELD (type, i))
- && is_dynamic_type_internal (TYPE_FIELD_TYPE (type, i), 0))
+ && is_dynamic_type_internal (TYPE_FIELD_TYPE (type, i)))
return 1;
}
break;
@@ -1808,11 +1808,11 @@ is_dynamic_type_internal (struct type *type, int top_level)
int
is_dynamic_type (struct type *type)
{
- return is_dynamic_type_internal (type, 1);
+ return is_dynamic_type_internal (type);
}
static struct type *resolve_dynamic_type_internal
- (struct type *type, struct property_addr_info *addr_stack, int top_level);
+ (struct type *type, struct property_addr_info *addr_stack);
/* Given a dynamic range type (dyn_range_type) and a stack of
struct property_addr_info elements, return a static version
@@ -1860,7 +1860,7 @@ resolve_dynamic_range (struct type *dyn_range_type,
static_target_type
= resolve_dynamic_type_internal (TYPE_TARGET_TYPE (dyn_range_type),
- addr_stack, 0);
+ addr_stack);
static_range_type = create_range_type (copy_type (dyn_range_type),
static_target_type,
&low_bound, &high_bound);
@@ -1928,7 +1928,7 @@ resolve_dynamic_union (struct type *type,
continue;
t = resolve_dynamic_type_internal (TYPE_FIELD_TYPE (resolved_type, i),
- addr_stack, 0);
+ addr_stack);
TYPE_FIELD_TYPE (resolved_type, i) = t;
if (TYPE_LENGTH (t) > max_len)
max_len = TYPE_LENGTH (t);
@@ -1985,7 +1985,7 @@ resolve_dynamic_struct (struct type *type,
TYPE_FIELD_TYPE (resolved_type, i)
= resolve_dynamic_type_internal (TYPE_FIELD_TYPE (resolved_type, i),
- &pinfo, 0);
+ &pinfo);
gdb_assert (TYPE_FIELD_LOC_KIND (resolved_type, i)
== FIELD_LOC_KIND_BITPOS);
@@ -2016,23 +2016,21 @@ resolve_dynamic_struct (struct type *type,
static struct type *
resolve_dynamic_type_internal (struct type *type,
- struct property_addr_info *addr_stack,
- int top_level)
+ struct property_addr_info *addr_stack)
{
struct type *real_type = check_typedef (type);
struct type *resolved_type = type;
struct dynamic_prop *prop;
CORE_ADDR value;
- if (!is_dynamic_type_internal (real_type, top_level))
+ if (!is_dynamic_type_internal (real_type))
return type;
if (TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
{
resolved_type = copy_type (type);
TYPE_TARGET_TYPE (resolved_type)
- = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (type), addr_stack,
- top_level);
+ = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (type), addr_stack);
}
else
{
@@ -2077,7 +2075,7 @@ resolve_dynamic_type (struct type *type, CORE_ADDR addr)
{
struct property_addr_info pinfo = {check_typedef (type), addr, NULL};
- return resolve_dynamic_type_internal (type, &pinfo, 1);
+ return resolve_dynamic_type_internal (type, &pinfo);
}
/* See gdbtypes.h */