This is the mail archive of the gdb-patches@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] |
Andrew Cagney <cagney@gnu.org> writes:
> Andrew Cagney <cagney@gnu.org> writes: >
>>> Have a look at the other sim-*.h files, you'll notice that most define >>> an enum namespace and not a series of magic constants. Can we expand >>> the table so that the constants aren't needed?
> Is this going in the right direction?
Yes, that should go in.
Okay, committed. Thanks to you and Kevin for the review.
The old code, which did an under-the-covers call into gdb to map number -> name, was bad and definitly needed to be replaced. The above though could still do with some work - too much on the magic of those numbers in gdb/sim-ppc.h :-(
Anyway, lets first get the enum in place.
What's your plan with SPRs?
I think it's best to use the SPR numbers assigned by the ISA to identify them. Trying to keep tables based on automatically assigned enum values in sync would take a lot of work, for little gain, since ISA SPR numbers are (obviously) unambiguous within any particular PPC variant.
At the moment, the sim doesn't support any SPRs from different PPC variants whose numbers clash. There'll be work needed there to handle that; I don't have any particular insights there.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |