I have inserted the following asm code in my C++ code. I am using a VC++ compiler.
curr_stack_return_addr = s.AddrFrame.Offset; //I am doing a stack walk
mov eax, curr_stack_return_addr
mov bl, BYTE PTR [eax - 1]
I see two problems here:
push bl and
pop bl don't exist. You can only push and pop word or dwords. The compiler warns by the way.
How do you know that eax points to a legal address?