/* Ravenscar SPARC target support.
- Copyright 2004, 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2004-2017 Free Software Foundation, Inc.
This file is part of GDB.
#include "ravenscar-thread.h"
#include "sparc-ravenscar-thread.h"
-static void ravenscar_sparc_fetch_registers (struct regcache *regcache,
+static void sparc_ravenscar_fetch_registers (struct regcache *regcache,
int regnum);
-static void ravenscar_sparc_store_registers (struct regcache *regcache,
+static void sparc_ravenscar_store_registers (struct regcache *regcache,
int regnum);
-static void ravenscar_sparc_prepare_to_store (struct regcache *regcache);
+static void sparc_ravenscar_prepare_to_store (struct regcache *regcache);
/* Register offsets from a referenced address (exempli gratia the
Thread_Descriptor). The referenced address depends on the register
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
int buf_size = register_size (gdbarch, regnum);
- char *buf;
+ gdb_byte *buf;
- buf = (char *) alloca (buf_size);
+ buf = (gdb_byte *) alloca (buf_size);
read_memory (register_addr, buf, buf_size);
regcache_raw_supply (regcache, regnum, buf);
}
thread. */
static void
-ravenscar_sparc_fetch_registers (struct regcache *regcache, int regnum)
+sparc_ravenscar_fetch_registers (struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
const int sp_regnum = gdbarch_sp_regnum (gdbarch);
thread. */
static void
-ravenscar_sparc_prepare_to_store (struct regcache *regcache)
+sparc_ravenscar_prepare_to_store (struct regcache *regcache)
{
/* Nothing to do. */
}
thread. */
static void
-ravenscar_sparc_store_registers (struct regcache *regcache, int regnum)
+sparc_ravenscar_store_registers (struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
int buf_size = register_size (gdbarch, regnum);
- char buf [buf_size];
+ gdb_byte buf[buf_size];
ULONGEST register_address;
if (register_in_thread_descriptor_p (regnum))
buf_size);
}
-static struct ravenscar_arch_ops ravenscar_sparc_ops =
+static struct ravenscar_arch_ops sparc_ravenscar_ops =
{
- ravenscar_sparc_fetch_registers,
- ravenscar_sparc_store_registers,
- ravenscar_sparc_prepare_to_store
+ sparc_ravenscar_fetch_registers,
+ sparc_ravenscar_store_registers,
+ sparc_ravenscar_prepare_to_store
};
/* Register ravenscar_arch_ops in GDBARCH. */
void
register_sparc_ravenscar_ops (struct gdbarch *gdbarch)
{
- set_gdbarch_ravenscar_ops (gdbarch, &ravenscar_sparc_ops);
+ set_gdbarch_ravenscar_ops (gdbarch, &sparc_ravenscar_ops);
}