Add `set print array-indexes' tests for C/C++ arrays
[binutils-gdb.git] / gdb / amd64-windows-tdep.c
index 5442e527653981a49059a295c7e1eb3c7eac9c4f..eca94f2ea7c6b0ff04f39a762ff663a3ead941ee 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2021 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -179,7 +179,7 @@ amd64_windows_adjust_args_passed_by_pointer (struct value **args,
     if (amd64_windows_passed_by_pointer (value_type (args[i])))
       {
        struct type *type = value_type (args[i]);
-       const gdb_byte *valbuf = value_contents (args[i]);
+       const gdb_byte *valbuf = value_contents (args[i]).data ();
        const int len = TYPE_LENGTH (type);
 
        /* Store a copy of that argument on the stack, aligned to
@@ -205,7 +205,7 @@ amd64_windows_store_arg_in_reg (struct regcache *regcache,
                                struct value *arg, int regno)
 {
   struct type *type = value_type (arg);
-  const gdb_byte *valbuf = value_contents (arg);
+  const gdb_byte *valbuf = value_contents (arg).data ();
   gdb_byte buf[8];
 
   gdb_assert (TYPE_LENGTH (type) <= 8);
@@ -295,7 +295,7 @@ amd64_windows_push_arguments (struct regcache *regcache, int nargs,
   for (i = 0; i < num_stack_args; i++)
     {
       struct type *type = value_type (stack_args[i]);
-      const gdb_byte *valbuf = value_contents (stack_args[i]);
+      const gdb_byte *valbuf = value_contents (stack_args[i]).data ();
 
       write_memory (sp + element * 8, valbuf, TYPE_LENGTH (type));
       element += ((TYPE_LENGTH (type) + 7) / 8);
@@ -1178,6 +1178,7 @@ amd64_windows_frame_this_id (struct frame_info *this_frame, void **this_cache,
 
 static const struct frame_unwind amd64_windows_frame_unwind =
 {
+  "amd64 windows",
   NORMAL_FRAME,
   default_frame_unwind_stop_reason,
   &amd64_windows_frame_this_id,
@@ -1276,7 +1277,7 @@ amd64_windows_auto_wide_charset (void)
 static void
 amd64_windows_init_abi_common (gdbarch_info info, struct gdbarch *gdbarch)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+  i386_gdbarch_tdep *tdep = (i386_gdbarch_tdep *) gdbarch_tdep (gdbarch);
 
   /* The dwarf2 unwinder (appended very early by i386_gdbarch_init) is
      preferred over the SEH one.  The reasons are: