1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00
serenity/Kernel/Console.h
Andreas Kling c928b06218 Add a very hackish /proc/PID/stack.
It walks the stack and identifies anything that looks like a kernel symbol.
This could be a lot more sophisticated.
2018-10-26 22:33:15 +02:00

29 lines
667 B
C++

#pragma once
#include <AK/Compiler.h>
#include <VirtualFileSystem/CharacterDevice.h>
class Console final : public CharacterDevice {
public:
static Console& the() PURE;
Console();
virtual ~Console() override;
virtual bool hasDataAvailableForRead() const override;
virtual ssize_t read(byte* buffer, size_t size) override;
virtual ssize_t write(const byte* data, size_t size) override;
void putChar(char);
private:
const byte m_rows { 25 };
const byte m_columns { 80 };
byte m_cursorRow { 0 };
byte m_cursorColumn { 0 };
byte m_currentAttribute { 0x07 };
const byte* s_vgaMemory { (const byte*)0xb8000 };
};