Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix debug mLastKnownAddress path #214

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions source/Cosmos.Core.DebugStub/AsmBreak.asm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Call DebugStub_ClearAsmBreak
Call DebugStub_Break

DebugStub_DoAsmBreak_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_DoAsmBreak_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_DoAsmBreak_Exit
Ret


Expand All @@ -27,7 +27,7 @@ mov byte AL, 0xCC
mov byte [EDI], AL

DebugStub_SetAsmBreak_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SetAsmBreak_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SetAsmBreak_Exit
Ret


Expand All @@ -40,7 +40,7 @@ mov byte [EDI], AL
mov dword [DebugStub_AsmBreakEIP], 0x0

DebugStub_ClearAsmBreak_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ClearAsmBreak_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ClearAsmBreak_Exit
Ret


Expand All @@ -56,7 +56,7 @@ pop dword EAX
pop dword EBP

DebugStub_SetINT1_TrapFLAG_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SetINT1_TrapFLAG_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SetINT1_TrapFLAG_Exit
Ret


Expand All @@ -72,6 +72,6 @@ pop dword EAX
pop dword EBP

DebugStub_ResetINT1_TrapFLAG_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ResetINT1_TrapFLAG_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ResetINT1_TrapFLAG_Exit
Ret

6 changes: 3 additions & 3 deletions source/Cosmos.Core.DebugStub/CmdMisc.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ mov byte AL, 0xD
Call DebugStub_ComWriteAL

DebugStub_Ping_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_Ping_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_Ping_Exit
Ret


DebugStub_TraceOn:
mov dword [DebugStub_TraceMode], 0x1

DebugStub_TraceOn_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_TraceOn_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_TraceOn_Exit
Ret


DebugStub_TraceOff:
mov dword [DebugStub_TraceMode], 0x0

DebugStub_TraceOff_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_TraceOff_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_TraceOff_Exit
Ret

6 changes: 3 additions & 3 deletions source/Cosmos.Core.DebugStub/CmdProcess.asm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ DebugStub_ProcessCommand_Block12_End:

DebugStub_ProcessCommand_Exit:
pop dword EAX
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ProcessCommand_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ProcessCommand_Exit
Ret


Expand All @@ -109,7 +109,7 @@ mov dword EAX, [DebugStub_CommandID]
Call DebugStub_ComWriteAL

DebugStub_AckCommand_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_AckCommand_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_AckCommand_Exit
Ret


Expand All @@ -122,6 +122,6 @@ JNE near DebugStub_ProcessCommandBatch_Begin
Call DebugStub_AckCommand

DebugStub_ProcessCommandBatch_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ProcessCommandBatch_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ProcessCommandBatch_Exit
Ret

40 changes: 20 additions & 20 deletions source/Cosmos.Core.DebugStub/CmdSend.asm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Call DebugStub_ComWrite32

DebugStub_SendRegisters_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendRegisters_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendRegisters_Exit
Ret


Expand All @@ -30,7 +30,7 @@
Call DebugStub_ComWriteX

DebugStub_SendFrame_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendFrame_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendFrame_Exit
Ret


Expand All @@ -57,7 +57,7 @@
DebugStub_SendCommandOnChannel_Block1_End:

DebugStub_SendCommandOnChannel_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendCommandOnChannel_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendCommandOnChannel_Exit
Ret


Expand All @@ -79,7 +79,7 @@
DebugStub_SendStack_Block1_End:

DebugStub_SendStack_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendStack_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendStack_Exit
Ret


Expand All @@ -104,7 +104,7 @@

DebugStub_SendMethodContext_Exit:
Popad
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendMethodContext_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendMethodContext_Exit
Ret


Expand All @@ -128,7 +128,7 @@

DebugStub_SendMemory_Exit:
Popad
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendMemory_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendMemory_Exit
Ret


Expand All @@ -144,7 +144,7 @@
Call DebugStub_ComWrite32

DebugStub_SendTrace_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendTrace_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendTrace_Exit
Ret


Expand Down Expand Up @@ -173,7 +173,7 @@
pop dword EBP

DebugStub_SendText_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendText_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendText_Exit
Ret


Expand All @@ -189,7 +189,7 @@
pop dword EBP

DebugStub_SendSimpleNumber_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendSimpleNumber_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendSimpleNumber_Exit
Ret


Expand All @@ -206,7 +206,7 @@
pop dword EBP

DebugStub_SendKernelPanic_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendKernelPanic_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendKernelPanic_Exit
Ret


Expand All @@ -224,7 +224,7 @@
pop dword EBP

DebugStub_SendSimpleLongNumber_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendSimpleLongNumber_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendSimpleLongNumber_Exit
Ret


Expand All @@ -240,7 +240,7 @@
pop dword EBP

DebugStub_SendComplexNumber_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendComplexNumber_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendComplexNumber_Exit
Ret


Expand All @@ -258,7 +258,7 @@
pop dword EBP

DebugStub_SendComplexLongNumber_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendComplexLongNumber_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendComplexLongNumber_Exit
Ret


Expand All @@ -269,7 +269,7 @@
Call DebugStub_ComWrite32

DebugStub_SendPtr_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendPtr_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendPtr_Exit
Ret


Expand All @@ -280,7 +280,7 @@
Call DebugStub_ComWrite32

DebugStub_SendStackCorruptionOccurred_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendStackCorruptionOccurred_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendStackCorruptionOccurred_Exit
Ret


Expand All @@ -291,7 +291,7 @@
Call DebugStub_ComWrite32

DebugStub_SendStackOverflowOccurred_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendStackOverflowOccurred_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendStackOverflowOccurred_Exit
Ret


Expand All @@ -303,7 +303,7 @@
Call DebugStub_ComWriteEAX

DebugStub_SendInterruptOccurred_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendInterruptOccurred_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendInterruptOccurred_Exit
Ret


Expand All @@ -314,7 +314,7 @@
Call DebugStub_ComWrite32

DebugStub_SendNullReferenceOccurred_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendNullReferenceOccurred_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendNullReferenceOccurred_Exit
Ret


Expand All @@ -336,7 +336,7 @@
Jmp DebugStub_SendMessageBox_WriteChar

DebugStub_SendMessageBox_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendMessageBox_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendMessageBox_Exit
Ret


Expand Down Expand Up @@ -380,7 +380,7 @@
DebugStub_SendCoreDump_Block2_End:

DebugStub_SendCoreDump_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendCoreDump_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SendCoreDump_Exit
Ret


10 changes: 5 additions & 5 deletions source/Cosmos.Core.DebugStub/DebugStub.asm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ DebugStub_BreakOnAddress_Continue:

DebugStub_BreakOnAddress_Exit:
Popad
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_BreakOnAddress_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_BreakOnAddress_Exit
Ret


Expand All @@ -79,7 +79,7 @@ mov byte [EDI], AL

DebugStub_SetINT3_Exit:
Popad
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SetINT3_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_SetINT3_Exit
Ret


Expand All @@ -92,7 +92,7 @@ mov byte [EDI], AL

DebugStub_ClearINT3_Exit:
Popad
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ClearINT3_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ClearINT3_Exit
Ret


Expand Down Expand Up @@ -178,7 +178,7 @@ Jmp DebugStub_Executing_CheckForCmd
DebugStub_Executing_Block11_End:

DebugStub_Executing_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_Executing_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_Executing_Exit
Ret


Expand Down Expand Up @@ -235,6 +235,6 @@ Call DebugStub_AckCommand
mov dword [DebugStub_DebugStatus], DebugStub_Const_Status_Run

DebugStub_Break_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_Break_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_Break_Exit
Ret

4 changes: 2 additions & 2 deletions source/Cosmos.Core.DebugStub/Screen.asm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
DebugStub_Cls_Block1_End:

DebugStub_Cls_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_Cls_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_Cls_Exit
Ret


Expand All @@ -42,7 +42,7 @@
DebugStub_DisplayWaitMsg_Block1_End:

DebugStub_DisplayWaitMsg_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_DisplayWaitMsg_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_DisplayWaitMsg_Exit
Ret

%endif
Expand Down
6 changes: 3 additions & 3 deletions source/Cosmos.Core.DebugStub/Serial.asm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mov byte AL, 0x3
Call DebugStub_WriteRegister

DebugStub_InitSerial_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_InitSerial_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_InitSerial_Exit
Ret


Expand All @@ -42,7 +42,7 @@ mov word DX, 0x0
Call DebugStub_ReadRegister

DebugStub_ComReadAL_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ComReadAL_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ComReadAL_Exit
Ret


Expand All @@ -59,7 +59,7 @@ Call DebugStub_WriteRegister
inc dword ESI

DebugStub_ComWrite8_Exit:
mov dword [static_field__Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ComWrite8_Exit
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ComWrite8_Exit
Ret

%endif
Loading