From 4bd3c4406040501ca4781bb3cf4a405b975f976c Mon Sep 17 00:00:00 2001 From: Charles Betros Date: Fri, 24 Jun 2016 23:59:51 -0500 Subject: [PATCH] Fix call stack in the core dump. --- source/Cosmos.Debug.DebugStub/CmdSend.asm | 3 +-- source/Cosmos.Debug.DebugStub/CmdSend.xs | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/source/Cosmos.Debug.DebugStub/CmdSend.asm b/source/Cosmos.Debug.DebugStub/CmdSend.asm index ffb726571..ffa581969 100644 --- a/source/Cosmos.Debug.DebugStub/CmdSend.asm +++ b/source/Cosmos.Debug.DebugStub/CmdSend.asm @@ -1,4 +1,4 @@ -; Generated at 6/24/2016 1:43:55 AM +; Generated at 6/24/2016 9:50:36 PM @@ -349,7 +349,6 @@ DebugStub_SendCoreDump_Block1_End: mov byte AL, DebugStub_Const_Ds2Vs_CoreDump Call DebugStub_ComWriteAL - mov dword EAX, 0x0 mov dword EAX, ECX Call DebugStub_ComWriteAX diff --git a/source/Cosmos.Debug.DebugStub/CmdSend.xs b/source/Cosmos.Debug.DebugStub/CmdSend.xs index 0f15a5fb8..a41a2bacf 100644 --- a/source/Cosmos.Debug.DebugStub/CmdSend.xs +++ b/source/Cosmos.Debug.DebugStub/CmdSend.xs @@ -383,25 +383,22 @@ function SendCoreDump { EAX = @.CallerESP +EAX ECX = 36 - EAX = EBP while EAX != 0 { + EBX = EAX - 4 +EAX ECX = ECX + 4 EAX = [EAX] } + // Send command AL = #Ds2Vs_CoreDump ComWriteAL() - - EAX = 0 EAX = ECX ComWriteAX() - while ECX != 0 { -EAX ComWriteEAX() ECX-- } - }