Aptivi - Deprecated Manuals
ProjectsWebsiteBlog
Nitrocid KS v0.1.0 Beta 2 - Manual
Nitrocid KS v0.1.0 Beta 2 - Manual
  • 👋Welcome!
  • Versions and Compatibility
    • 🔱Supported Versions
    • 🕘EOL Versions
    • 🗞️Version Release Notes
      • ✨v0.0.1.x series
      • 🌈v0.0.2.x series
      • 👥v0.0.3.x series
      • 🛠️v0.0.4.x series
      • 🕔v0.0.5.x series
        • ⌚v0.0.5.0 Beta Versions
      • 📕v0.0.6.x series
        • 📄v0.0.6.0 Beta Versions
      • 🔌v0.0.7.x series
        • ⚡v0.0.7.0 Beta Versions
      • 🌌v0.0.8.x series
      • 💌v0.0.9.x series
      • 📜v0.0.10.x series
      • ✏️v0.0.11.x series
      • ⚙️v0.0.12.x series
      • 🌐v0.0.13.x series
      • 🏃♀ v0.0.14.x series
      • ⏳v0.0.15.x series
      • ⭐v0.0.16.x series
      • 🌃v0.0.17.x series
      • 🥁v0.0.18.x series
      • 🔧v0.0.19.x series
      • 🍀v0.0.20.x series
      • 🧰v0.0.21.x series
      • 📱v0.0.22.x series
      • 🖥️v0.0.23.x series
      • 👾v0.0.24.x series
      • 🔮v0.1.x.x series
        • ⚠️Known issues for 0.1.0 Beta
    • 👍Compatibility Notes for KS API Revisions
      • 🔼Upgrading from API v1.0
      • 🔼Upgrading from API v1.1
      • 🔼Upgrading from API v1.2
      • 🔼Upgrading from API v1.3
      • 🔼Upgrading from API v2.0
      • 🔼Upgrading from API v2.1
      • 🔼Upgrading to API v3.0
  • Installation and Maintenance
    • 📀Installing the Kernel
      • 💻Windows
      • 🐧Linux
      • 📱Android
    • ⏫Upgrading the Kernel
      • 💻Windows
      • 🐧Linux
      • 📱Android
  • Fundamentals
    • 🌽What is the Kernel?
    • 👾What is Nitrocid KS?
    • 🌟Simulated Kernel Features
      • 👤Accounts
        • 🔓Permissions
      • 🐚Shells
      • 🌍Networking
        • 🗃️FTP Client
        • 🔒SFTP Client
        • 📰RSS Client
        • 🌐HTTP Client
        • 📧Mail Client
      • ✏️Editors
        • 📝Text Editor
        • 🖊️JSON Editor
        • 💾Hex Editor
      • 🇺🇸 Languages
      • 🌌Screensavers
      • 🎮Games and Amusements
        • 🔤Hangman
        • ☄️Meteor
        • 🐍Snaker
        • 🔢Solver
        • ⌨️SpeedPress
        • 🔠Wordle
      • 🗓️Calendar
      • ⏰Stopwatch and Timer
      • ⚖️Calculator and Converter
  • Advanced and Power Users
    • ⚒️Building the Kernel
      • 🪟Building on Windows
      • 🐧Building on Linux
    • 🧰Kernel Modifications
      • 🔧Kernel Modification Management
      • 🏗️Build your...
        • 🧪Your Mod
        • 🌌Your Screensaver
        • 🪄Your Splash
    • 🦠Diagnostics
      • 🔬Debugging
        • 🧬Local Debugging
        • 🛰️Remote Debugging
      • 🧪Testing
      • 💉Other Diagnostics
    • ⚒️Inner Workings
      • 🔧Kernel Settings
        • ⛏️Mechanics of Settings App
        • 🔩Settings Format
      • 🐚Shell Structure
        • ❔Help System
        • 🗜️Command Parsing
        • 📜Shell Scripting
      • 🪧Kernel Placeholders
      • 🔐The Permissions
      • 📞Kernel Threads
      • 🔌Kernel Drivers
      • ⚙️Multilingual Kernel Flow
      • 🌐Custom Languages
      • 📽️Presentation System
      • 🎛️Kernel Arguments
      • 📡Remote Procedure
    • 💿GRILO Bootloader and KS
  • 🧱Project Dependencies
  • Report an issue
  • Source code
  • API Reference
Powered by GitBook
On this page
  • Stack Frames
  • Kernel dump files
  • Kernel Exceptions
Edit on GitHub
  1. Advanced and Power Users
  2. Diagnostics

Other Diagnostics

Diagnosing the kernel the other way!

Last updated 1 year ago

There are various diagnostic tools that the kernel can make use of, including those listed below.

Stack Frames

This is internally used by the kernel debugger and the kernel exception to allow getting information about the source code that generated the call. Currently, this information is provided:

  • Method name: The routine name that made a call to the class constructor

  • Line number: The line number of the method described above

  • Column number: The column number found within the line

  • File name: The file name of the class that the method situates

When the constructor is called, it generates information about the third stack frame to get the caller's method info. If the frame number is specified, it gets offset by +1 to get info about the needed method.

This method is internally called by the debug writer. If you really want to create an instance of this class, you'll have to use Reflection. The class name is DebugStackFrame in the KS.Kernel.Debugging.Trace namespace.

Kernel dump files

In the event that the kernel reported a kernel panic in all of the types, whether continuable or uncontinuable, the kernel dump file will be generated under the name of dmp_date_time.txt in the kernel configuration directory. These files assist us in debugging the severe kernel crashes in case the bug involves this event.

The kernel error codes are listed below from the least severe to the most severe:

  • C: Indicates that the kernel error is minor, but still serious

  • S: Serious kernel error

  • F: Fatal kernel error

  • U: Unrecoverable kernel error

The first-chance kernel errors of the above types are the first failures. During the error handling, if it encountered a second failure, it escalates the severity of the error to the double panic. Finally, if the double panic handler experiences a third fault, the host operating system will force the kernel to exit.

In case of the third failure events, you can find the event in the Application Events within the Event Viewer if running on Windows or the error directly dumped to the application on Linux.

Kernel Exceptions

The kernel exceptions are just normal errors with a generic message intended to display extended information about the error the kernel is experiencing. The kernel exception types and their messages are typically found in this file:

To make a kernel exception, throw a new instance of KernelException found in the KS.Kernel.Exceptions namespace in one of the forms:

public KernelException(KernelExceptionType exceptionType)
public KernelException(KernelExceptionType exceptionType, Exception e)
public KernelException(KernelExceptionType exceptionType, string message)
public KernelException(KernelExceptionType exceptionType, string message, params object[] vars)
public KernelException(KernelExceptionType exceptionType, string message, Exception e)
public KernelException(KernelExceptionType exceptionType, string message, Exception e, params object[] vars)

Typically, the message displays the exception type, the message, and the exception information. As always, if you believe that it's a bug, make an issue in our GitHub repository.

🦠
💉
https://github.com/Aptivi/Kernel-Simulator/blob/master/public/Kernel%20Simulator/Kernel/Exceptions/KernelExceptionMessages.cs