aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDave Anglin <dave.anglin@nrc.ca>2004-11-20 23:56:18 +0000
committerDave Anglin <dave.anglin@nrc.ca>2004-11-20 23:56:18 +0000
commitd564a7d4b1591e23f0c0f53165d0437a97bf6b96 (patch)
treef7357afdffd22c41e89e2c34fc007df0cdb92fd8 /gdb
parent3f70a5e974dd367ac198629ef635c08ab0c648eb (diff)
downloadgdb-d564a7d4b1591e23f0c0f53165d0437a97bf6b96.zip
gdb-d564a7d4b1591e23f0c0f53165d0437a97bf6b96.tar.gz
gdb-d564a7d4b1591e23f0c0f53165d0437a97bf6b96.tar.bz2
* infttrace.h (ttrace_write_reg_64): Add prototype.
* hppah-nat.c (store_inferior_registers): Fix warning from ambiguous expression. (store_inferior_registers): Correct formatting. Replace uses of deprecated_registers with calls to regcache_raw_read, regcache_raw_write_part and regcache_raw_read_part.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/hppah-nat.c19
-rw-r--r--gdb/infttrace.h1
3 files changed, 24 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9c5ffe4..da62708 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * infttrace.h (ttrace_write_reg_64): Add prototype.
+ * hppah-nat.c (store_inferior_registers): Fix warning from ambiguous
+ expression.
+ (store_inferior_registers): Correct formatting. Replace uses of
+ deprecated_registers with calls to regcache_raw_read,
+ regcache_raw_write_part and regcache_raw_read_part.
+
2004-11-21 Mark Kettenis <kettenis@gnu.org>
* config/pa/hppahpux.mh: Remove file.
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index 3979ece..2a79b61 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -141,11 +141,11 @@ store_inferior_registers (int regno)
layering will not allow us to perform a 64bit register store.
What a crock. */
- if (regno == HPPA_PCOQ_HEAD_REGNUM || regno == HPPA_PCOQ_TAIL_REGNUM && len == 8)
+ if ((regno == HPPA_PCOQ_HEAD_REGNUM || regno == HPPA_PCOQ_TAIL_REGNUM) && len == 8)
{
CORE_ADDR temp;
- temp = *(CORE_ADDR *)&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
+ regcache_raw_read (current_regcache, regno, &temp);
/* Set the priv level (stored in the low two bits of the PC. */
temp |= 0x3;
@@ -155,7 +155,7 @@ store_inferior_registers (int regno)
/* If we fail to write the PC, give a true error instead of
just a warning. */
- if (errno != 0)
+ if (errno != 0)
{
char *err = safe_strerror (errno);
char *msg = alloca (strlen (err) + 128);
@@ -170,15 +170,24 @@ store_inferior_registers (int regno)
the high part of IPSW. What will it take for HP to catch a
clue about building sensible interfaces? */
if (regno == HPPA_IPSW_REGNUM && len == 8)
- *(int *)&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)] = 0;
+ {
+ int temp = 0;
+
+ regcache_raw_write_part (current_regcache, regno, 0,
+ sizeof (int), &temp);
+ }
#endif
for (i = 0; i < len; i += sizeof (int))
{
+ int temp;
+
errno = 0;
+ regcache_raw_read_part (current_regcache, regno, i,
+ sizeof (int), &temp);
call_ptrace (PT_WUREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) addr + i,
- *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno) + i]);
+ temp);
if (errno != 0)
{
/* Warning, not error, in case we are attached; sometimes
diff --git a/gdb/infttrace.h b/gdb/infttrace.h
index c947cc0..c505b64 100644
--- a/gdb/infttrace.h
+++ b/gdb/infttrace.h
@@ -31,5 +31,6 @@ extern int hpux_has_vforked (int pid, int *childpid);
extern int hpux_has_execd (int pid, char **execd_pathname);
extern int hpux_has_syscall_event (int pid, enum target_waitkind *kind,
int *syscall_id);
+extern int ttrace_write_reg_64 (int, CORE_ADDR, CORE_ADDR);
#endif