cvs commit: src/sys/alpha/alpha gdb_machdep.c src/sys/alpha/include
gdb_machdep.h src/sys/amd64/amd64 gdb_machdep.c
src/sys/amd64/include gdb_machdep.h src/sys/gdb gdb_main.c...
Marcel Moolenaar
marcel at FreeBSD.org
Tue Nov 30 22:40:35 PST 2004
marcel 2004-12-01 06:40:35 UTC
FreeBSD src repository
Modified files:
sys/alpha/alpha gdb_machdep.c
sys/alpha/include gdb_machdep.h
sys/amd64/amd64 gdb_machdep.c
sys/amd64/include gdb_machdep.h
sys/gdb gdb_main.c
sys/i386/i386 gdb_machdep.c
sys/i386/include gdb_machdep.h
sys/ia64/ia64 gdb_machdep.c
sys/ia64/include gdb_machdep.h
sys/sparc64/include gdb_machdep.h
sys/sparc64/sparc64 gdb_machdep.c
Log:
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
Revision Changes Path
1.2 +1 -1 src/sys/alpha/alpha/gdb_machdep.c
1.2 +1 -1 src/sys/alpha/include/gdb_machdep.h
1.3 +3 -4 src/sys/amd64/amd64/gdb_machdep.c
1.2 +1 -1 src/sys/amd64/include/gdb_machdep.h
1.3 +24 -10 src/sys/gdb/gdb_main.c
1.3 +3 -4 src/sys/i386/i386/gdb_machdep.c
1.2 +1 -1 src/sys/i386/include/gdb_machdep.h
1.3 +1 -1 src/sys/ia64/ia64/gdb_machdep.c
1.3 +1 -1 src/sys/ia64/include/gdb_machdep.h
1.2 +1 -1 src/sys/sparc64/include/gdb_machdep.h
1.2 +1 -1 src/sys/sparc64/sparc64/gdb_machdep.c
More information about the cvs-all
mailing list