stack: add comments

Esse commit está contido em:
Mathieu Maret 2019-01-09 16:20:06 +01:00
commit df1fa005b3
1 arquivos alterados com 3 adições e 0 exclusões

Ver arquivo

@ -12,6 +12,9 @@ void printStackTrace(unsigned int maxFrames)
// first function argument (maxFrames)
// return address from caller
// EBP (Extended Base Pointer) of calling function
//
// retrace function from address could done by optaining function address with gdb or
// objdump -S kernel
unsigned int *ebp = __builtin_frame_address(0);
for (unsigned int frame = 0; frame < maxFrames; frame++) {
unsigned int eip = ebp[1];