summaryrefslogtreecommitdiffstats
path: root/sys/ia64/ia64/gdb_machdep.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-12-01 06:40:35 +0000
committermarcel <marcel@FreeBSD.org>2004-12-01 06:40:35 +0000
commitc106bd9120d0e0d75dc9a28f87686d6b6d18ae8c (patch)
tree62c9a95681df36f1242efe2fd847059217302039 /sys/ia64/ia64/gdb_machdep.c
parentff42094303dbb28e905ab1bee9975ca994fea668 (diff)
downloadFreeBSD-src-c106bd9120d0e0d75dc9a28f87686d6b6d18ae8c.zip
FreeBSD-src-c106bd9120d0e0d75dc9a28f87686d6b6d18ae8c.tar.gz
Change gdb_cpu_setreg() to not take the value to which to set the
specified register, but a pointer to the in-memory representation of that value. The reason for this is twofold: 1. Not all registers can be represented by a register_t. In particular FP registers fall in that category. Passing the new register value by reference instead of by value makes this point moot. 2. When we receive a G or P packet, both are for writing a register, the packet will have the register value in target-byte order and in the memory representation (modulo the fact that bytes are sent as 2 printable hexadecimal numbers of course). We only need to decode the packet to have a pointer to the register value. This change fixes the bug of extracting the register value of the P packet as a hexadecimal number instead of as a bit array. The quick (and dirty) fix to bswap the register value in gdb_cpu_setreg() as it has been added on i386 and amd64 can therefore be removed and has in fact been that. Tested on: alpha, amd64, i386, ia64, sparc64
Diffstat (limited to 'sys/ia64/ia64/gdb_machdep.c')
-rw-r--r--sys/ia64/ia64/gdb_machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ia64/ia64/gdb_machdep.c b/sys/ia64/ia64/gdb_machdep.c
index 62b4755..7729d71 100644
--- a/sys/ia64/ia64/gdb_machdep.c
+++ b/sys/ia64/ia64/gdb_machdep.c
@@ -128,7 +128,7 @@ gdb_cpu_getreg(int regnum, size_t *regsz)
}
void
-gdb_cpu_setreg(int regnum, register_t val)
+gdb_cpu_setreg(int regnum, void *val)
{
switch (regnum) {
OpenPOWER on IntegriCloud