Hey,
I'm having some problems with the Target.Write( ) function not writing the data to the target until I call Elf.GetExprValue()
I have a function that does a read/write modify on a variable using Target.Read() and Target.Write(). The problem is the write doesn't take effect until after I call Elf.GetExprValue() on the variable being written to. I can also add the variable to the watched data to get the write to take effect (or just mouse over the variable in the source code).
Simplified code looks like this:
I'm having some problems with the Target.Write( ) function not writing the data to the target until I call Elf.GetExprValue()
I have a function that does a read/write modify on a variable using Target.Read() and Target.Write(). The problem is the write doesn't take effect until after I call Elf.GetExprValue() on the variable being written to. I can also add the variable to the watched data to get the write to take effect (or just mouse over the variable in the source code).
Simplified code looks like this:
C Source Code
- var_addr = Elf.GetExprValue("&some_variable")
- var_value = Target.ReadU32(var_addr)
- if( var_value == some_condition ) {
- Target.WriteU32(var_addr, new_value)
- // Target.Write() doesn't get flushed to target unless I do this for some reason?
- // Alternatively, I can mouse over some_variable or add some_variable to the watched data to get the write to take effect.
- Elf.GetExprValue("some_variable")
- }