-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement missing arch-specific RegId
implementations
#29
Comments
Issue #29 has been updated to reflect this new approach.
This is one of action items in issue daniel5151#29.
This is one of action items in issue daniel5151#29.
This is one of action items in issue daniel5151#29.
This is one of action items in issue daniel5151#29.
If #29 is ever resolved, a similar method could be added to `RegId`, enabling more efficient `pc` queries. Note that the less efficient approach would still need to be supported, as the ability to query individual registers is not a required feature implemented by all targets.
If #29 is ever resolved, a similar method could be added to `RegId`, enabling more efficient `pc` queries. Note that the less efficient approach would still need to be supported, as the ability to query individual registers is not a required feature implemented by all targets.
Here is the relevant target description file from the GDB sources for PPC32: |
I would also leave the following links as well:
Just as a reminder though, this issue is not a bug or a blocker - it is simply tracking something that should get resolved eventually. Moreover, implementing a new @jamcleod, you wouldn't happen to have some spare time on your hands to circle back and upstream a If not, all good! I totally don't mind leaving this issue open until someone happens to use |
Appreciate the other references :) I have a PPC target, but I'll have to figure out the dynamic dispatch first before I can test a |
Ah, well that's great then! In that case, I'm looking forwards to seeing a PR 😄 |
Overview
#22 added support for register-level read/writes, and introduced a new
RegId
associated type to the existingRegisters
trait. This associated type is used to translate raw GDB register ids (i.e: a arch-dependentusize
) into a structured human-readable enum identifying the register.e.g:
Unfortunately, this API was only added after several contributors had already upstreamed their
Arch
implementations. As a result, there are several arch implementations which are missing properRegId
enums.As a stop-gap measure, affected
Arch
implementations have been modified to accept aRegIdImpl
type parameter, which requires users to manually specify aRegId
implementation. If none is available, users can also specifyRegId = ()
, which uses a stubbed implementation that always returnsNone
.e.g:
Action Items
At the time of writing, the following
Arch
implementations are still missing properRegId
implementations:Armv4t
Mips
/Mips64
Msp430
PowerPcAltivec32
Riscv32
/Riscv64
Whenever a
RegId
enum is upstreamed, the associatedArch
'sRegIdImpl
parameter will be defaulted to the newly added enum. This will simplify the API without requiring an explicit breaking API change. Once allRegIdImpl
have a default implementation, only a single breaking API change will be required to removeRegIdImpl
entirely.Please only contribute
RegId
implementations that have been reasonably tested in your own project!As with all architecture-specific bits of functionality in
gdbstub
, it's up to the contributor to test whether or not the feature works as expected - all I can do is review the core for style and efficiency.This issue is not a blocker, and I do not mind having
Arch
implementations with aRegIdImpl
parameter lingering in the codebase.The text was updated successfully, but these errors were encountered: