This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
RS6000-TDEP register problems
- From: Stephen Holford <SHolford at WESCAM dot com>
- To: gdb at sources dot redhat dot com
- Date: Tue, 5 Feb 2002 16:05:37 -0500
- Subject: RS6000-TDEP register problems
- Organization: Wescam
- Reply-to: Stephen Holford <sholford at wescam dot com>
Hi
I've was having trouble getting gdb 5.1 and 5.1.1 to work with my embedded
8260 board. I was getting Remote Packet too long errors on register fetches,
even with the architecture set to powerpc:603. It appears that the problem
is with the macro definitions R64 and R0 in rs6000-dep.c. These macros
create zero-size entries in the registers_xxxx[] table, which mess up the
offsets and ultimately the value passed to set_gdbarch_register_bytes.
The quick hack fix for me was to change R64 to
#define R64(name) { STR(name), 0, 8, 0}, {0, 4, 0, 0}
and to change R0 to
#define R0 { 0, 4, 0, 0}
This of course won't work on a 64 bit system, and it causes a double entry
in the table for each R64, but it seems to work propery, i.e. no more Packet
too long errors, and the registers are receiving the right values.
Steve
---------------------------------------------------------------
Stephen F. Holford, P.Eng.
Wescam
(905) 633-4000 x2119