summaryrefslogtreecommitdiff
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/iq2000-tdep.c
parentgdb: add type::target_type / type::set_target_type (diff)
downloadbinutils-gdb-27710edb4e588d0360620df424dd7ee7e8cfafee.tar.gz
binutils-gdb-27710edb4e588d0360620df424dd7ee7e8cfafee.tar.bz2
binutils-gdb-27710edb4e588d0360620df424dd7ee7e8cfafee.zip
gdb: remove TYPE_TARGET_TYPE
Remove the macro, replace all uses by calls to type::target_type. Change-Id: Ie51d3e1e22f94130176d6abd723255282bb6d1ed
Diffstat (limited to 'gdb/iq2000-tdep.c')
-rw-r--r--gdb/iq2000-tdep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index e5fe1c62466..3852195f9bb 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -89,13 +89,13 @@ iq2000_pointer_to_address (struct gdbarch *gdbarch,
struct type * type, const gdb_byte * buf)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- enum type_code target = TYPE_TARGET_TYPE (type)->code ();
+ enum type_code target = type->target_type ()->code ();
CORE_ADDR addr
= extract_unsigned_integer (buf, TYPE_LENGTH (type), byte_order);
if (target == TYPE_CODE_FUNC
|| target == TYPE_CODE_METHOD
- || TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type)))
+ || TYPE_CODE_SPACE (type->target_type ()))
addr = insn_addr_from_ptr (addr);
return addr;
@@ -109,7 +109,7 @@ iq2000_address_to_pointer (struct gdbarch *gdbarch,
struct type *type, gdb_byte *buf, CORE_ADDR addr)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- enum type_code target = TYPE_TARGET_TYPE (type)->code ();
+ enum type_code target = type->target_type ()->code ();
if (target == TYPE_CODE_FUNC || target == TYPE_CODE_METHOD)
addr = insn_ptr_from_addr (addr);
@@ -599,7 +599,7 @@ iq2000_pass_8bytetype_by_address (struct type *type)
/* Skip typedefs. */
while (type->code () == TYPE_CODE_TYPEDEF)
- type = TYPE_TARGET_TYPE (type);
+ type = type->target_type ();
/* Non-struct and non-union types are always passed by value. */
if (type->code () != TYPE_CODE_STRUCT
&& type->code () != TYPE_CODE_UNION)
@@ -614,7 +614,7 @@ iq2000_pass_8bytetype_by_address (struct type *type)
return 1;
/* Skip typedefs of field type. */
while (ftype->code () == TYPE_CODE_TYPEDEF)
- ftype = TYPE_TARGET_TYPE (ftype);
+ ftype = ftype->target_type ();
/* If field is int or float, pass by value. */
if (ftype->code () == TYPE_CODE_FLT
|| ftype->code () == TYPE_CODE_INT)