Files
42_KFS/headers/debug.h
2025-11-05 16:19:21 +01:00

24 lines
526 B
C

#pragma once
#include "kpanic.h"
#include "kprintf.h"
#include <stdint.h>
#define PRINT_PTR(X) kprintf("%s:%u %s: %p\n", __FILE__, __LINE__, #X, X)
#define PRINT_STR(X) kprintf("%s:%u %s: %s\n", __FILE__, __LINE__, #X, X)
#define PRINT_UINT(X) kprintf("%s:%u %s: %u\n", __FILE__, __LINE__, #X, X)
#define PRINT_INT(X) kprintf("%s:%u %s: %d\n", __FILE__, __LINE__, #X, X)
struct function_entry {
uint32_t addr;
char name[64];
};
struct stackframe {
struct stackframe *ebp;
uint32_t eip;
};
void print_stack(void);