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]

Re: compatibility between gdb and stub


The real problem here is that the Common Registers of PowerPC are not uniform across the chips. I think the only ones that can truly be said to be common are R0-R31,pc,msr,lr,ctr,flags  The macros defined, assume a whole lot about what is common, that isn't.

And having written an "old stub" for the MPC860, I can confidently say that old stubs did not supply zeros where fpscr is, they didn't send anything as GDB did not expect anything.
That is fine.

New registers get added to the end. Consequently, an old target (which knows zip about those registers) would send what GDB views as a short packet. GDB would mark the missing registers (which should have been at the end of the packet) as being zero.

Obviously there would need to be some understanding in the stub of what registers GDB used, but I fail to see that GDB is ever going to permenantly define a packet layout and stick to it.
Part of the definition is that the packet can grow and grow and grow. You just can't go back and re-format it.

The outstanding change, though, is for GDB to allow sparse register numbers in the remote protocol. The P4, for instance, has two thousand million potential MSR registers. Such registers would need to be fetched using something other than the [gG] packet (i.e., the [Pp] packets).

Andrew



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