Skip to content
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

Creating __shifted pointers #35

Open
vient opened this issue Jul 15, 2019 · 1 comment
Open

Creating __shifted pointers #35

vient opened this issue Jul 15, 2019 · 1 comment
Labels

Comments

@vient
Copy link

vient commented Jul 15, 2019

This is a question rather than an issue.

Like in #33, question is about new functionality added in IDA 7.2, shifted pointers. While they resemble CONTAINING_RECORD macro which you use(?) in core/negative_offsets.py, Hex-Rays claims that shifted pointers are more powerful. I thought you might be interested in this feature.

I also want to note some quirks of shifted pointers: when you use them as seen in example and you take some other int from structure, Hex-Rays would likely show it as myptr[42], not expected ADJ(myptr)->some_other_int. I tried some tweaks to pointer type like _UNKNOWN *__shifted(mystruct,20) myptr; but failed to get consistent use of ADJ with complex structures with lots of members of different types. Maybe you will be more successful.

@igogo-x86
Copy link
Owner

igogo-x86 commented Jul 18, 2019

Actually I didn't work a lot with negative offsets, is it really that much of improvement? What the difference I see is that __shifted is the same as CONTAINING_RECORD but shorter and with offset rather than filed name. Implementing this doesn't not requires much changing in my code by the way and I could do it. But I think CONTAINING_RECORD gives more information and that information is not that useless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants