git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: kprintf now goes into dedicated pseudo-dev rather than flooding the framebuffer
[lunaix-os.git]
/
lunaix-os
/
kernel
/
debug
/
trace.c
diff --git
a/lunaix-os/kernel/debug/trace.c
b/lunaix-os/kernel/debug/trace.c
index 3d712c04db4d97531d5af52064500709e90b71cd..62ceb0ef723409d46c56c62ae88a5d65e761f48e 100644
(file)
--- a/
lunaix-os/kernel/debug/trace.c
+++ b/
lunaix-os/kernel/debug/trace.c
@@
-113,11
+113,11
@@
trace_printstack_of(ptr_t fp)
int n = trace_walkback(tbs, fp, NB_TRACEBACK, &fp);
if (fp) {
int n = trace_walkback(tbs, fp, NB_TRACEBACK, &fp);
if (fp) {
- kprintf(KDEBUG "...<truncated>
\n
");
+ kprintf(KDEBUG "...<truncated>");
}
for (int i = 0; i < n; i++) {
}
for (int i = 0; i < n; i++) {
- kprintf(KDEBUG "%p: %s
\n
", tbs[i].pc, tbs[i].symbol);
+ kprintf(KDEBUG "%p: %s", tbs[i].pc, tbs[i].symbol);
}
}
}
}
@@
-133,11
+133,11
@@
trace_printswctx(const isr_param* p, char* direction)
struct ksym_entry* sym = trace_sym_lookup(p->execp->eip);
struct ksym_entry* sym = trace_sym_lookup(p->execp->eip);
- kprintf(KDEBUG ">> (sw:%s) iv:%d, errno:%p <<
\n
",
+ kprintf(KDEBUG ">> (sw:%s) iv:%d, errno:%p <<",
direction,
p->execp->vector,
p->execp->err_code);
direction,
p->execp->vector,
p->execp->err_code);
- kprintf(KDEBUG "%p:%s
\n
", p->execp->eip, ksym_getstr(sym));
+ kprintf(KDEBUG "%p:%s", p->execp->eip, ksym_getstr(sym));
}
void
}
void
@@
-145,9
+145,8
@@
trace_printstack_isr(const isr_param* isrm)
{
isr_param* p = isrm;
ptr_t fp = cpu_get_fp();
{
isr_param* p = isrm;
ptr_t fp = cpu_get_fp();
- int prev_fromusr =
uspace_context(p)
;
+ int prev_fromusr =
0
;
- kprintf(KDEBUG "\n");
kprintf(KDEBUG "stack trace (pid=%d)\n", __current->pid);
trace_printstack_of(fp);
kprintf(KDEBUG "stack trace (pid=%d)\n", __current->pid);
trace_printstack_of(fp);
@@
-170,5
+169,4
@@
trace_printstack_isr(const isr_param* isrm)
p = p->execp->saved_prev_ctx;
}
p = p->execp->saved_prev_ctx;
}
- kprintf(KDEBUG "\n");
}
\ No newline at end of file
}
\ No newline at end of file