Add kprintf for DEBUG(); differentiated from printf()
This commit is contained in:
@@ -59,4 +59,6 @@ struct cpu_status_t {
|
||||
uint64_t iret_ss;
|
||||
};
|
||||
|
||||
struct cpu_status_t* syscall_handler(struct cpu_status_t* regs);
|
||||
|
||||
#endif
|
||||
@@ -11,5 +11,6 @@ void kputs(const char* str);
|
||||
void term_init(void);
|
||||
int printf(const char* fmt, ...);
|
||||
void internal_putc(int c, void *_);
|
||||
int kprintf(const char* fmt, ...);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,7 +21,7 @@ enum ErrorCodes {
|
||||
#include <stdbool.h>
|
||||
|
||||
extern volatile uint64_t ticks;
|
||||
#define DEBUG(log, ...) printf("[%8u] debug: <%s>: " log "\r\n", ticks, __func__, ##__VA_ARGS__)
|
||||
#define DEBUG(log, ...) kprintf("[%8u] debug: <%s>: " log "\r\n", ticks, __func__, ##__VA_ARGS__)
|
||||
|
||||
/* #define DEBUG(log, ...) \
|
||||
printf("debug: [%s]: " log "\r\n", __FILE__, ##__VA_ARGS__); \
|
||||
@@ -38,6 +38,8 @@ void panic(struct cpu_status_t* ctx, const char* str);
|
||||
void hcf(void);
|
||||
void idle(void);
|
||||
|
||||
void pedicel_main(void* arg);
|
||||
|
||||
/* debug */
|
||||
void debug_stack_trace(unsigned int max_frames);
|
||||
const char* debug_find_symbol(uintptr_t rip, uintptr_t* offset);
|
||||
@@ -58,6 +60,7 @@ struct init_status {
|
||||
bool serial;
|
||||
bool keyboard;
|
||||
bool timer;
|
||||
bool all;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user