| 2703 | } |
| 2704 | |
| 2705 | void 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 | |
| 2724 | U32 KProcess::signal(U32 signal) { |
| 2725 | if (signal == K_SIGKILL) { |
no test coverage detected