mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-11 05:24:44 -04:00
Utility to debug stack alignment
This commit is contained in:
parent
ca12fcedbc
commit
41d57afc96
@ -6,6 +6,7 @@
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
#include "kernel_utils.hpp"
|
#include "kernel_utils.hpp"
|
||||||
|
#include "console.hpp"
|
||||||
|
|
||||||
uint8_t in_byte(uint16_t _port){
|
uint8_t in_byte(uint16_t _port){
|
||||||
uint8_t rv;
|
uint8_t rv;
|
||||||
@ -38,3 +39,7 @@ void out_word(uint16_t _port, uint16_t _data){
|
|||||||
: /* No outputs */
|
: /* No outputs */
|
||||||
: [port] "dN" (_port), [data] "a" (_data));
|
: [port] "dN" (_port), [data] "a" (_data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void print_stack(const char* s, size_t check){
|
||||||
|
k_printf("%s stack: %u (16B-a:%u) \n", s, check, static_cast<size_t>(check % 16));
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user