Add "info connections" command, "info inferiors" connection number/string
[deliverable/binutils-gdb.git] / gdb / or1k-tdep.c
index 329615f2d39345a0ff6a9af26511bb2d47807f2c..eca780a9c12abb8ef91dd25eb4bb533c08f3bbe8 100644 (file)
@@ -1,5 +1,5 @@
 /* Target-dependent code for the 32-bit OpenRISC 1000, for the GDB.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -33,7 +33,6 @@
 #include "block.h"
 #include "reggroups.h"
 #include "arch-utils.h"
-#include "frame.h"
 #include "frame-unwind.h"
 #include "frame-base.h"
 #include "dwarf2-frame.h"
@@ -51,7 +50,7 @@
 
 /* Global debug flag.  */
 
-static int or1k_debug = 0;
+static bool or1k_debug = false;
 
 static void
 show_or1k_debug (struct ui_file *file, int from_tty,
@@ -297,7 +296,7 @@ or1k_return_value (struct gdbarch *gdbarch, struct value *functype,
          else
            memcpy (buf, writebuf, rv_size);
 
-         regcache_cooked_write (regcache, OR1K_RV_REGNUM, buf);
+         regcache->cooked_write (OR1K_RV_REGNUM, buf);
 
          free (buf);
        }
@@ -330,8 +329,8 @@ or1k_return_value (struct gdbarch *gdbarch, struct value *functype,
          memcpy (buf_hi, writebuf, rv_size - bpw);
          memcpy (buf_lo, writebuf + bpw, bpw);
 
-         regcache_cooked_write (regcache, OR1K_RV_REGNUM, buf_hi);
-         regcache_cooked_write (regcache, OR1K_RV_REGNUM + 1, buf_lo);
+         regcache->cooked_write (OR1K_RV_REGNUM, buf_hi);
+         regcache->cooked_write (OR1K_RV_REGNUM + 1, buf_lo);
 
          free (buf_lo);
          free (buf_hi);
@@ -595,7 +594,8 @@ static CORE_ADDR
 or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
                      struct regcache *regcache, CORE_ADDR bp_addr,
                      int nargs, struct value **args, CORE_ADDR sp,
-                     int struct_return, CORE_ADDR struct_addr)
+                     function_call_return_method return_method,
+                     CORE_ADDR struct_addr)
 {
 
   int argreg;
@@ -617,7 +617,7 @@ or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
 
   /* Location for a returned structure.  This is passed as a silent first
      argument.  */
-  if (struct_return)
+  if (return_method == return_method_struct)
     {
       regcache_cooked_write_unsigned (regcache, OR1K_FIRST_ARG_REGNUM,
                                      struct_addr);
@@ -789,14 +789,6 @@ or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
   return sp;
 }
 
-/* Implement the dummy_id gdbarch method.  */
-
-static struct frame_id
-or1k_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
-  return frame_id_build (get_frame_sp (this_frame),
-                        get_frame_pc (this_frame));
-}
 \f
 
 /* Support functions for frame handling.  */
@@ -832,7 +824,7 @@ or1k_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
 
    l.sw    lr_loc(r1),r9        # Link (return) address
 
-   The link register is usally saved at fp_loc - 4.  It may not be saved at
+   The link register is usually saved at fp_loc - 4.  It may not be saved at
    all in a leaf function.
 
    l.sw    reg_loc(r1),ry       # Save any callee saved regs
@@ -1184,7 +1176,6 @@ or1k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
   set_gdbarch_push_dummy_code (gdbarch, or1k_push_dummy_code);
   set_gdbarch_push_dummy_call (gdbarch, or1k_push_dummy_call);
-  set_gdbarch_dummy_id (gdbarch, or1k_dummy_id);
 
   /* Frame unwinders.  Use DWARF debug info if available, otherwise use our
      own unwinder.  */
@@ -1255,6 +1246,9 @@ or1k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       tdesc_use_registers (gdbarch, tdesc, tdesc_data);
     }
 
+  /* Hook in ABI-specific overrides, if they have been registered.  */
+  gdbarch_init_osabi (info, gdbarch);
+
   return gdbarch;
 }
 
This page took 0.025386 seconds and 4 git commands to generate.