You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One idea that may not be hard to implement since what HexraysPyTools does is already more complicated would be to add support for recasting/renaming simple assignments:
So the idea is if we have, with PVOID v1, and struct1 { int arg1};:
v1 = (PVOID)struct1->arg1;
When we click on v1 and hit SHIFT+L it would change the type of v1 to int:
v1 = struct1->arg1;
Then we hit SHIFT+N and it would rename v1 to arg1:
arg1 = struct1->arg1;
We just need to support appending an underscore to the name until the rename succeeds as the name may already exist, so it could generate something like:
arg1___ = struct1->arg1;
We could also imagine supporting the other direction (i.e. renaming the right part based on the left part but I think the initial idea is more useful.
What do you think?
The text was updated successfully, but these errors were encountered:
Re-reading the linked part, it is actually already supported for simple assignments, but not for structure members
saidelike
changed the title
Idea: adding recasting/renaming for assignments
Idea: adding recasting/renaming for assignments with structure members
Jun 18, 2020
result = Func1(
whatever,
struct2->InputBuffer,
struct2->OutputBuffer,
struct2->OutputBufferLength,
&struct2->total_size);
and the prototype of Func1:
int __stdcall Func1(WHATEVER*whatever, _BYTE *a2, void *a3, unsigned int a4, _DWORD *a5)
It would be nice if we could name a2 = InputBuffer, a3 = OutputBuffer, a4 = OutputBufferLength and a5 = total_size just by using the recasting/renaming shortcuts.
One idea that may not be hard to implement since what HexraysPyTools does is already more complicated would be to add support for recasting/renaming simple assignments:
So something similar to https://github.com/igogo-x86/HexRaysPyTools#recasting-shiftr-shiftl-renaming-shiftn-ctrlshiftn but for assignments
So the idea is if we have, with
PVOID v1
, andstruct1 { int arg1};
:When we click on
v1
and hitSHIFT+L
it would change the type ofv1
toint
:Then we hit
SHIFT+N
and it would renamev1
toarg1
:We just need to support appending an underscore to the name until the rename succeeds as the name may already exist, so it could generate something like:
We could also imagine supporting the other direction (i.e. renaming the right part based on the left part but I think the initial idea is more useful.
What do you think?
The text was updated successfully, but these errors were encountered: