Replies: 3 comments 1 reply
-
I assume you are referring to the decompiler results. Casting will occur automatically when a varnode of one type is passed as a function parameter or assigned to a local variable of a different type. Try to force the use of the desired type by creating a local variable of the correct type (can be done by re-typeing variable assignment within decompiler via popup action). If variable assignment visible in decompiler you may need to do this from the assembly listing on a register assignment. Local variable creation can be tricky to get the desired result due to scoping of local register variables. |
Beta Was this translation helpful? Give feedback.
-
the problem is that is not assigning to a variable in the stack, instead is acceding a offset and de-referencing on the fly without saving the task_struct in the stack ( at least in the de-compiler results ) |
Beta Was this translation helpful? Give feedback.
-
Can you identfy the assembly instruction where the computaion is made and stored to a register or stack location. If assigned to a register before pushing to the stack you could try to create a register write-reference at this point which should establish a local variable in the assembly listing. A data type can then be assigned to this register variable. If the register is reused later additional local variable may be needed since the variable scope will proceed forward from the first-use location. Use of local variable within the decompiler can be hit-or-miss at times. |
Beta Was this translation helpful? Give feedback.
-
Hi i am in a situation where i need to cast a pointer to a struct ptr, the problem is that the struct pointer is related to a FS register offset then this FS register offset need to be added to some global, but after that it doesnt allow me to cast it to the struct type i desire, it automaticly cast itselfto intptr, is there any ways to perform this type of casting?
i want to cast it to a task struct
Beta Was this translation helpful? Give feedback.
All reactions