diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-07-30 22:43:54 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-09-21 10:59:49 -0400 |
commit | 27710edb4e588d0360620df424dd7ee7e8cfafee (patch) | |
tree | af4da9f4c7e032ab6653536f2a991cbe09cee759 /gdb/guile | |
parent | 8a50fdcefc44c40d5c4b978f19c22ddfbeb29139 (diff) | |
download | fsf-binutils-gdb-27710edb4e588d0360620df424dd7ee7e8cfafee.zip fsf-binutils-gdb-27710edb4e588d0360620df424dd7ee7e8cfafee.tar.gz fsf-binutils-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/guile')
-rw-r--r-- | gdb/guile/scm-lazy-string.c | 4 | ||||
-rw-r--r-- | gdb/guile/scm-math.c | 2 | ||||
-rw-r--r-- | gdb/guile/scm-type.c | 6 | ||||
-rw-r--r-- | gdb/guile/scm-value.c | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/gdb/guile/scm-lazy-string.c b/gdb/guile/scm-lazy-string.c index 39f010b..d260e09 100644 --- a/gdb/guile/scm-lazy-string.c +++ b/gdb/guile/scm-lazy-string.c @@ -205,7 +205,7 @@ lsscm_elt_type (lazy_string_smob *ls_smob) { case TYPE_CODE_PTR: case TYPE_CODE_ARRAY: - return TYPE_TARGET_TYPE (realtype); + return realtype->target_type (); default: /* This is done to preserve existing behaviour. PR 20769. E.g., gdb.parse_and_eval("my_int_variable").lazy_string().type. */ @@ -324,7 +324,7 @@ lsscm_safe_lazy_string_to_value (SCM string, int arg_pos, /* PR 20786: There's no way to specify an array of length zero. Record a length of [0,-1] which is how Ada does it. Anything we do is broken, but this one possible solution. */ - type = lookup_array_range_type (TYPE_TARGET_TYPE (realtype), + type = lookup_array_range_type (realtype->target_type (), 0, ls_smob->length - 1); value = value_at_lazy (type, ls_smob->address); } diff --git a/gdb/guile/scm-math.c b/gdb/guile/scm-math.c index 168fe2d..914bb5f 100644 --- a/gdb/guile/scm-math.c +++ b/gdb/guile/scm-math.c @@ -65,7 +65,7 @@ enum valscm_binary_opcode /* If TYPE is a reference, return the target; otherwise return TYPE. */ #define STRIP_REFERENCE(TYPE) \ - ((TYPE->code () == TYPE_CODE_REF) ? (TYPE_TARGET_TYPE (TYPE)) : (TYPE)) + ((TYPE->code () == TYPE_CODE_REF) ? ((TYPE)->target_type ()) : (TYPE)) /* Helper for vlscm_unop. Contains all the code that may throw a GDB exception. */ diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index 5cb1cab..8914307 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -683,7 +683,7 @@ tyscm_get_composite (struct type *type) if (type->code () != TYPE_CODE_PTR && type->code () != TYPE_CODE_REF) break; - type = TYPE_TARGET_TYPE (type); + type = type->target_type (); } /* If this is not a struct, union, or enum type, raise TypeError @@ -874,9 +874,9 @@ gdbscm_type_target (SCM self) = tyscm_get_type_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME); struct type *type = t_smob->type; - SCM_ASSERT (TYPE_TARGET_TYPE (type), self, SCM_ARG1, FUNC_NAME); + SCM_ASSERT (type->target_type (), self, SCM_ARG1, FUNC_NAME); - return tyscm_scm_from_type (TYPE_TARGET_TYPE (type)); + return tyscm_scm_from_type (type->target_type ()); } /* (type-const <gdb:type>) -> <gdb:type> diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c index 1c88a3a..4417c2d 100644 --- a/gdb/guile/scm-value.c +++ b/gdb/guile/scm-value.c @@ -576,7 +576,7 @@ gdbscm_value_dynamic_type (SCM self) if (((type->code () == TYPE_CODE_PTR) || (type->code () == TYPE_CODE_REF)) - && (TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_STRUCT)) + && (type->target_type ()->code () == TYPE_CODE_STRUCT)) { struct value *target; int was_pointer = type->code () == TYPE_CODE_PTR; @@ -1181,7 +1181,7 @@ gdbscm_value_to_lazy_string (SCM self, SCM rest) length = array_length; else if (array_length == -1) { - type = lookup_array_range_type (TYPE_TARGET_TYPE (realtype), + type = lookup_array_range_type (realtype->target_type (), 0, length - 1); } else if (length != array_length) @@ -1190,7 +1190,7 @@ gdbscm_value_to_lazy_string (SCM self, SCM rest) specified length. */ if (length > array_length) error (_("length is larger than array size")); - type = lookup_array_range_type (TYPE_TARGET_TYPE (type), + type = lookup_array_range_type (type->target_type (), low_bound, low_bound + length - 1); } |