-
Notifications
You must be signed in to change notification settings - Fork 20
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
PPC: Guess reloc data type based on the instruction. #108
Conversation
Adds an entry to the reloc tooltip to show the inferred data type and value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a ton for this! Great start. I'm happy to merge as-is, just let me know if you're interested in making any of these changes
.and_then(|ty| arch.display_data_type(ty, &reloc.target.bytes)) | ||
{ | ||
ui.colored_label(appearance.highlight_color, s); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add this to the context menu as well? So you can copy the float value. Would require splitting out the label and value for display
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was one of the things I wanted to do in a followup. It might be a bit before I can get the time again to figure it out.
@encounter What is your opinion on the |
I'm okay with either, though I agree it's a little confusing. |
@encounter I really don't like this solution to the matching on opcode problem. Do you have a better solution than transmuting? |
Transmuting is fine for now. Thanks for the work on this! |
Adds an entry to the reloc tooltip to show the inferred data type and value.
This is potentially somewhat rough. I'm opening this get early feedback on the implementation. If this is deemed acceptable as is, it currently only implements PowerPC and I would be planning to follow up with a similar implementation for MIPS. I would also like to followup with an extension to the right-click context menu to copy the value of a reloc.
For integers: Unsigned and Signed interpretations are displayed (signed is only shown when value would be negative)
Arguably the string display should be removed as it may be somewhat confusing that it doesn't necessarily correspond to the string being used by the code.
Images: