aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-valprint.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-07-30 22:43:54 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 10:59:49 -0400
commit27710edb4e588d0360620df424dd7ee7e8cfafee (patch)
treeaf4da9f4c7e032ab6653536f2a991cbe09cee759 /gdb/f-valprint.c
parent8a50fdcefc44c40d5c4b978f19c22ddfbeb29139 (diff)
downloadgdb-27710edb4e588d0360620df424dd7ee7e8cfafee.zip
gdb-27710edb4e588d0360620df424dd7ee7e8cfafee.tar.gz
gdb-27710edb4e588d0360620df424dd7ee7e8cfafee.tar.bz2
gdb: remove TYPE_TARGET_TYPE
Remove the macro, replace all uses by calls to type::target_type. Change-Id: Ie51d3e1e22f94130176d6abd723255282bb6d1ed
Diffstat (limited to 'gdb/f-valprint.c')
-rw-r--r--gdb/f-valprint.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 6a3f83c..544657d 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -82,9 +82,9 @@ f77_get_dynamic_length_of_aggregate (struct type *type)
This function also works for strings which behave very
similarly to arrays. */
- if (TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_ARRAY
- || TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_STRING)
- f77_get_dynamic_length_of_aggregate (TYPE_TARGET_TYPE (type));
+ if (type->target_type ()->code () == TYPE_CODE_ARRAY
+ || type->target_type ()->code () == TYPE_CODE_STRING)
+ f77_get_dynamic_length_of_aggregate (type->target_type ());
/* Recursion ends here, start setting up lengths. */
lower_bound = f77_get_lowerbound (type);
@@ -94,7 +94,7 @@ f77_get_dynamic_length_of_aggregate (struct type *type)
TYPE_LENGTH (type) =
(upper_bound - lower_bound + 1)
- * TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type)));
+ * TYPE_LENGTH (check_typedef (type->target_type ()));
}
/* Per-dimension statistics. */
@@ -339,7 +339,7 @@ private:
LONGEST offset1, LONGEST offset2)
{
if (type->code () == TYPE_CODE_ARRAY
- && TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_CHAR)
+ && type->target_type ()->code () != TYPE_CODE_CHAR)
{
/* Extract the range, and get lower and upper bounds. */
struct type *range_type = check_typedef (type)->index_type ();
@@ -350,7 +350,7 @@ private:
/* CALC is used to calculate the offsets for each element. */
fortran_array_offset_calculator calc (type);
- struct type *subarray_type = check_typedef (TYPE_TARGET_TYPE (type));
+ struct type *subarray_type = check_typedef (type->target_type ());
for (LONGEST i = lowerbound; i < upperbound + 1; i++)
{
/* Use the index and the stride to work out a new offset. */
@@ -452,11 +452,11 @@ f_language::value_print_inner (struct value *val, struct ui_file *stream,
break;
case TYPE_CODE_ARRAY:
- if (TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_CHAR)
+ if (type->target_type ()->code () != TYPE_CODE_CHAR)
fortran_print_array (type, address, stream, recurse, val, options);
else
{
- struct type *ch_type = TYPE_TARGET_TYPE (type);
+ struct type *ch_type = type->target_type ();
f77_get_dynamic_length_of_aggregate (type);
printstr (stream, ch_type, valaddr,
@@ -476,7 +476,7 @@ f_language::value_print_inner (struct value *val, struct ui_file *stream,
int want_space = 0;
addr = unpack_pointer (type, valaddr);
- elttype = check_typedef (TYPE_TARGET_TYPE (type));
+ elttype = check_typedef (type->target_type ());
if (elttype->code () == TYPE_CODE_FUNC)
{
@@ -503,7 +503,7 @@ f_language::value_print_inner (struct value *val, struct ui_file *stream,
{
if (want_space)
gdb_puts (" ", stream);
- val_print_string (TYPE_TARGET_TYPE (type), NULL, addr, -1,
+ val_print_string (type->target_type (), NULL, addr, -1,
stream, options);
}
return;