MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / printStack

Method printStack

source/kernel/kprocess.cpp:2705–2722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2703}
2704
2705void KProcess::printStack() {
2706 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(threadsMutex);
2707 for (auto& t : this->threads) {
2708 KThread* thread = t.value;
2709 CPU* cpu=thread->cpu;
2710
2711 if (thread->waitingCond) {
2712 klog_fmt(" thread %X WAITING %s", thread->id, thread->waitingCond->name.c_str());
2713 } else {
2714 klog_fmt(" thread %X RUNNING", thread->id);
2715 BString name = this->getModuleName(cpu->seg[CS].address+cpu->eip.u32);
2716
2717 klog_fmt(" 0x%08d %s", this->getModuleEip(cpu->seg[CS].address+cpu->eip.u32), name.length()?name.c_str():"Unknown");
2718 }
2719 ChangeThread c(thread);
2720 cpu->walkStack(cpu->eip.u32, EBP, 6);
2721 }
2722}
2723
2724U32 KProcess::signal(U32 signal) {
2725 if (signal == K_SIGKILL) {

Callers 1

printStacksMethod · 0.80

Calls 6

getModuleNameMethod · 0.95
getModuleEipMethod · 0.95
klog_fmtFunction · 0.85
walkStackMethod · 0.80
c_strMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected