-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stack addresses + minor correction
- Fix stack top/bottom addresses in print_stack function. - Make use of the BUFSIZE define as the read limit. - Take a void* as hexdump base parameter. Signed-off-by: mrxx0 <[email protected]>
- Loading branch information
Showing
4 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,14 @@ | |
* Helper function to print the kernel stack | ||
* | ||
* created: 2022/11/19 - lfalkau <[email protected]> | ||
* updated: 2022/11/19 - lfalkau <lfalkau@student.42.fr> | ||
* updated: 2022/11/21 - mrxx0 <chcoutur@student.42.fr> | ||
*/ | ||
|
||
#include <kernel/memory.h> | ||
|
||
extern uint32_t *stack_bottom; | ||
extern void *stack_bottom; | ||
extern void *stack_top; | ||
|
||
void print_stack() { | ||
uint32_t stack_size = 16384; | ||
hexdump(stack_bottom, stack_size); | ||
hexdump(&stack_bottom, (void *)&stack_top - (void *)&stack_bottom); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters