-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Adjust Pointer Offset / Create Relative Pointer: What does it do? #4200
Comments
Also is it possible to create a pointer relative to an address instead of a datatype? This would enable virtual inheritance modeling. |
In DTM, the painful / manual way is to create a pointer to a type (right click on type, New | Pointer to typename), find the new pointer type, right click on it, and create a typedef to that, find the new typedef and right click on it and choose "Settings", and tweak. |
Wow, that's a whole host of options in that dialog. Are there plans for a tutorial of how we can use this to improve the quality of decompilation e.g. to deal with the shifted pointers / negative offsets mentioned in #2189 and #573 ? It sounds like it would be a good addition to the GhidraDocs/GhidraClass |
It does support this use. You can simply use a default pointer typedef with the This technique is currently being used by the
Alternatively, |
Within the master branch (i.e., 10.2) Most of the pointer-typedef settings are not currently supported by the decompiler (work-in-progress). Partial support for the |
I don't think I actually asked what I meant. I want to be able to have a pointer that would be assumed to have a constant value, I have yet to play around with the new pointer settings. There may be a few ways to go about it with the offset pointers. I don't know if the decompiler eliminates things such as the addition of the image base to an imagebaseoffset 32 to just show a pointer dereference for example. (I'm not actually sure if it should do that, just an example) |
I assume this would require a new |
Maybe. There would still need to be a way to set the value for the pointer though unless the offset would have a different meaning when const. Will let things settle and see what direction things go in first before requesting any additional settings or something. |
I don't see how I'm supposed to use this at all. I have an artifact of LTO where a pointer is passed in at an offset of 16;
A method takes in a I don't see any fancy dialog like the one in the commit would imply. Trying to edit a Typedef to a Pointer to a Struct just brings up the Struct editor. |
You want to right click on the typedef and choose settings. |
Correct, this is in master/10.2-DEV |
Commit ec5b6aa introduced a "relative pointer action" to the decompiler.
Can I clarify whether supplying arguments
DataType = MyType, offset=0x10, name="MyTypeDef"
, results in a typedef that represents a pointer to offset 0x10 in theMyType
structure?Also, is there an equivalent global action to create a similar offset typedef?
The text was updated successfully, but these errors were encountered: