Utility to debug stack alignment

This commit is contained in:
Baptiste Wicht 2014-03-09 13:57:46 +01:00
parent ca12fcedbc
commit 41d57afc96

View File

@ -6,6 +6,7 @@
//=======================================================================
#include "kernel_utils.hpp"
#include "console.hpp"
uint8_t in_byte(uint16_t _port){
uint8_t rv;
@ -38,3 +39,7 @@ void out_word(uint16_t _port, uint16_t _data){
: /* No outputs */
: [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));
}