This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RS6000-TDEP register problems


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]