Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-5452

dmesg command for kdbg (aka kmsg)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • NTCore
    • 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>).

      Attachments

        1. DbgAtTimeCheckpoints.a-la-patch
          3 kB
        2. freeldr.ini
          0.8 kB
        3. kernel_dmesg.patch
          20 kB
        4. kernel_dmesg-180311.patch
          21 kB
        5. kernel_dmesg-300311.patch
          23 kB

        Activity

          People

            fireball fireball
            Mna. Mna.
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: