This is what i am trying to achieve ::
I got eflags value into a context structure "ctx" using GetThreadContext Microsoft API
Now my intention is to set the eflags value in this structure to current thread
This is how i am doing
/*I got to know that we cannot directly modify eflags register,so....
1. I am getting the value in ctx structure to Eax register
2. Pushing the value in Eax register to stack
3. Poping the recently pushed value into eflags register */
mov eax, dword ptr [ctx+0x044]; // as eflags is 32-bit I am using eax instead of rax
when i try to compile this, i am seeing below compile error
C:\1\stacktracing.c(81): (col. 5) error #13252: Unsupported instruction form in asm instruction push.
C:\1\stacktracing.c(82): (col. 5) error #13250: Opcode POPFD unsupported by architecture in asm instruction popfd.
1. Can't we push 32-bit eax to a stack in 64-bit machine ....if yes, any alternative?
2. Can't we use popfd in 64-bit machine ?
Thanks & Regards