|
wavelength 1.0.0
|
Go to the source code of this file.
Functions | |
| void | CaptureStackFrames (unsigned int *pFrames, int nMaxFrames) |
| Record the call sites of the functions on the stack, innermost first. | |
| __attribute__ ((noinline)) unsigned int BacktraceReturnAddress() | |
| Report the address the caller returns to. | |
| void CaptureStackFrames | ( | unsigned int * | pFrames, |
| int | nMaxFrames ) |
Record the call sites of the functions on the stack, innermost first.
Each frame's size and the slot of its saved return address come from the epilogue of the function, found by scanning its instructions forward from the return address. A cache of 256 entries keyed by the return address retains each scan. The walk stops at the call of main(), at a frame whose size it cannot find, or when the array is full. A terminating zero follows the recorded sites in the first two cases.
| pFrames | Receives the address of each call instruction. |
| nMaxFrames | The size of pFrames. |
| __attribute__ | ( | (noinline) | ) |
Report the address the caller returns to.
Report the caller's stack pointer.