gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / rs6000-aix-tdep.c
index cccd3995cd1de25e1e0b1df3e6e4030388a8794b..66b75a70249486bd0afdb9733a93670d9e8fbf83 100644 (file)
@@ -1,6 +1,6 @@
 /* Native support code for PPC AIX, for GDB the GNU debugger.
 
-   Copyright (C) 2006-2019 Free Software Foundation, Inc.
+   Copyright (C) 2006-2020 Free Software Foundation, Inc.
 
    Free Software Foundation, Inc.
 
@@ -37,7 +37,7 @@
 #include "solib.h"
 #include "solib-aix.h"
 #include "target-float.h"
-#include "xml-utils.h"
+#include "gdbsupport/xml-utils.h"
 #include "trad-frame.h"
 #include "frame-unwind.h"
 
@@ -141,7 +141,7 @@ aix_sighandle_frame_prev_register (struct frame_info *this_frame,
   return trad_frame_get_register (this_trad_cache, this_frame, regnum);
 }
 
-int
+static int
 aix_sighandle_frame_sniffer (const struct frame_unwind *self,
                             struct frame_info *this_frame,
                             void **this_prologue_cache)
@@ -349,7 +349,7 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
       type = check_typedef (value_type (arg));
       len = TYPE_LENGTH (type);
 
-      if (TYPE_CODE (type) == TYPE_CODE_FLT)
+      if (type->code () == TYPE_CODE_FLT)
        {
          /* Floating point arguments are passed in fpr's, as well as gpr's.
             There are 13 fpr's reserved for passing parameters.  At this point
@@ -473,7 +473,7 @@ ran_out_of_registers_for_arguments:
 
          /* Float types should be passed in fpr's, as well as in the
              stack.  */
-         if (TYPE_CODE (type) == TYPE_CODE_FLT && f_argno < 13)
+         if (type->code () == TYPE_CODE_FLT && f_argno < 13)
            {
 
              gdb_assert (len <= 8);
@@ -527,7 +527,7 @@ rs6000_return_value (struct gdbarch *gdbarch, struct value *function,
 
   /* AltiVec extension: Functions that declare a vector data type as a
      return value place that return value in VR2.  */
-  if (TYPE_CODE (valtype) == TYPE_CODE_ARRAY && TYPE_VECTOR (valtype)
+  if (valtype->code () == TYPE_CODE_ARRAY && TYPE_VECTOR (valtype)
       && TYPE_LENGTH (valtype) == 16)
     {
       if (readbuf)
@@ -543,16 +543,16 @@ rs6000_return_value (struct gdbarch *gdbarch, struct value *function,
      allocated buffer into which the callee is assumed to store its
      return value.  All explicit parameters are appropriately
      relabeled.  */
-  if (TYPE_CODE (valtype) == TYPE_CODE_STRUCT
-      || TYPE_CODE (valtype) == TYPE_CODE_UNION
-      || TYPE_CODE (valtype) == TYPE_CODE_ARRAY)
+  if (valtype->code () == TYPE_CODE_STRUCT
+      || valtype->code () == TYPE_CODE_UNION
+      || valtype->code () == TYPE_CODE_ARRAY)
     return RETURN_VALUE_STRUCT_CONVENTION;
 
   /* Scalar floating-point values are returned in FPR1 for float or
      double, and in FPR1:FPR2 for quadword precision.  Fortran
      complex*8 and complex*16 are returned in FPR1:FPR2, and
      complex*32 is returned in FPR1:FPR4.  */
-  if (TYPE_CODE (valtype) == TYPE_CODE_FLT
+  if (valtype->code () == TYPE_CODE_FLT
       && (TYPE_LENGTH (valtype) == 4 || TYPE_LENGTH (valtype) == 8))
     {
       struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum);
@@ -608,7 +608,7 @@ rs6000_return_value (struct gdbarch *gdbarch, struct value *function,
 
   if (TYPE_LENGTH (valtype) == 8)
     {
-      gdb_assert (TYPE_CODE (valtype) != TYPE_CODE_FLT);
+      gdb_assert (valtype->code () != TYPE_CODE_FLT);
       gdb_assert (tdep->wordsize == 4);
 
       if (readbuf)
@@ -670,18 +670,17 @@ rs6000_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
       CORE_ADDR pc = 0;
       struct obj_section *pc_section;
 
-      TRY
+      try
         {
           pc = read_memory_unsigned_integer (addr, tdep->wordsize, byte_order);
         }
-      CATCH (e, RETURN_MASK_ERROR)
+      catch (const gdb_exception_error &e)
         {
           /* An error occured during reading.  Probably a memory error
              due to the section not being loaded yet.  This address
              cannot be a function descriptor.  */
           return addr;
         }
-      END_CATCH
 
       pc_section = find_pc_section (pc);
 
@@ -1111,7 +1110,7 @@ rs6000_aix_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
   if (ldinfo_sec == NULL)
     error (_("cannot find .ldinfo section from core file: %s"),
           bfd_errmsg (bfd_get_error ()));
-  ldinfo_size = bfd_get_section_size (ldinfo_sec);
+  ldinfo_size = bfd_section_size (ldinfo_sec);
 
   gdb::byte_vector ldinfo_buf (ldinfo_size);
 
@@ -1178,8 +1177,9 @@ rs6000_aix_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
   frame_unwind_append_unwinder (gdbarch, &aix_sighandle_frame_unwind);
 }
 
+void _initialize_rs6000_aix_tdep ();
 void
-_initialize_rs6000_aix_tdep (void)
+_initialize_rs6000_aix_tdep ()
 {
   gdbarch_register_osabi_sniffer (bfd_arch_rs6000,
                                   bfd_target_xcoff_flavour,
This page took 0.03648 seconds and 4 git commands to generate.