gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / iq2000-tdep.c
index 4b3419ead7b64df3cd2c8d75942e18b583d03c60..b35b45ea4c5ebef2e2ad78a6f1bb7bd63d9f525b 100644 (file)
@@ -24,7 +24,7 @@
 #include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "gdbtypes.h"
 #include "value.h"
 #include "dis-asm.h"
@@ -89,7 +89,7 @@ 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_CODE (TYPE_TARGET_TYPE (type));
+  enum type_code target = TYPE_TARGET_TYPE (type)->code ();
   CORE_ADDR addr
     = extract_unsigned_integer (buf, TYPE_LENGTH (type), byte_order);
 
@@ -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_CODE (TYPE_TARGET_TYPE (type));
+  enum type_code target = TYPE_TARGET_TYPE (type)->code ();
 
   if (target == TYPE_CODE_FUNC || target == TYPE_CODE_METHOD)
     addr = insn_ptr_from_addr (addr);
@@ -504,8 +504,8 @@ iq2000_store_return_value (struct type *type, struct regcache *regcache,
 static int
 iq2000_use_struct_convention (struct type *type)
 {
-  return ((TYPE_CODE (type) == TYPE_CODE_STRUCT)
-         || (TYPE_CODE (type) == TYPE_CODE_UNION))
+  return ((type->code () == TYPE_CODE_STRUCT)
+         || (type->code () == TYPE_CODE_UNION))
         && TYPE_LENGTH (type) > 8;
 }
 
@@ -597,26 +597,26 @@ iq2000_pass_8bytetype_by_address (struct type *type)
   struct type *ftype;
 
   /* Skip typedefs.  */
-  while (TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
+  while (type->code () == TYPE_CODE_TYPEDEF)
     type = TYPE_TARGET_TYPE (type);
   /* Non-struct and non-union types are always passed by value.  */
-  if (TYPE_CODE (type) != TYPE_CODE_STRUCT
-      && TYPE_CODE (type) != TYPE_CODE_UNION)
+  if (type->code () != TYPE_CODE_STRUCT
+      && type->code () != TYPE_CODE_UNION)
     return 0;
   /* Structs with more than 1 field are always passed by address.  */
-  if (TYPE_NFIELDS (type) != 1)
+  if (type->num_fields () != 1)
     return 1;
   /* Get field type.  */
-  ftype = (TYPE_FIELDS (type))[0].type;
+  ftype = type->field (0).type;
   /* The field type must have size 8, otherwise pass by address.  */
   if (TYPE_LENGTH (ftype) != 8)
     return 1;
   /* Skip typedefs of field type.  */
-  while (TYPE_CODE (ftype) == TYPE_CODE_TYPEDEF)
+  while (ftype->code () == TYPE_CODE_TYPEDEF)
     ftype = TYPE_TARGET_TYPE (ftype);
   /* If field is int or float, pass by value.  */
-  if (TYPE_CODE (ftype) == TYPE_CODE_FLT
-      || TYPE_CODE (ftype) == TYPE_CODE_INT)
+  if (ftype->code () == TYPE_CODE_FLT
+      || ftype->code () == TYPE_CODE_INT)
     return 0;
   /* Everything else, pass by address.  */
   return 1;
This page took 0.026959 seconds and 4 git commands to generate.