[gdb/testsuite] Fix info-types-c.exp
[deliverable/binutils-gdb.git] / gdb / i386-fbsd-tdep.c
index f274847174cf37ed07589550e28e3af50d09ddc3..103972490c425223b7de7a47a72efa1de9eec901 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for FreeBSD/i386.
 
-   Copyright (C) 2003-2019 Free Software Foundation, Inc.
+   Copyright (C) 2003-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "regcache.h"
 #include "regset.h"
 #include "i386-fbsd-tdep.h"
-#include "common/x86-xstate.h"
+#include "gdbsupport/x86-xstate.h"
 
 #include "i386-tdep.h"
 #include "i387-tdep.h"
 #include "fbsd-tdep.h"
 #include "solib-svr4.h"
+#include "inferior.h"
 
 /* Support for signal handlers.  */
 
@@ -134,8 +135,8 @@ i386fbsd_sigtramp_p (struct frame_info *this_frame)
   const gdb_byte *middle, *end;
 
   /* Look for a matching start.  */
-  if (!safe_frame_unwind_memory (this_frame, pc, buf,
-                                sizeof i386fbsd_sigtramp_start))
+  if (!safe_frame_unwind_memory (this_frame, pc,
+                                {buf, sizeof i386fbsd_sigtramp_start}))
     return 0;
   if (memcmp (buf, i386fbsd_sigtramp_start, sizeof i386fbsd_sigtramp_start)
       == 0)
@@ -161,23 +162,23 @@ i386fbsd_sigtramp_p (struct frame_info *this_frame)
   /* Since the end is shorter than the middle, check for a matching end
      next.  */
   pc += sizeof i386fbsd_sigtramp_start;
-  if (!safe_frame_unwind_memory (this_frame, pc, buf,
-                                sizeof i386fbsd_sigtramp_end))
+  if (!safe_frame_unwind_memory (this_frame, pc,
+                                {buf, sizeof i386fbsd_sigtramp_end}))
     return 0;
   if (memcmp (buf, end, sizeof i386fbsd_sigtramp_end) == 0)
     return 1;
 
   /* If the end didn't match, check for a matching middle.  */
-  if (!safe_frame_unwind_memory (this_frame, pc, buf,
-                                sizeof i386fbsd_sigtramp_middle))
+  if (!safe_frame_unwind_memory (this_frame, pc,
+                                {buf, sizeof i386fbsd_sigtramp_middle}))
     return 0;
   if (memcmp (buf, middle, sizeof i386fbsd_sigtramp_middle) != 0)
     return 0;
 
   /* The middle matched, check for a matching end.  */
   pc += sizeof i386fbsd_sigtramp_middle;
-  if (!safe_frame_unwind_memory (this_frame, pc, buf,
-                                sizeof i386fbsd_sigtramp_end))
+  if (!safe_frame_unwind_memory (this_frame, pc,
+                                {buf, sizeof i386fbsd_sigtramp_end}))
     return 0;
   if (memcmp (buf, end, sizeof i386fbsd_sigtramp_end) != 0)
     return 0;
@@ -233,7 +234,7 @@ i386fbsd_core_read_xcr0 (bfd *abfd)
 
   if (xstate)
     {
-      size_t size = bfd_section_size (abfd, xstate);
+      size_t size = bfd_section_size (xstate);
 
       /* Check extended state size.  */
       if (size < X86_XSTATE_AVX_SIZE)
@@ -332,7 +333,8 @@ i386fbsd_get_thread_local_address (struct gdbarch *gdbarch, ptid_t ptid,
   if (tdep->fsbase_regnum == -1)
     error (_("Unable to fetch %%gsbase"));
 
-  regcache = get_thread_arch_regcache (ptid, gdbarch);
+  regcache = get_thread_arch_regcache (current_inferior ()->process_target (),
+                                      ptid, gdbarch);
 
   target_fetch_registers (regcache, tdep->fsbase_regnum + 1);
 
@@ -449,8 +451,9 @@ i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
                                        i386fbsd_get_thread_local_address);
 }
 
+void _initialize_i386fbsd_tdep ();
 void
-_initialize_i386fbsd_tdep (void)
+_initialize_i386fbsd_tdep ()
 {
   gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_FREEBSD,
                          i386fbsd4_init_abi);
This page took 0.025905 seconds and 4 git commands to generate.