projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement "to_stopped_by_hw_breakpoint" for x86 debug registers.
[deliverable/binutils-gdb.git]
/
gdb
/
hppa-linux-nat.c
diff --git
a/gdb/hppa-linux-nat.c
b/gdb/hppa-linux-nat.c
index 0ac4da9a5c7ee438bdc881964999a7dbc0e65bee..ddcee03cb4a67ce7a8331d0d4160efaebdeee8a5 100644
(file)
--- a/
gdb/hppa-linux-nat.c
+++ b/
gdb/hppa-linux-nat.c
@@
-1,7
+1,6
@@
/* Functions specific to running GDB native on HPPA running GNU/Linux.
/* Functions specific to running GDB native on HPPA running GNU/Linux.
- Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 2004-2018 Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-21,13
+20,13
@@
#include "defs.h"
#include "gdbcore.h"
#include "regcache.h"
#include "defs.h"
#include "gdbcore.h"
#include "regcache.h"
-#include "gdb_string.h"
#include "inferior.h"
#include "target.h"
#include "linux-nat.h"
#include "inferior.h"
#include "target.h"
#include "linux-nat.h"
+#include "inf-ptrace.h"
#include <sys/procfs.h>
#include <sys/procfs.h>
-#include
<sys/ptrace.h>
+#include
"nat/gdb_ptrace.h"
#include <linux/version.h>
#include <asm/ptrace.h>
#include <linux/version.h>
#include <asm/ptrace.h>
@@
-35,7
+34,7
@@
#include "hppa-tdep.h"
#include "hppa-tdep.h"
-/* Prototypes for supply_gregset etc. */
+/* Prototypes for supply_gregset etc.
*/
#include "gregset.h"
/* These must match the order of the register names.
#include "gregset.h"
/* These must match the order of the register names.
@@
-214,8
+213,8
@@
static const int greg_map[] =
static void
fetch_register (struct regcache *regcache, int regno)
{
static void
fetch_register (struct regcache *regcache, int regno)
{
- struct gdbarch *gdbarch =
get_regcache_arch (regcache
);
-
in
t tid;
+ struct gdbarch *gdbarch =
regcache->arch (
);
+
pid_
t tid;
int val;
if (gdbarch_cannot_fetch_register (gdbarch, regno))
int val;
if (gdbarch_cannot_fetch_register (gdbarch, regno))
@@
-224,10
+223,7
@@
fetch_register (struct regcache *regcache, int regno)
return;
}
return;
}
- /* GNU/Linux LWP ID's are process ID's. */
- tid = TIDGET (inferior_ptid);
- if (tid == 0)
- tid = PIDGET (inferior_ptid); /* Not a threaded program. */
+ tid = get_ptrace_pid (regcache_get_ptid (regcache));
errno = 0;
val = ptrace (PTRACE_PEEKUSER, tid, hppa_linux_register_addr (regno, 0), 0);
errno = 0;
val = ptrace (PTRACE_PEEKUSER, tid, hppa_linux_register_addr (regno, 0), 0);
@@
-239,22
+235,19
@@
fetch_register (struct regcache *regcache, int regno)
regcache_raw_supply (regcache, regno, &val);
}
regcache_raw_supply (regcache, regno, &val);
}
-/* Store one register. */
+/* Store one register.
*/
static void
store_register (const struct regcache *regcache, int regno)
{
static void
store_register (const struct regcache *regcache, int regno)
{
- struct gdbarch *gdbarch =
get_regcache_arch (regcache
);
-
in
t tid;
+ struct gdbarch *gdbarch =
regcache->arch (
);
+
pid_
t tid;
int val;
if (gdbarch_cannot_store_register (gdbarch, regno))
return;
int val;
if (gdbarch_cannot_store_register (gdbarch, regno))
return;
- /* GNU/Linux LWP ID's are process ID's. */
- tid = TIDGET (inferior_ptid);
- if (tid == 0)
- tid = PIDGET (inferior_ptid); /* Not a threaded program. */
+ tid = get_ptrace_pid (regcache_get_ptid (regcache));
errno = 0;
regcache_raw_collect (regcache, regno, &val);
errno = 0;
regcache_raw_collect (regcache, regno, &val);
@@
-276,7
+269,7
@@
hppa_linux_fetch_inferior_registers (struct target_ops *ops,
if (-1 == regno)
{
for (regno = 0;
if (-1 == regno)
{
for (regno = 0;
- regno < gdbarch_num_regs (
get_regcache_arch (regcache
));
+ regno < gdbarch_num_regs (
regcache->arch (
));
regno++)
fetch_register (regcache, regno);
}
regno++)
fetch_register (regcache, regno);
}
@@
-297,7
+290,7
@@
hppa_linux_store_inferior_registers (struct target_ops *ops,
if (-1 == regno)
{
for (regno = 0;
if (-1 == regno)
{
for (regno = 0;
- regno < gdbarch_num_regs (
get_regcache_arch (regcache
));
+ regno < gdbarch_num_regs (
regcache->arch (
));
regno++)
store_register (regcache, regno);
}
regno++)
store_register (regcache, regno);
}
@@
-346,7
+339,7
@@
fill_gregset (const struct regcache *regcache,
/* Given a pointer to a floating point register set in /proc format
(fpregset_t *), unpack the register contents and supply them as gdb's
/* Given a pointer to a floating point register set in /proc format
(fpregset_t *), unpack the register contents and supply them as gdb's
- idea of the current floating point register values. */
+ idea of the current floating point register values.
*/
void
supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
void
supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
@@
-365,7
+358,7
@@
supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
/* Given a pointer to a floating point register set in /proc format
(fpregset_t *), update the register specified by REGNO from gdb's idea
of the current floating point register set. If REGNO is -1, update
/* Given a pointer to a floating point register set in /proc format
(fpregset_t *), update the register specified by REGNO from gdb's idea
of the current floating point register set. If REGNO is -1, update
- them all. */
+ them all.
*/
void
fill_fpregset (const struct regcache *regcache,
void
fill_fpregset (const struct regcache *regcache,
@@
-384,8
+377,6
@@
fill_fpregset (const struct regcache *regcache,
}
}
}
}
-void _initialize_hppa_linux_nat (void);
-
void
_initialize_hppa_linux_nat (void)
{
void
_initialize_hppa_linux_nat (void)
{
This page took
0.039267 seconds
and
4
git commands to generate.