projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* symtab.h (enum address_class): Remove LOC_INDIRECT and
[deliverable/binutils-gdb.git]
/
gdb
/
hppa-hpux-nat.c
diff --git
a/gdb/hppa-hpux-nat.c
b/gdb/hppa-hpux-nat.c
index 70924f0f7b04d18c1be95a26d04f105eab01b143..2f92d402ec39120243ae2c75d89504d9bb553507 100644
(file)
--- a/
gdb/hppa-hpux-nat.c
+++ b/
gdb/hppa-hpux-nat.c
@@
-1,12
+1,12
@@
/* Native-dependent code for PA-RISC HP-UX.
/* Native-dependent code for PA-RISC HP-UX.
- Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007
, 2008
Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version
2
of the License, or
+ the Free Software Foundation; either version
3
of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@
-15,9
+15,7
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
#include "inferior.h"
#include "defs.h"
#include "inferior.h"
@@
-89,6
+87,7
@@
hppa_hpux_save_state_offset (struct regcache *regcache, int regnum)
static void
hppa_hpux_fetch_register (struct regcache *regcache, int regnum)
{
static void
hppa_hpux_fetch_register (struct regcache *regcache, int regnum)
{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
CORE_ADDR addr;
size_t size;
PTRACE_TYPE_RET *buf;
CORE_ADDR addr;
size_t size;
PTRACE_TYPE_RET *buf;
@@
-99,7
+98,7
@@
hppa_hpux_fetch_register (struct regcache *regcache, int regnum)
/* This isn't really an address, but ptrace thinks of it as one. */
addr = hppa_hpux_save_state_offset (regcache, regnum);
/* This isn't really an address, but ptrace thinks of it as one. */
addr = hppa_hpux_save_state_offset (regcache, regnum);
- size = register_size (
current_
gdbarch, regnum);
+ size = register_size (gdbarch, regnum);
gdb_assert (size == 4 || size == 8);
buf = alloca (size);
gdb_assert (size == 4 || size == 8);
buf = alloca (size);
@@
-110,7
+109,7
@@
hppa_hpux_fetch_register (struct regcache *regcache, int regnum)
if (ttrace (TT_LWP_RUREGS, pid, lwp, addr, size, (uintptr_t)buf) == -1)
error (_("Couldn't read register %s (#%d): %s"),
if (ttrace (TT_LWP_RUREGS, pid, lwp, addr, size, (uintptr_t)buf) == -1)
error (_("Couldn't read register %s (#%d): %s"),
- gdbarch_register_name (
current_
gdbarch, regnum),
+ gdbarch_register_name (gdbarch, regnum),
regnum, safe_strerror (errno));
}
#else
regnum, safe_strerror (errno));
}
#else
@@
-124,7
+123,7
@@
hppa_hpux_fetch_register (struct regcache *regcache, int regnum)
buf[i] = ptrace (PT_RUREGS, pid, (PTRACE_TYPE_ARG3) addr, 0, 0);
if (errno != 0)
error (_("Couldn't read register %s (#%d): %s"),
buf[i] = ptrace (PT_RUREGS, pid, (PTRACE_TYPE_ARG3) addr, 0, 0);
if (errno != 0)
error (_("Couldn't read register %s (#%d): %s"),
- gdbarch_register_name (
current_
gdbarch, regnum),
+ gdbarch_register_name (gdbarch, regnum),
regnum, safe_strerror (errno));
addr += sizeof (PTRACE_TYPE_RET);
regnum, safe_strerror (errno));
addr += sizeof (PTRACE_TYPE_RET);
@@
-147,7
+146,9
@@
static void
hppa_hpux_fetch_inferior_registers (struct regcache *regcache, int regnum)
{
if (regnum == -1)
hppa_hpux_fetch_inferior_registers (struct regcache *regcache, int regnum)
{
if (regnum == -1)
- for (regnum = 0; regnum < gdbarch_num_regs (current_gdbarch); regnum++)
+ for (regnum = 0;
+ regnum < gdbarch_num_regs (get_regcache_arch (regcache));
+ regnum++)
hppa_hpux_fetch_register (regcache, regnum);
else
hppa_hpux_fetch_register (regcache, regnum);
hppa_hpux_fetch_register (regcache, regnum);
else
hppa_hpux_fetch_register (regcache, regnum);
@@
-158,6
+159,7
@@
hppa_hpux_fetch_inferior_registers (struct regcache *regcache, int regnum)
static void
hppa_hpux_store_register (struct regcache *regcache, int regnum)
{
static void
hppa_hpux_store_register (struct regcache *regcache, int regnum)
{
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
CORE_ADDR addr;
size_t size;
PTRACE_TYPE_RET *buf;
CORE_ADDR addr;
size_t size;
PTRACE_TYPE_RET *buf;
@@
-167,7
+169,7
@@
hppa_hpux_store_register (struct regcache *regcache, int regnum)
/* This isn't really an address, but ptrace thinks of it as one. */
addr = hppa_hpux_save_state_offset (regcache, regnum);
/* This isn't really an address, but ptrace thinks of it as one. */
addr = hppa_hpux_save_state_offset (regcache, regnum);
- size = register_size (
current_
gdbarch, regnum);
+ size = register_size (gdbarch, regnum);
gdb_assert (size == 4 || size == 8);
buf = alloca (size);
gdb_assert (size == 4 || size == 8);
buf = alloca (size);
@@
-189,7
+191,7
@@
hppa_hpux_store_register (struct regcache *regcache, int regnum)
if (ttrace (TT_LWP_WUREGS, pid, lwp, addr, size, (uintptr_t)buf) == -1)
error (_("Couldn't write register %s (#%d): %s"),
if (ttrace (TT_LWP_WUREGS, pid, lwp, addr, size, (uintptr_t)buf) == -1)
error (_("Couldn't write register %s (#%d): %s"),
- gdbarch_register_name (
current_
gdbarch, regnum),
+ gdbarch_register_name (gdbarch, regnum),
regnum, safe_strerror (errno));
}
#else
regnum, safe_strerror (errno));
}
#else
@@
-203,7
+205,7
@@
hppa_hpux_store_register (struct regcache *regcache, int regnum)
ptrace (PT_WUREGS, pid, (PTRACE_TYPE_ARG3) addr, buf[i], 0);
if (errno != 0)
error (_("Couldn't write register %s (#%d): %s"),
ptrace (PT_WUREGS, pid, (PTRACE_TYPE_ARG3) addr, buf[i], 0);
if (errno != 0)
error (_("Couldn't write register %s (#%d): %s"),
- gdbarch_register_name (
current_
gdbarch, regnum),
+ gdbarch_register_name (gdbarch, regnum),
regnum, safe_strerror (errno));
addr += sizeof (PTRACE_TYPE_RET);
regnum, safe_strerror (errno));
addr += sizeof (PTRACE_TYPE_RET);
@@
-219,7
+221,9
@@
static void
hppa_hpux_store_inferior_registers (struct regcache *regcache, int regnum)
{
if (regnum == -1)
hppa_hpux_store_inferior_registers (struct regcache *regcache, int regnum)
{
if (regnum == -1)
- for (regnum = 0; regnum < gdbarch_num_regs (current_gdbarch); regnum++)
+ for (regnum = 0;
+ regnum < gdbarch_num_regs (get_regcache_arch (regcache));
+ regnum++)
hppa_hpux_store_register (regcache, regnum);
else
hppa_hpux_store_register (regcache, regnum);
hppa_hpux_store_register (regcache, regnum);
else
hppa_hpux_store_register (regcache, regnum);
This page took
0.026182 seconds
and
4
git commands to generate.