History log of /reactos/ntoskrnl/include/internal/kd64.h (Results 1 – 25 of 33)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 72fd54a7 07-Dec-2023 Timo Kreuzer <timo.kreuzer@reactos.org>

[NTOS:KE/x64] Implement Kd processor switching


# 9d9536d4 22-Mar-2023 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

[NTOS:KD64] Format string of KdpDprintf can be const.


# ffb05406 23-Nov-2022 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

[NTOS:KD64] Implement KdLogDbgPrint() for the WinDbg !dbgprint command.

See this command's documentation:
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/-dbgprint
and the section

[NTOS:KD64] Implement KdLogDbgPrint() for the WinDbg !dbgprint command.

See this command's documentation:
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/-dbgprint
and the section "DbgPrint buffer and the debugger"
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/reading-and-filtering-debugging-messages#dbgprint-buffer-and-the-debugger
for more details.

- Loosely implement the function, based on our existing circular printout
buffers in kdio.c.
- Enable its usage in the KdpPrint() and KdpPrompt() functions.

Notice that this function will *only* capture the strings being sent **to**
the debugger, and not the strings the debugger itself produce. (This means
that we cannot use the KdPrintCircularBuffer as a replacement for our
KDBG dmesg one, for example...)

How to test:
Run ReactOS under WinDbg, and use the !dbgprint command to view the
buffer. You can also use the Memory Window, place yourself at the
address pointed by KdPrintCircularBuffer and KdPrintWritePointer, and
read its contents.

What you should observe:
Prior notice: The circular buffer in debug builds of ReactOS and Windows
is 0x8000 bytes large. In release builds, its size is down to 0x1000.
1- When you start e.g. the 2nd-stage GUI installation of ReactOS, going
past the initial "devices installation" and letting it stabilize on
the Welcome page, break into WinDbg and run the !dbgprint command. You
should notice that the end of its output is weirdly truncated, compared
to what has been actually emitted to the debug output. Comparing this
with the actual contents of the circular buffer (via Memory Window),
shows that the buffer contents is actually correct.
2- Copy all the text that has been output by the !dbgprint command and
paste it in an editor; count the number of all characters appearing +
newlines (only CR or LF), and observe that this number is "mysteriously"
equal to 16384 == 0x4000.
3- Continue running ReactOS installation for a little while, breaking back
back into WinDbg and looking at !dbgprint again. Its output seems to be
still stopping at the same place as before (but the actual buffer memory
contents shows otherwise). Continue running ROS installation, and break
into the debugger when ROS is about to restart. You should now observe
that the dbgprint buffer rolled over:
dd nt!KdPrintRolloverCount shows 1.
Carefully analysing the output of !dbgprint, however, you will notice
that it looks a bit garbage-y: the first part of the output is actually
truncated after 16384 characters, then you get a second part of the
buffer showing what ReactOS was printing while shutting down. Then
you get again what was shown at the top of the !dbgprint output.
(Of course, comparing with the actual contents of the circular buffer
in memory shows that its contents are fine...)

The reason of these strange observations, is because there is an intrinsic
bug in the !dbgprint command implementation (in kdexts.dll). Essentially,
it displays the contents of the circular buffer in two single dprintf()
calls: one for the "older" (bottom) part of the buffer:
[WritePointer, EndOfBuffer]
and one for the "newer" (upper) part of the buffer:
[CircularBuffer, WritePointer[ .
The first aspect of the bug (causing observation 3), is that those two
parts are not necessarily NULL-terminated strings (especially after
rollover), so for example, displaying the upper part of the buffer, will
potentially also display part of the buffer's bottom part.
The second aspect of the bug (explaining observations 1 and 2), is due
to the implementation of the dprintf() function (callback in dbgenv.dll).
There, it uses a fixed-sized buffer of size 0x4000 == 16384 characters.
Since the output of the circular buffer is not done by little chunks,
but by the two large parts, if any of those are larger than 0x4000 they
get truncated on display.
(This last observation is confirmed in a completely different context by
https://community.osr.com/discussion/112439/dprintf-s-max-string-length .)

show more ...


# 36335d9c 23-Nov-2022 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

[NTOS:KD64] Correctly initialize the KdPrint buffer data in KdDebuggerDataBlock so as to fix the WinDbg !dbgprint command.

Now, !dbgprint just shows an empty log (since we don't fill it), instead
of

[NTOS:KD64] Correctly initialize the KdPrint buffer data in KdDebuggerDataBlock so as to fix the WinDbg !dbgprint command.

Now, !dbgprint just shows an empty log (since we don't fill it), instead
of showing the following error:

kd> !dbgprint
Can't find DbgPrint buffer

show more ...


# 98e58536 18-Nov-2022 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

[NTOS:KD] Annotate KdInitSystem and remove redundant declaration in kd.h


Revision tags: 0.4.14-release
# 835c3023 22-Jun-2021 Jérôme Gardou <jerome.gardou@reactos.org>

[NTOS:KD][NTOS:KD64][NTOS:KDBG] Fix IRQL & spinlock use

KD64: Raise to HIGH_LEVEL when entering trap
KDBG: lower to DISPATCH_LEVEL when applying IRQL hack & use a worker thread to load symbols
KD&KD

[NTOS:KD][NTOS:KD64][NTOS:KDBG] Fix IRQL & spinlock use

KD64: Raise to HIGH_LEVEL when entering trap
KDBG: lower to DISPATCH_LEVEL when applying IRQL hack & use a worker thread to load symbols
KD&KDBG: Actually unload symbols when required

show more ...


Revision tags: 0.4.15-dev, 0.4.14-RC
# 0c76bbfe 09-Apr-2020 Hervé Poussineau <hpoussin@reactos.org>

[NTOS:KD] Merge KdpReportExceptionStateChange() with kd64 version


Revision tags: 0.4.13-release
# 329b9fa2 08-Mar-2020 Hervé Poussineau <hpoussin@reactos.org>

[NTOS:KD] Merge KdpReport() with kd64 version


# a3669fde 18-Jul-2020 Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com>

[NTOS:KD64] Fix 'MAX_KD_COMPONENT_TABLE_ENTRIES' value (#2992)

Addendum to ceb58c8.


# ceb58c82 18-Jul-2020 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

[NTOS][SDK] Add new kernel debug filters that have been added in Win8 and Win10; they can be useful for us.


# 54c03f69 17-Nov-2019 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

[NTOS:KD64] Some code formatting + add SAL2 annotations to the functions that are going to be involved in the next commit.

+ s/ReturnStatus/Status/ , and get rid of Win32 LPSTR and replace by
PCHA

[NTOS:KD64] Some code formatting + add SAL2 annotations to the functions that are going to be involved in the next commit.

+ s/ReturnStatus/Status/ , and get rid of Win32 LPSTR and replace by
PCHAR (since the concerned code deals with counted strings).

show more ...


# 6c1aac69 17-Nov-2019 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

[NTOS] Complete the support of Debug Filters. CORE-13529

- KD64: Update the list of supported Debug Filter Masks (KdComponentTable)
with the more up-to-date one from KDBG, that includes some compo

[NTOS] Complete the support of Debug Filters. CORE-13529

- KD64: Update the list of supported Debug Filter Masks (KdComponentTable)
with the more up-to-date one from KDBG, that includes some components
that have been added in Vista+, but some of which we also use in ReactOS.

- NtQueryDebugFilterState(), NtSetDebugFilterState() and KdpPrint():
Add the Vista+ behaviour or falling back to the DEFAULT component ID
settings for unknown Components (compiled in only wheen NTDDI_VERSION >= NTDDI_VISTA).
+ Remove redundant comments and update these functions with SAL2 annotations.

- KDBG: Add extra documentation for the debug filter components list.

- CONFIG: Load all the supported Debug Filter Masks settings from the
registry.

show more ...


Revision tags: 0.4.14-dev, 0.4.13-RC, 0.4.12-release, 0.4.12-RC, 0.4.13-dev, 0.4.11-release, 0.4.11-RC, 0.4.12-dev, 0.4.10-release, 0.4.11-dev, 0.4.10-RC, 0.4.9-release, 0.4.10-dev, 0.4.9-RC, 0.4.8-release, 0.4.8-RC, 0.4.9-dev
# 24f35397 12-Dec-2017 Amine Khaldi <amine.khaldi@reactos.org>

[NTOS] Add some header guards.


Revision tags: 0.4.7-release, v0.4.7, 0.4.8-dev, 0.4.7-rc1
# c2c66aff 03-Oct-2017 Colin Finck <colin@reactos.org>

Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.


Revision tags: backups/GSoC_2017/rapps@75905, ReactOS-0.4.6, backups/ros-branch-0_4_6@75728, 0.4.7-dev, ReactOS-0.4.5, backups/ros-branch-0_4_5@74569, ReactOS-0.4.4-CLT2017, backups/ReactOS-0.4.4-CLT2017@74182, ReactOS-0.4.4, backups/ros-branch-0_4_4@74002, ReactOS-0.4.4-FOSDEM2017, backups/ReactOS-0.4.4-FOSDEM2017@73667, ReactOS-0.4.3, backups/ros-branch-0_4_3@73437, backups/sndblst@72664, ReactOS-0.4.2, backups/ros-branch-0_4_2@73087, ReactOS-0.4.1, backups/ros-branch-0_4_1@71718
# 321bcc05 24-Apr-2016 Pierre Schweitzer <pierre@reactos.org>

Create the AHCI branch for Aman's work

svn path=/branches/GSoC_2016/AHCI/; revision=71203


Revision tags: ReactOS-0.4.0-CLT2016, backups/ReactOS-0.4.0-CLT2016@71719, ReactOS-0.4.0-FOSDEM2016, backups/ReactOS-0.4.0-FOSDEM2016@70667, ReactOS-0.4.0, backups/ros-branch-0_4_0@70757, backups/colins-printing-for-freedom@73041, ReactOS-0.3.17-CLT2015, backups/ReactOS-0.3.17-CLT2015@66843, ReactOS-0.3.17, ReactOS-0.3.17-FOSDEM2015, backups/ReactOS-0.3.17-FOSDEM2015@66122, backups/shell-experiments@75904, backups/tcpip_revolution@71025, backups/0.3.17@66124, backups/ros-branch-0_3_16-clt2014@63729
# b819608e 02-May-2014 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

Create a branch for console restructuration work.

svn path=/branches/condrv_restructure/; revision=63104


Revision tags: ReactOS-0.3.16-CLT2014, ReactOS-0.3.16, backups/ReactOS-0.3.16@62476
# 527f2f90 02-Feb-2014 Amine Khaldi <amine.khaldi@reactos.org>

[SHELL/EXPERIMENTS]
* Create a branch for some evul shell experiments.

svn path=/branches/shell-experiments/; revision=61927


Revision tags: backups/vs_jc@60583, backups/vs_jc@59301
# 4f0b8d3d 16-Jun-2013 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

Create a branch for Aleksandar Andrejevic for his work on NTVDM. See http://jira.reactos.org/browse/CORE-7250 for more details.

svn path=/branches/ntvdm/; revision=59241


Revision tags: ReactOS-0.3.15-LT2013, backups/ros-branch-0_3_15-lt2013@59304, ReactOS-0.3.15, backups/ReactOS-0.3.15@59303
# e1ef0787 28-Apr-2013 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

Create this branch to work on loading of different Kernel-Debugger DLL providers, and see whether it is possible to move KDBG from ntoskrnl to a new DLL called, say, KDROSDBG.DLL.

The idea then woul

Create this branch to work on loading of different Kernel-Debugger DLL providers, and see whether it is possible to move KDBG from ntoskrnl to a new DLL called, say, KDROSDBG.DLL.

The idea then would be to have the following behaviour (when specifying the following options in the kernel command line):

/DEBUGPORT=COMi --> load KDCOM.DLL and use COMi port (i == 1,2,3,4) if possible.
/DEBUGPORT=FOO --> load KDFOO.DLL (useful for KDUSB.DLL, KD1394.DLL, KDBAZIS.DLL for VirtualKD, etc...)
/DEBUGPORT=ROSDBG:[COMi|SCREEN|FILE|GDB|...] --> load KDROSDBG.DLL which contains the ROS kernel debugger, and use COMi or SCREEN or... as output port.

svn path=/branches/kd++/; revision=58883

show more ...


Revision tags: backups/ros-csrss@60644
# f6f20487 01-Apr-2013 Ziliang Guo <drakekaizer666@gmail.com>

Branching for 0.3.15 release after two days of no response from a certain sphere of plasma.

svn path=/branches/ReactOS-0.3.15/; revision=58636


# 65ce1461 14-Oct-2012 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>

Create a branch for working on csrss and co.

svn path=/branches/ros-csrss/; revision=57561


Revision tags: backups/ros-csrss@57560, ReactOS-0.3.14-CLT2012, backups/ros-branch-0_3_14-clt2012@56146, backups/c++-bringup@56084, backups/c++-bringup@60583, backups/usb-bringup-trunk@60667, ReactOS-0.3.14, backups/ros-branch-0_3_14@55492
# c2d0d784 20-Jan-2012 Cameron Gutman <aicommander@gmail.com>

[USB-BRINGUP-TRUNK]
- Create a branch to do a proper merge of USB work from a trunk base instead of from cmake-bringup
- In the future, DO NOT under any circumstances branch another branch. This lead

[USB-BRINGUP-TRUNK]
- Create a branch to do a proper merge of USB work from a trunk base instead of from cmake-bringup
- In the future, DO NOT under any circumstances branch another branch. This leads to merge problems!

svn path=/branches/usb-bringup-trunk/; revision=55018

show more ...


# 60eea2d7 19-Jan-2012 Amine Khaldi <amine.khaldi@reactos.org>

* Branch for the 0.3.14 release.

svn path=/branches/ros-branch-0_3_14/; revision=55011


Revision tags: backups/wlan-bringup@60693, backups/usb-bringup@55523
# 2b82fe44 02-Jan-2012 Cameron Gutman <aicommander@gmail.com>

[WLAN-BRINGUP]
- Create a branch to drop my ndisuio work

svn path=/branches/wlan-bringup/; revision=54809


Revision tags: backups/iut-netsh@54410, backups/icu4ros-bringup@60647, backups/shell32_new-bringup@60646, backups/reactx@60648, backups/GSoC_2011/KMTestSuite@60644, backups/GSoC_2011/TcpIpDriver@60644, backups/cmake-bringup@60644, backups/ros-amd64-bringup@60669, backups/nyadav-audio-branch@60647
# 4019caae 24-May-2011 Ged Murphy <gedmurphy@reactos.org>

This really needs to go in a branch. It needs heavy testing and can't coincide with the current shell32 due to PSDK interface changes

svn path=/branches/shell32_new-bringup/; revision=51893


12