Commonly used 32-bit CPU registers and their purpose
While debugging a dump, we commonly see various CPU registers. Each register has different purpose. I am trying to put them together in one place for your easy reference.
You can list all the registers in windbg with “r” command:
Please note that a given register may be used for general purpose at any time.
EAX: Arithmetic operations, I/O port access and interrupt call
EDX: Arithmetic operations, I/O port access and interrupt call. If you have a multiplication operation which results in more than what a single register can handle, then the most significant 16 numbers are stored in EDX and least significant ones are stored in EAX
EBX: Holds return values
ECX: Used for loop counters. Also used for "this" pointer for a class
EIP: Instruction pointer. Points to the next instruction to execute.
ESP: Stack pointer. This points to the top of the stack.
EBP: Base/Frame pointer.
Author : Enamul(MSFT), SQL Developer Technical Lead