From 84ec7fcffffdd10051132153747974aed77cedd6 Mon Sep 17 00:00:00 2001 From: Kudzu Date: Fri, 14 Jul 2017 12:52:55 -0400 Subject: [PATCH] more --- .../KernelPanics.cs} | 6 ++---- source/Cosmos.IL2CPU/VTablesImpl.cs | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) rename source/{Cosmos.Common/KernelPanicTypes.cs => Cosmos.IL2CPU/KernelPanics.cs} (81%) diff --git a/source/Cosmos.Common/KernelPanicTypes.cs b/source/Cosmos.IL2CPU/KernelPanics.cs similarity index 81% rename from source/Cosmos.Common/KernelPanicTypes.cs rename to source/Cosmos.IL2CPU/KernelPanics.cs index e8673c44b..9c9e772b5 100644 --- a/source/Cosmos.Common/KernelPanicTypes.cs +++ b/source/Cosmos.IL2CPU/KernelPanics.cs @@ -1,7 +1,5 @@ -namespace Cosmos.Common -{ - public static class KernelPanicTypes - { +namespace Cosmos.IL2CPU { + public static class KernelPanics { public static readonly uint VMT_MethodNotFound = 0x1; public static readonly uint VMT_MethodFoundButAddressInvalid = 0x2; public static readonly uint VMT_MethodAddressesNull = 0x3; diff --git a/source/Cosmos.IL2CPU/VTablesImpl.cs b/source/Cosmos.IL2CPU/VTablesImpl.cs index b42e0971b..602420f28 100644 --- a/source/Cosmos.IL2CPU/VTablesImpl.cs +++ b/source/Cosmos.IL2CPU/VTablesImpl.cs @@ -79,7 +79,7 @@ namespace Cosmos.IL2CPU EnableDebug = true; DebugHex("Type", aType); DebugHex("MethodId", aMethodId); - Debugger.SendKernelPanic(KernelPanicTypes.VMT_TypeIdInvalid); + Debugger.SendKernelPanic(KernelPanics.VMT_TypeIdInvalid); while (true) ; } @@ -96,7 +96,7 @@ namespace Cosmos.IL2CPU { EnableDebug = true; DebugHex("MethodIndexes is null for type", aType); - Debugger.SendKernelPanic(KernelPanicTypes.VMT_MethodIndexesNull); + Debugger.SendKernelPanic(KernelPanics.VMT_MethodIndexesNull); while (true) ; } @@ -104,7 +104,7 @@ namespace Cosmos.IL2CPU { EnableDebug = true; DebugHex("MethodAddresses is null for type", aType); - Debugger.SendKernelPanic(KernelPanicTypes.VMT_MethodAddressesNull); + Debugger.SendKernelPanic(KernelPanics.VMT_MethodAddressesNull); while (true) ; } @@ -122,7 +122,7 @@ namespace Cosmos.IL2CPU DebugHex("MethodCount", (uint)xCurrentTypeInfo.MethodCount); DebugHex("MethodAddresses.Length", (uint)xCurrentTypeInfo.MethodAddresses.Length); Debug("Method found, but address is invalid!"); - Debugger.SendKernelPanic(KernelPanicTypes.VMT_MethodFoundButAddressInvalid); + Debugger.SendKernelPanic(KernelPanics.VMT_MethodFoundButAddressInvalid); while (true) ; } @@ -143,7 +143,7 @@ namespace Cosmos.IL2CPU DebugHex("Type", aType); DebugHex("MethodId", aMethodId); Debug("Not FOUND!"); - Debugger.SendKernelPanic(KernelPanicTypes.VMT_MethodNotFound); + Debugger.SendKernelPanic(KernelPanics.VMT_MethodNotFound); while (true) ; throw new Exception("Cannot find virtual method!");