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]

Re: [wip/rfc] Merge REGISTER_TO_VALUE and REGISTER_TO_TYPE


Andrew Cagney <ac131313@redhat.com> writes:

[snip]


With this in mind, I'm thinking that REGISTER_TO_TYPE and REGISTER_TO_VALUE should be merged. To that end, I can see several ways of doing it:

- Don't merge - add REGISTER_TO_TYPE to the architecture vector

- Retain the current logic - just apply REGISTER_TO_VALUE to values stored across multiple registers

- Add a frame parameter to REGISTER_TO_VALUE and make it responsible for both extracting the bytes from the register[s] and then storing them in the ``struct value''.

The last option is interesting, it would let the target draw the value from any register based on REGNUM. The i386 with its long-long problem might be interested in this (you'll notice in the patch I made an attempt at doing this only I didn't see it affect the test results).

Thoughts?


The last option is certainly attractive.  The fact that this doesn't
show any improvements in the testsuite, is because there is no test
for `long long' in store.exp.

What about reading long long values? Nothing there either? The changes, as they stand, don't touch the path used when storing (note the #if 0 in the patch ....).


There are tests for small structs there
that will still fail since your implementation of
i386_register_to_value isn't complete; it should also handle 8-byte
strcutures stored in registers.  Not just integers.

Anyway, you can leave the i386-specific details to me if you prefer.

M'kay.


Andrew



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