◄ Wiki / OS
program counter (PC)
The CPU register that holds the address of the instruction currently being executed.
The program counter always points at where in the code the processor is right now. When something crashes, capturing the PC tells you exactly which instruction faulted. Recording it as a 'pc-offset into the image' means storing the position relative to the program's start, so it can be mapped back to a specific line of source code even after the program is unloaded.
See also
- relocationFixing up a program's internal addresses when it gets loaded into a different memory spot than it was built for.
- return frameThe saved snapshot of a thread's state that the CPU restores to resume it exactly where it left off.
- prologue / epilogueThe small bookkeeping code the compiler inserts at the start and end of every function to set up and tear down its workspace.
- ring bufferA fixed-size log that wraps around, overwriting the oldest entries once it fills up.
Referenced by
POST · prologue / epilogue · relocation · return frame · ring buffer · stack pointer