make log a bit verbose for some useful information
[lunaix-os.git] / lunaix-os / kernel / debug / trace.c
index e238526717547c59461ec3e14af0aaefc232a4ed..452b3cd1d13855a8878ff7d51b8892aab57fd1d8 100644 (file)
@@ -3,19 +3,19 @@
 #include <lunaix/spike.h>
 #include <lunaix/syslog.h>
 #include <lunaix/trace.h>
+#include <lunaix/sections.h>
 
-#include <sys/abi.h>
-#include <sys/mm/mm_defs.h>
+#include <asm/abi.h>
+#include <asm/mm_defs.h>
 #include <sys/trace.h>
 
 #include <klibc/string.h>
 
 #define NB_TRACEBACK 16
 
-LOG_MODULE("TRACE")
+LOG_MODULE("lkdbg")
 
-weak struct ksyms __lunaix_ksymtable[] = { };
-extern struct ksyms __lunaix_ksymtable[];
+extern_autogen(ksymtable);
 
 static struct trace_context trace_ctx;
 
@@ -33,7 +33,10 @@ trace_log(const char* fmt, ...)
 void
 trace_modksyms_init(struct boot_handoff* bhctx)
 {
-    trace_ctx.ksym_table = __lunaix_ksymtable;
+    trace_ctx.ksym_table = autogen(struct ksyms, ksymtable);
+
+    INFO("symbols loaded: %d @0x%lx", 
+            trace_ctx.ksym_table->ksym_count, trace_ctx.ksym_table->syms);
 }
 
 struct ksym_entry*