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: register names


Hi,
	I am porting GDB for  a new target.
I want to use register names and register numbers in XXX-tdep.c, So cant i
use the defination from include/opcode/XXX.h, . Every taget has this
information in this file(include/opcode/XXX.h), then why define it again in
XXX-tdep.c file.

Historic, along with other factors. There was a time when:


- the ordering was determined by GCCs debug info
vs
- the ordering determined the way registers were displayed
vs
- the ordering determines the remote protocol
vs
- the ordreing determines the sim interface

and consequently it was safer to wire down the ordering local to gdb and then just leave it.

However, for a brand new architecture with none of that baggage, having opcodes/ export a enumeration (and even a name table) looks much easier!

Andrew



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