Used by?
Cosmos.Debug contains common classes and enums that runs on both Windows and Cosmos. The Debugger uses it to receive messages from the debugstub in Cosmos, and Cosmos uses it to compile into the debug stub.
This unit should only contain constants and basic structures. No executable code should exist in this assembly.
References - The references should be absolutely minimal.....
Because of this extreme care must be take of which assemblies are linked and this assembly should not link in any other Cosmos assemblies.
Cosmos.Compiler.Debug is a bit of misnomer, it should be renamed possibly in the future (Constants? Common?). It is used by:
X# project which is compiled directly into Cosmos and executed on the target machine. Communicates debug information back and forth to Visual Studio.
I debated for a while if this was Kernel or Compiler. However the DebugStub must remain isolated in nature, which is also why we rely on polling the serial rather than IRQs. So in the end I decided since its debugging only and not part of Cosmos itself, it is more appropriate in Compiler.
This is the older Cosmos GDB client. It is still useful in deep scenarios but is now being overshadowed and replaced by the newer integerated assembly level debuggers.