/* Target-dependent code for the S12Z, for the GDB.
- Copyright (C) 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2018-2020 Free Software Foundation, Inc.
This file is part of GDB.
#include "defs.h"
#include "arch-utils.h"
-#include "dwarf2-frame.h"
-#include "common/errors.h"
+#include "dwarf2/frame.h"
+#include "gdbsupport/errors.h"
#include "frame-unwind.h"
#include "gdbcore.h"
#include "gdbcmd.h"
return prologue_end;
}
- warning (_("%s Failed to find end of prologue PC = %08x\n"),
- __FUNCTION__, (unsigned int) pc);
+ warning (_("%s Failed to find end of prologue PC = %08x"),
+ __FUNCTION__, (unsigned int) pc);
return pc;
}
return 0;
}
-struct disassemble_info
+static struct disassemble_info
s12z_disassemble_info (struct gdbarch *gdbarch)
{
struct disassemble_info di;
{
struct mem_read_abstraction_base base; /* The parent struct. */
bfd_vma memaddr; /* Where to read from. */
- struct disassemble_info* info; /* The disassember to use for reading. */
+ struct disassemble_info* info; /* The disassembler to use for reading. */
};
/* Advance the reader by one byte. */
/* Return early if GDB couldn't find the function. */
if (start_addr == 0)
{
- warning (_("Couldn't find function including address %s SP is %s\n"),
+ warning (_("Couldn't find function including address %s SP is %s"),
paddress (gdbarch, this_pc),
paddress (gdbarch, this_sp));
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT
- || TYPE_CODE (type) == TYPE_CODE_UNION
- || TYPE_CODE (type) == TYPE_CODE_ARRAY
+ if (type->code () == TYPE_CODE_STRUCT
+ || type->code () == TYPE_CODE_UNION
+ || type->code () == TYPE_CODE_ARRAY
|| TYPE_LENGTH (type) > 4)
return RETURN_VALUE_STRUCT_CONVENTION;
set_gdbarch_register_type (gdbarch, s12z_register_type);
frame_unwind_append_unwinder (gdbarch, &s12z_frame_unwind);
- /* Currently, the only known producer for this archtecture, produces buggy
+ /* Currently, the only known producer for this architecture, produces buggy
dwarf CFI. So don't append a dwarf unwinder until the situation is
better understood. */
return gdbarch;
}
+void _initialize_s12z_tdep ();
void
-_initialize_s12z_tdep (void)
+_initialize_s12z_tdep ()
{
gdbarch_register (bfd_arch_s12z, s12z_gdbarch_init, NULL);
}