summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-02-28 20:50:56 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-02-28 20:50:56 +0100
commit31381f9ea3500e192cff2f2e0de64695a86e4099 (patch)
treef37157f7e501751cfe01dab493202ce1af0dc12b
parent4f64b15eeace525e630d6e88f4d1a90d92d68006 (diff)
DBG: Debug port patches and improvements.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
-rw-r--r--dev/Kernel/HALKit/AMD64/HalDebugPort.cc6
-rw-r--r--dev/Kernel/KernelKit/DebugOutput.h6
-rw-r--r--dev/Kernel/NewKit/Defines.h8
3 files changed, 16 insertions, 4 deletions
diff --git a/dev/Kernel/HALKit/AMD64/HalDebugPort.cc b/dev/Kernel/HALKit/AMD64/HalDebugPort.cc
index f88b1a70..7eada646 100644
--- a/dev/Kernel/HALKit/AMD64/HalDebugPort.cc
+++ b/dev/Kernel/HALKit/AMD64/HalDebugPort.cc
@@ -33,8 +33,10 @@ namespace NeOS
HAL::rt_out16(theHook->fPort[i], kDebugMag3);
HAL::rt_wait_400ns();
- if (HAL::rt_in16(theHook->fPort[i] != kDebugUnboundPort))
- ++theHook->fBoundCnt;
+ if (HAL::rt_in16(theHook->fPort[i]) != kDebugUnboundPort)
+ ++theHook->fPortCnt;
+
+ HAL::rt_wait_400ns();
}
}
} // namespace NeOS
diff --git a/dev/Kernel/KernelKit/DebugOutput.h b/dev/Kernel/KernelKit/DebugOutput.h
index 84a2d514..ebbda7ef 100644
--- a/dev/Kernel/KernelKit/DebugOutput.h
+++ b/dev/Kernel/KernelKit/DebugOutput.h
@@ -186,13 +186,15 @@ namespace NeOS
return self;
}
- typedef Char rt_debug_type[255];
+ constexpr SizeT kDebugTypeLen = 255;
+
+ typedef Char rt_debug_type[kDebugTypeLen];
class DebuggerPortHeader final
{
public:
Int16 fPort[kDebugMaxPorts];
- Int16 fBoundCnt;
+ Int16 fPortCnt;
};
inline TerminalDevice& operator<<(TerminalDevice& src, auto number)
diff --git a/dev/Kernel/NewKit/Defines.h b/dev/Kernel/NewKit/Defines.h
index 932e9e8f..0b0b97e5 100644
--- a/dev/Kernel/NewKit/Defines.h
+++ b/dev/Kernel/NewKit/Defines.h
@@ -11,6 +11,14 @@
#define NEWKIT_VERSION_STR "1.1.0"
#define NEWKIT_VERSION_BCD 0x01100
+#ifndef __cplusplus
+#error NeOS compiles with a C++ compiler.
+#endif
+
+#if __cplusplus <= 201703L
+#define char8_t char
+#endif
+
#ifdef __has_feature
#if !__has_feature(cxx_nullptr)
#if !__has_nullptr