Browse Source

stack: add comments

simpleList
Mathieu Maret 1 year ago
parent
commit
df1fa005b3
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      core/stack.c

+ 3
- 0
core/stack.c View File

@@ -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];


Loading…
Cancel
Save