/* Target-dependent code for Renesas Super-H, for GDB.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
+ Copyright (C) 1993-2022 Free Software Foundation, Inc.
This file is part of GDB.
{
/* value gets right-justified in the register or stack word. */
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
- memcpy (valbuf + (4 - len), value_contents (val), len);
+ memcpy (valbuf + (4 - len), value_contents (val).data (), len);
else
- memcpy (valbuf, value_contents (val), len);
+ memcpy (valbuf, value_contents (val).data (), len);
return valbuf;
}
- return value_contents (val);
+ return value_contents (val).data ();
}
/* Helper function to eval number of bytes to allocate on stack. */
static struct type *
sh_littlebyte_bigword_type (struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
if (tdep->sh_littlebyte_bigword_type == NULL)
tdep->sh_littlebyte_bigword_type
}
static const struct frame_unwind sh_frame_unwind = {
+ "sh prologue",
NORMAL_FRAME,
default_frame_unwind_stop_reason,
sh_frame_this_id,
static const struct frame_unwind sh_stub_unwind =
{
+ "sh stub",
NORMAL_FRAME,
default_frame_unwind_stop_reason,
sh_stub_this_id,
int regnum, const void *regs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
const struct sh_corefile_regmap *regmap = (regset == &sh_corefile_gregset
? tdep->core_gregmap
: tdep->core_fpregmap);
int regnum, void *regs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
const struct sh_corefile_regmap *regmap = (regset == &sh_corefile_gregset
? tdep->core_gregmap
: tdep->core_fpregmap);
void *cb_data,
const struct regcache *regcache)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ sh_gdbarch_tdep *tdep = (sh_gdbarch_tdep *) gdbarch_tdep (gdbarch);
if (tdep->core_gregmap != NULL)
cb (".reg", tdep->sizeof_gregset, tdep->sizeof_gregset,
sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
struct gdbarch *gdbarch;
- struct gdbarch_tdep *tdep;
/* If there is already a candidate, use it. */
arches = gdbarch_list_lookup_by_info (arches, &info);
/* None found, create a new architecture from the information
provided. */
- tdep = XCNEW (struct gdbarch_tdep);
+ sh_gdbarch_tdep *tdep = new sh_gdbarch_tdep;
gdbarch = gdbarch_alloc (&info, tdep);
set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
{
gdbarch_register (bfd_arch_sh, sh_gdbarch_init, NULL);
- add_basic_prefix_cmd ("sh", no_class, "SH specific commands.",
- &setshcmdlist, 0, &setlist);
- add_show_prefix_cmd ("sh", no_class, "SH specific commands.",
- &showshcmdlist, 0, &showlist);
+ add_setshow_prefix_cmd ("sh", no_class,
+ _("SH specific commands."),
+ _("SH specific commands."),
+ &setshcmdlist, &showshcmdlist,
+ &setlist, &showlist);
add_setshow_enum_cmd ("calling-convention", class_vars, sh_cc_enum,
&sh_active_calling_convention,