20 #include "pedigree/kernel/debugger/DebuggerIO.h" 21 #include "pedigree/kernel/debugger/DebuggerCommand.h" 22 #include "pedigree/kernel/utilities/utility.h" 30 writeCli(
"(db) ", DebuggerIO::LightGrey, DebuggerIO::Black);
43 if (ch ==
'\n' || ch ==
'\r')
47 writeCli(
"\n", DebuggerIO::White, DebuggerIO::Black);
60 writeCli(ch, DebuggerIO::White, DebuggerIO::Black);
69 const char *pACString = pAutoComplete->
getString();
74 for (i = StringLength(
m_pCommand); i >= 0; i--)
80 size_t nBackspaces = StringLength(
m_pCommand) - i;
81 for (
size_t j = 0; j < nBackspaces - 1; j++)
83 '\x08' , DebuggerIO::White,
86 writeCli(pACString, DebuggerIO::White, DebuggerIO::Black);
90 &
m_pCommand[i + 1], pACString, StringLength(pACString) + 1);
97 if (len < COMMAND_MAX - 1)
103 writeCli(ch, DebuggerIO::White, DebuggerIO::Black);
120 bool bRefreshWasEnabled =
false;
123 bRefreshWasEnabled =
true;
129 writeCli(*str++, foreColour, backColour);
133 if (bRefreshWasEnabled)
144 putChar(c, foreColour, backColour);
virtual void writeCli(const char *str, Colour foreColour, Colour backColour)
virtual bool readCli(HugeStaticString &str, DebuggerCommand *pAutoComplete)
char m_pCommand[COMMAND_MAX]
virtual void moveCursor()=0
virtual const NormalStaticString getString()=0