/* Target-dependent code for Solaris SPARC.
- Copyright (C) 2003-2014 Free Software Foundation, Inc.
+ Copyright (C) 2003-2018 Free Software Foundation, Inc.
This file is part of GDB.
#include "objfiles.h"
#include "osabi.h"
#include "regcache.h"
+#include "regset.h"
#include "target.h"
#include "trad-frame.h"
0 * 4, /* %f0 */
33 * 4, /* %fsr */
};
+
+static void
+sparc32_sol2_supply_core_gregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *gregs, size_t len)
+{
+ sparc32_supply_gregset (&sparc32_sol2_gregmap, regcache, regnum, gregs);
+}
+
+static void
+sparc32_sol2_collect_core_gregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *gregs, size_t len)
+{
+ sparc32_collect_gregset (&sparc32_sol2_gregmap, regcache, regnum, gregs);
+}
+
+static void
+sparc32_sol2_supply_core_fpregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *fpregs, size_t len)
+{
+ sparc32_supply_fpregset (&sparc32_sol2_fpregmap, regcache, regnum, fpregs);
+}
+
+static void
+sparc32_sol2_collect_core_fpregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *fpregs, size_t len)
+{
+ sparc32_collect_fpregset (&sparc32_sol2_fpregmap, regcache, regnum, fpregs);
+}
+
+static const struct regset sparc32_sol2_gregset =
+ {
+ NULL,
+ sparc32_sol2_supply_core_gregset,
+ sparc32_sol2_collect_core_gregset
+ };
+
+static const struct regset sparc32_sol2_fpregset =
+ {
+ NULL,
+ sparc32_sol2_supply_core_fpregset,
+ sparc32_sol2_collect_core_fpregset
+ };
\f
/* The Solaris signal trampolines reside in libc. For normal signals,
int regnum;
if (*this_cache)
- return *this_cache;
+ return (struct sparc_frame_cache *) *this_cache;
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
/* Unglobalize NAME. */
-const const char *
+const char *
sparc_sol2_static_transform_name (const char *name)
{
/* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop,
if (name[0] == '$')
{
- char *p = strrchr (name, '.');
+ const char *p = strrchr (name, '.');
if (p)
return p + 1;
}
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ tdep->gregset = &sparc32_sol2_gregset;
+ tdep->sizeof_gregset = 152;
+
+ tdep->fpregset = &sparc32_sol2_fpregset;
+ tdep->sizeof_fpregset = 400;
+
/* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop, SunPRO)
compiler puts out 0 instead of the address in N_SO stabs. Starting with
SunPRO 3.0, the compiler does this for N_FUN stabs too. */
/* How to print LWP PTIDs from core files. */
set_gdbarch_core_pid_to_str (gdbarch, sol2_core_pid_to_str);
}
-\f
-
-/* Provide a prototype to silence -Wmissing-prototypes. */
-void _initialize_sparc_sol2_tdep (void);
void
_initialize_sparc_sol2_tdep (void)