projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git]
/
gdb
/
arm-nbsd-nat.c
diff --git
a/gdb/arm-nbsd-nat.c
b/gdb/arm-nbsd-nat.c
index cb31462737d0cbcea68c79cf8cd8efb79872980f..a8a67e6e85202c71bfeb905d356b3f28f23b6380 100644
(file)
--- a/
gdb/arm-nbsd-nat.c
+++ b/
gdb/arm-nbsd-nat.c
@@
-34,8
+34,9
@@
#include "arm-nbsd-tdep.h"
#include "aarch32-tdep.h"
#include "inf-ptrace.h"
#include "arm-nbsd-tdep.h"
#include "aarch32-tdep.h"
#include "inf-ptrace.h"
+#include "nbsd-nat.h"
-class arm_netbsd_nat_target final : public
inf_ptrace
_target
+class arm_netbsd_nat_target final : public
nbsd_nat
_target
{
public:
/* Add our register access methods. */
{
public:
/* Add our register access methods. */
@@
-65,9
+66,10
@@
fetch_register (struct regcache *regcache, int regno)
{
struct reg inferior_registers;
int ret;
{
struct reg inferior_registers;
int ret;
+ int lwp = regcache->ptid ().lwp ();
ret = ptrace (PT_GETREGS, regcache->ptid ().pid (),
ret = ptrace (PT_GETREGS, regcache->ptid ().pid (),
- (PTRACE_TYPE_ARG3) &inferior_registers,
0
);
+ (PTRACE_TYPE_ARG3) &inferior_registers,
lwp
);
if (ret < 0)
{
if (ret < 0)
{
@@
-82,8
+84,10
@@
static void
fetch_fp_register (struct regcache *regcache, int regno)
{
struct fpreg inferior_fp_registers;
fetch_fp_register (struct regcache *regcache, int regno)
{
struct fpreg inferior_fp_registers;
+ int lwp = regcache->ptid ().lwp ();
+
int ret = ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
int ret = ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
- (PTRACE_TYPE_ARG3) &inferior_fp_registers,
0
);
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers,
lwp
);
struct vfpreg &vfp = inferior_fp_registers.fpr_vfp;
struct vfpreg &vfp = inferior_fp_registers.fpr_vfp;
@@
-110,11
+114,12
@@
static void
fetch_fp_regs (struct regcache *regcache)
{
struct fpreg inferior_fp_registers;
fetch_fp_regs (struct regcache *regcache)
{
struct fpreg inferior_fp_registers;
+ int lwp = regcache->ptid ().lwp ();
int ret;
int regno;
ret = ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
int ret;
int regno;
ret = ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
- (PTRACE_TYPE_ARG3) &inferior_fp_registers,
0
);
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers,
lwp
);
if (ret < 0)
{
if (ret < 0)
{
@@
-148,10
+153,11
@@
store_register (const struct regcache *regcache, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
struct reg inferior_registers;
{
struct gdbarch *gdbarch = regcache->arch ();
struct reg inferior_registers;
+ int lwp = regcache->ptid ().lwp ();
int ret;
ret = ptrace (PT_GETREGS, regcache->ptid ().pid (),
int ret;
ret = ptrace (PT_GETREGS, regcache->ptid ().pid (),
- (PTRACE_TYPE_ARG3) &inferior_registers,
0
);
+ (PTRACE_TYPE_ARG3) &inferior_registers,
lwp
);
if (ret < 0)
{
if (ret < 0)
{
@@
-209,7
+215,7
@@
store_register (const struct regcache *regcache, int regno)
}
ret = ptrace (PT_SETREGS, regcache->ptid ().pid (),
}
ret = ptrace (PT_SETREGS, regcache->ptid ().pid (),
- (PTRACE_TYPE_ARG3) &inferior_registers,
0
);
+ (PTRACE_TYPE_ARG3) &inferior_registers,
lwp
);
if (ret < 0)
warning (_("unable to write register %d to inferior"), regno);
if (ret < 0)
warning (_("unable to write register %d to inferior"), regno);
@@
-220,6
+226,7
@@
store_regs (const struct regcache *regcache)
{
struct gdbarch *gdbarch = regcache->arch ();
struct reg inferior_registers;
{
struct gdbarch *gdbarch = regcache->arch ();
struct reg inferior_registers;
+ int lwp = regcache->ptid ().lwp ();
int ret;
int regno;
int ret;
int regno;
@@
-251,7
+258,7
@@
store_regs (const struct regcache *regcache)
}
ret = ptrace (PT_SETREGS, regcache->ptid ().pid (),
}
ret = ptrace (PT_SETREGS, regcache->ptid ().pid (),
- (PTRACE_TYPE_ARG3) &inferior_registers,
0
);
+ (PTRACE_TYPE_ARG3) &inferior_registers,
lwp
);
if (ret < 0)
warning (_("unable to store general registers"));
if (ret < 0)
warning (_("unable to store general registers"));
@@
-261,8
+268,9
@@
static void
store_fp_register (const struct regcache *regcache, int regno)
{
struct fpreg inferior_fp_registers;
store_fp_register (const struct regcache *regcache, int regno)
{
struct fpreg inferior_fp_registers;
+ int lwp = regcache->ptid ().lwp ();
int ret = ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
int ret = ptrace (PT_GETFPREGS, regcache->ptid ().pid (),
- (PTRACE_TYPE_ARG3) &inferior_fp_registers,
0
);
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers,
lwp
);
struct vfpreg &vfp = inferior_fp_registers.fpr_vfp;
if (ret < 0)
struct vfpreg &vfp = inferior_fp_registers.fpr_vfp;
if (ret < 0)
@@
-284,7
+292,7
@@
store_fp_register (const struct regcache *regcache, int regno)
warning (_("Invalid register number."));
ret = ptrace (PT_SETFPREGS, regcache->ptid ().pid (),
warning (_("Invalid register number."));
ret = ptrace (PT_SETFPREGS, regcache->ptid ().pid (),
- (PTRACE_TYPE_ARG3) &inferior_fp_registers,
0
);
+ (PTRACE_TYPE_ARG3) &inferior_fp_registers,
lwp
);
if (ret < 0)
warning (_("unable to write register %d to inferior"), regno);
if (ret < 0)
warning (_("unable to write register %d to inferior"), regno);
@@
-294,6
+302,7
@@
static void
store_fp_regs (const struct regcache *regcache)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
store_fp_regs (const struct regcache *regcache)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ int lwp = regcache->ptid ().lwp ();
if (tdep->vfp_register_count == 0)
return;
if (tdep->vfp_register_count == 0)
return;
@@
-306,7
+315,7
@@
store_fp_regs (const struct regcache *regcache)
(char *) &fpregs.fpr_vfp.vfp_fpscr);
int ret = ptrace (PT_SETFPREGS, regcache->ptid ().pid (),
(char *) &fpregs.fpr_vfp.vfp_fpscr);
int ret = ptrace (PT_SETFPREGS, regcache->ptid ().pid (),
- (PTRACE_TYPE_ARG3) &fpregs,
0
);
+ (PTRACE_TYPE_ARG3) &fpregs,
lwp
);
if (ret < 0)
warning (_("unable to store floating-point registers"));
if (ret < 0)
warning (_("unable to store floating-point registers"));
This page took
0.031898 seconds
and
4
git commands to generate.