/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright (C) 1998-2018 Free Software Foundation, Inc.
+ Copyright (C) 1998-2019 Free Software Foundation, Inc.
This file is part of GDB.
#include "defs.h"
#include "arch-utils.h"
-#include "buildsym.h"
#include "gdbcmd.h"
#include "inferior.h" /* enum CALL_DUMMY_LOCATION et al. */
#include "infrun.h"
if (info->byte_order == BFD_ENDIAN_UNKNOWN)
info->byte_order = default_byte_order;
info->byte_order_for_code = info->byte_order;
+ /* Wire the default to the last selected byte order. */
+ default_byte_order = info->byte_order;
/* "(gdb) set osabi ...". Handled by gdbarch_lookup_osabi. */
/* From the manual override, or from file. */
regs = (gdb_byte *) alloca (register_size (gdbarch, pc_regno));
store_unsigned_integer (regs, register_size (gdbarch, pc_regno),
gdbarch_byte_order (gdbarch), addr);
- regcache_raw_supply (regcache, pc_regno, regs);
+ regcache->raw_supply (pc_regno, regs);
}
int
return false;
}
+/* See arch-utils.h. */
+
+ULONGEST
+default_type_align (struct gdbarch *gdbarch, struct type *type)
+{
+ return type_length_units (check_typedef (type));
+}
+
void
_initialize_gdbarch_utils (void)
{