Anyone know how to log the values of a register while debugging a process in VC++?
I want to log the EIP register which will basically give me program flow from offsets.
Anyone know how to log the values of a register while debugging a process in VC++?
I want to log the EIP register which will basically give me program flow from offsets.
WebSnozz-
Cats have no butt cheeks.
If one farted, then it would make a flute noise.
Yes you could use inline assembler. THis is kind of handy too:
Code:register unsigned long *EIP asm("EIP"); ... printf("%ld", *EIP);
Since I wasn't familiar with the EIP registers I tried some code...I couldn't get anything to work. Here is a working example though:
If someone knows about the EIP thing they can help you but this should give you a step in the right direction. By the way your debugger most likely allows you to dump registers. Try that too.Code://note: use all lowercase in the asm register unsigned long *EAX asm("eax"); ... printf("%ld\n", *EAX);
Thanks, I cam do a
mov EAX, EIP
just before I output. Only thing is I think this will only show me values of EIP in my process. There's something special that VC++ and other debuggers do to attach to another process.
WebSnozz-
Cats have no butt cheeks.
If one farted, then it would make a flute noise.