diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-12-07 15:49:05 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-12-07 15:50:28 +0100 |
| commit | 16872513febbbdee48e493eb92d95fc39ec80484 (patch) | |
| tree | 4e07ec369fe4e6a3ffb20bf34f0c56204158c43d /dev | |
| parent | a87e0bd1954f5212ca7853769ee5922de4c1223b (diff) | |
FIX: Better RIP gathering, focusing on #8 now.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/ZKAKit/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc | 4 | ||||
| -rw-r--r-- | dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm | 1 | ||||
| -rw-r--r-- | dev/ZKAKit/src/UserProcessScheduler.cc | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/dev/ZKAKit/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc b/dev/ZKAKit/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc index 80da073d..e40ef071 100644 --- a/dev/ZKAKit/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc +++ b/dev/ZKAKit/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc @@ -122,7 +122,7 @@ EXTERN_C Kernel::Void idt_handle_breakpoint(Kernel::UIntPtr rip) { auto process = Kernel::UserProcessScheduler::The().GetCurrentProcess(); - kcout << "Kernel: Process RIP: " << Kernel::number(rip) << endl; + kcout << "Kernel: Process RIP: " << Kernel::hex_number(rip) << endl; kcout << "Kernel: Process Name: " << process.Leak().Name << endl; kcout << "Kernel: SIGTRAP set.\r"; @@ -134,8 +134,6 @@ EXTERN_C Kernel::Void idt_handle_breakpoint(Kernel::UIntPtr rip) kcout << "Kernel: PRCFROZE status set..\r"; process.Leak().Status = Kernel::ProcessStatusKind::kFrozen; - - Kernel::ke_stop(RUNTIME_CHECK_UNEXCPECTED); } /// @brief Handle #UD fault. diff --git a/dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm b/dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm index d136ec93..66dd34f0 100644 --- a/dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm +++ b/dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm @@ -78,6 +78,7 @@ __ZKA_INT_3: mov rax, idt_handle_breakpoint lea rcx, [rel __ZKA_INT_3_GET_RIP] + sub rcx, 16 mov [rcx], rcx call rax diff --git a/dev/ZKAKit/src/UserProcessScheduler.cc b/dev/ZKAKit/src/UserProcessScheduler.cc index 679eab39..b2d27259 100644 --- a/dev/ZKAKit/src/UserProcessScheduler.cc +++ b/dev/ZKAKit/src/UserProcessScheduler.cc @@ -334,7 +334,7 @@ namespace Kernel kcout << "Create stack reserve for: " << process->Name << endl; - auto pid = mTeam.mProcessList.Count(); + auto pid = mTeam.mProcessList.Capacity() - kSchedProcessLimitPerTeam; process->ProcessId = pid; process->Status = ProcessStatusKind::kRunning; |
