projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gas: sparc: fix collision of registers and pseudo-ops.
[deliverable/binutils-gdb.git]
/
gdb
/
sparcnbsd-tdep.c
diff --git
a/gdb/sparcnbsd-tdep.c
b/gdb/sparcnbsd-tdep.c
index 3af3102c411b795770a4865fcba2c4f24fbf7986..7fa384de649acf4a04fa337d524cba8b375299e6 100644
(file)
--- a/
gdb/sparcnbsd-tdep.c
+++ b/
gdb/sparcnbsd-tdep.c
@@
-1,7
+1,6
@@
/* Target-dependent code for NetBSD/sparc.
/* Target-dependent code for NetBSD/sparc.
- Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@
-31,9
+30,6
@@
#include "symtab.h"
#include "trad-frame.h"
#include "symtab.h"
#include "trad-frame.h"
-#include "gdb_assert.h"
-#include "gdb_string.h"
-
#include "sparc-tdep.h"
#include "nbsd-tdep.h"
#include "sparc-tdep.h"
#include "nbsd-tdep.h"
@@
-42,7
+38,7
@@
#define X_RS2(i) ((i) & 0x1f)
#define X_I(i) (((i) >> 13) & 1)
#define X_RS2(i) ((i) & 0x1f)
#define X_I(i) (((i) >> 13) & 1)
-const struct sparc_greg
set sparc32nbsd_gregset
=
+const struct sparc_greg
map sparc32nbsd_gregmap
=
{
0 * 4, /* %psr */
1 * 4, /* %pc */
{
0 * 4, /* %psr */
1 * 4, /* %pc */
@@
-59,13
+55,14
@@
sparc32nbsd_supply_gregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
struct regcache *regcache,
int regnum, const void *gregs, size_t len)
{
- sparc32_supply_gregset (&sparc32nbsd_greg
set
, regcache, regnum, gregs);
+ sparc32_supply_gregset (&sparc32nbsd_greg
map
, regcache, regnum, gregs);
/* Traditional NetBSD core files don't use multiple register sets.
Instead, the general-purpose and floating-point registers are
lumped together in a single section. */
if (len >= 212)
/* Traditional NetBSD core files don't use multiple register sets.
Instead, the general-purpose and floating-point registers are
lumped together in a single section. */
if (len >= 212)
- sparc32_supply_fpregset (regcache, regnum, (const char *) gregs + 80);
+ sparc32_supply_fpregset (&sparc32_bsd_fpregmap, regcache, regnum,
+ (const char *) gregs + 80);
}
static void
}
static void
@@
-73,7
+70,7
@@
sparc32nbsd_supply_fpregset (const struct regset *regset,
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- sparc32_supply_fpregset (regcache, regnum, fpregs);
+ sparc32_supply_fpregset (
&sparc32_bsd_fpregmap,
regcache, regnum, fpregs);
}
\f
}
\f
@@
-88,7
+85,7
@@
static const CORE_ADDR sparc32nbsd_sigtramp_start = 0xeffffef0;
static const CORE_ADDR sparc32nbsd_sigtramp_end = 0xeffffff0;
static int
static const CORE_ADDR sparc32nbsd_sigtramp_end = 0xeffffff0;
static int
-sparc32nbsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
+sparc32nbsd_pc_in_sigtramp (CORE_ADDR pc, c
onst c
har *name)
{
if (pc >= sparc32nbsd_sigtramp_start && pc < sparc32nbsd_sigtramp_end)
return 1;
{
if (pc >= sparc32nbsd_sigtramp_start && pc < sparc32nbsd_sigtramp_end)
return 1;
@@
-99,6
+96,7
@@
sparc32nbsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
struct trad_frame_saved_reg *
sparc32nbsd_sigcontext_saved_regs (struct frame_info *this_frame)
{
struct trad_frame_saved_reg *
sparc32nbsd_sigcontext_saved_regs (struct frame_info *this_frame)
{
+ struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct trad_frame_saved_reg *saved_regs;
CORE_ADDR addr, sigcontext_addr;
int regnum, delta;
struct trad_frame_saved_reg *saved_regs;
CORE_ADDR addr, sigcontext_addr;
int regnum, delta;
@@
-147,7
+145,7
@@
sparc32nbsd_sigcontext_saved_regs (struct frame_info *this_frame)
/* Handle StackGhost. */
{
/* Handle StackGhost. */
{
- ULONGEST wcookie = sparc_fetch_wcookie ();
+ ULONGEST wcookie = sparc_fetch_wcookie (
gdbarch
);
if (wcookie != 0)
{
if (wcookie != 0)
{
@@
-188,7
+186,7
@@
sparc32nbsd_sigcontext_frame_cache (struct frame_info *this_frame,
CORE_ADDR addr;
if (*this_cache)
CORE_ADDR addr;
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);
cache = sparc_frame_cache (this_frame, this_cache);
gdb_assert (cache == *this_cache);
@@
-201,7
+199,7
@@
sparc32nbsd_sigcontext_frame_cache (struct frame_info *this_frame,
/* Since we couldn't find the frame's function, the cache was
initialized under the assumption that we're frameless. */
/* Since we couldn't find the frame's function, the cache was
initialized under the assumption that we're frameless. */
-
cache->frameless_p = 0
;
+
sparc_record_save_insn (cache)
;
addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
cache->base = addr;
}
addr = get_frame_register_unsigned (this_frame, SPARC_FP_REGNUM);
cache->base = addr;
}
@@
-238,12
+236,12
@@
sparc32nbsd_sigcontext_frame_sniffer (const struct frame_unwind *self,
void **this_cache)
{
CORE_ADDR pc = get_frame_pc (this_frame);
void **this_cache)
{
CORE_ADDR pc = get_frame_pc (this_frame);
- char *name;
+ c
onst c
har *name;
find_pc_partial_function (pc, &name, NULL, NULL);
if (sparc32nbsd_pc_in_sigtramp (pc, name))
{
find_pc_partial_function (pc, &name, NULL, NULL);
if (sparc32nbsd_pc_in_sigtramp (pc, name))
{
- if (name == NULL ||
strncmp (name, "__sigtramp_sigcontext", 21
))
+ if (name == NULL ||
!startswith (name, "__sigtramp_sigcontext"
))
return 1;
}
return 1;
}
@@
-253,6
+251,7
@@
sparc32nbsd_sigcontext_frame_sniffer (const struct frame_unwind *self,
static const struct frame_unwind sparc32nbsd_sigcontext_frame_unwind =
{
SIGTRAMP_FRAME,
static const struct frame_unwind sparc32nbsd_sigcontext_frame_unwind =
{
SIGTRAMP_FRAME,
+ default_frame_unwind_stop_reason,
sparc32nbsd_sigcontext_frame_this_id,
sparc32nbsd_sigcontext_frame_prev_register,
NULL,
sparc32nbsd_sigcontext_frame_this_id,
sparc32nbsd_sigcontext_frame_prev_register,
NULL,
@@
-281,6
+280,16
@@
sparcnbsd_step_trap (struct frame_info *frame, unsigned long insn)
}
\f
}
\f
+static const struct regset sparc32nbsd_gregset =
+ {
+ NULL, sparc32nbsd_supply_gregset, NULL
+ };
+
+static const struct regset sparc32nbsd_fpregset =
+ {
+ NULL, sparc32nbsd_supply_fpregset, NULL
+ };
+
static void
sparc32nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
static void
sparc32nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@
-290,10
+299,10
@@
sparc32nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
- tdep->gregset =
regset_alloc (gdbarch, sparc32nbsd_supply_gregset, NULL)
;
+ tdep->gregset =
&sparc32nbsd_gregset
;
tdep->sizeof_gregset = 20 * 4;
tdep->sizeof_gregset = 20 * 4;
- tdep->fpregset =
regset_alloc (gdbarch, sparc32nbsd_supply_fpregset, NULL)
;
+ tdep->fpregset =
&sparc32nbsd_fpregset
;
tdep->sizeof_fpregset = 33 * 4;
/* Make sure we can single-step "new" syscalls. */
tdep->sizeof_fpregset = 33 * 4;
/* Make sure we can single-step "new" syscalls. */
This page took
0.027026 seconds
and
4
git commands to generate.