debug messages: implement dynamic debug
Heavily inspired off linux kernel's dynamic debug: * add a /sys/kernel/debug/dynamic_debug/control file (accessible from linux side in /sys/class/mcos/mcos0/sys/kernel/debug/dynamic_debug/control) * read from file to list debug statements (currently limited to 4k in size) * write to file with '[file foo ][func bar ][line [x][-[y]]] [+-]p' to change values Side effects: * reindented all linker scripts, there is a new __verbose section * added string function strpbrk Change-Id: I36d7707274dcc3ecaf200075a31a2f0f76021059
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <kmalloc.h>
|
||||
#include <process.h>
|
||||
#include <swapfmt.h>
|
||||
#include <debug.h>
|
||||
|
||||
#define O_RDONLY 00000000
|
||||
#define O_WRONLY 00000001
|
||||
@@ -44,11 +45,8 @@
|
||||
//#define DEBUG_PRINT_PROCESS
|
||||
|
||||
#ifdef DEBUG_PRINT_PROCESS
|
||||
#define dkprintf(...) kprintf(__VA_ARGS__)
|
||||
#define ekprintf(...) kprintf(__VA_ARGS__)
|
||||
#else
|
||||
#define dkprintf(...) do { if (0) kprintf(__VA_ARGS__); } while (0)
|
||||
#define ekprintf(...) kprintf(__VA_ARGS__)
|
||||
#undef DDEBUG_DEFAULT
|
||||
#define DDEBUG_DEFAULT DDEBUG_PRINT
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user