Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
Operating System: ReactOS
Platform: x86 Hardware
Description
Created an attachment (id=5992)
patch: dmesg command for kdbg, files ntoskrnl/kdbg/cli.
This is a patch that adds new command dmesg to kdbg.
I used its older (for me name) kmsg.
In fact this is *nix analog to 'dmesg|less' (dmesg|more, to be more exact)
It allows to view already shown, logged messages, but without serial cable and second terminal, showing them, instead, on screen. /DEBUGPORT=SCREEN key is required for dmesg to work. It works only in debug versions.
Navigation keys are: Home, End, PageUp, ArrowUp, and all other keys are PageDown.
q is quit.
***
How it works: on initialization time it is allocated DmesgBuffer, where all messages go, beside of that they are printing onto the screen. Wrinting operation is protected by its own spinlock. DmesgBuffer is used as circular buffer, so it will never exceed bounds of it, but, when running long periods of time it could get overwritten. Especially in case of printing huge count of debugging messages.
When dmesg command is printed in kdbg shell, dmesg command handling procedure prints messages from the DmesgBuffer, if buffer writing place was "revoled" at lease once, then it prints second half of the buffer and next, the first one.
Also there is special function to count start position of PageUp, given the current position.
***
kmsg is alias for dmesg, as more short and handy (tab+k+kmsg<enter>).