-
Notifications
You must be signed in to change notification settings - Fork 96
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
debug.Registers #48
Comments
I agree that the current registers API is not on par with the design goals. I will look into your suggestions as soon as I have time. Thank you! |
Finally had the time to take a proper look at things. The current handling of registers within Sark (as is the rest of the code) is oriented towards static analysis and not debugging (not a design choice, it was simply what I needed at the time). So the current register handling is meant to tell you which regs are used in a given instruction. What you're suggesting here is register access while debugging. I'd be happy to add debugger support to Sark. I guess it will go under |
Well, I felt that it had a debug intention as well by looking at Registers comment.
Enables easy querying of the debug registers API ( Usage (on x86):
|
Well, this is a bit embarrassing... I completely forgot this code exists. I added it when working on DIE, and never used it since. In this regard, looking at my code again, your suggestions make a lot of sense 😄 |
Hahaha, we found it! I think that we should extend the debug events class Also a stackwalker/stackapi would be useful on these event contexts. Debug memory api => I'm not writting this to force you to spent time on this; just to have a list of "requisites" of the debug layer. I'll try to contribute as well :) |
Honestly, I never used to debug APIs, so I don't have any idea what to build there. If you want, feel free to submit pull requests (preferably with basic use cases) and I'll take a look. |
Say, does your example code support partial registers ( |
Yes! As long as The limitation is in the second level of the schema, I didn't built the recursiveness but shouldn't be hard, just because I only had this need. |
I've seen that the actual
Registers
implementation doesn't follows the line ofsark
library (human and pythonic ida usage). I still find it as ugly as the actual ida c++ interface to get registers.So I came up with this implementation, it doesn't walks the deepness of chained registers, but it wouldn't be hard to implement it.
This allows you to easily access registers, and assign values. Also you can TAB on your ipython ida instance and you will get all the possible registers to work with.
Tell me what do you think about it and if we can improve this section.
The text was updated successfully, but these errors were encountered: