Commit Graph

16 Commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
5923d37e1f [KDCOM][KDGDB] Fix kdcom.dll/kdgdb.dll file naming on MSVC-built ISOs
CORE-20528

Addendum to commit 912c8ad987 (PR #5187)

Fix a bug where "KDCOM/KDGDB_NAME_ON_CD" CMake variables weren't used
as variables, but directly as names.
2026-03-23 13:29:58 +01:00
Hermès Bélusca-Maïto
20e16781bb [KDCOM][KDGDB][KDVM] Adjust the file names reported in their version resources 2026-03-21 23:16:12 +01:00
Hermès Bélusca-Maïto
912c8ad987 [KDGDB] Don't make GDB a separate citizen (#5187)
But add KDGDB compilation only for x86 and x64, since for other
architectures (e.g. ARM) it currently emits the following error:
```
drivers/base/kdgdb/kdgdb.h(149): fatal error C1189: #error:
    "Please define relevant macros for your architecture"
```

For the time being, keep the "GDB" build configuration macro, used for
Gitpod testing... but this needs to be replaced with a more robust solution.
Because of this, rename kdgdb.dll to kdcom.dll, and kdcom.dll to kdser.dll
so that GDB is used by default, and we don't get a file name clash too.

Revert also commit 57cf5cdc5d.
2026-03-21 22:46:58 +01:00
Hermès Bélusca-Maïto
6c532e771e [FREELDR][KDCOM][KDGDB] Allow specifying the serial port address in the DEBUGPORT option
This is the same feature as the one that already exists in the
NTOS:KD!kdmain.c module used by the in-kernel KDBG debugger
(GCC builds), first introduced in commit 4ce30245de (r54473),
and documented at:
https://reactos.org/wiki/Debugging#Changing_the_serial_port_address

This feature is useful if one uses a PCI, PCIe, PCMCIA, or ExpressCard
serial card on real hardware (these cards are used e.g. with laptops
without a built-in serial port), or with AMT serial over LAN.
After determining the serial port I/O address (say, 0xCC00), specify
the debug port as follows:

/DEBUGPORT=COM:0xCC00

instead of the usual syntax: /DEBUGPORT=COMn (n an integer).

The same syntax can be used for debugging FreeLoader as well: in the
FREELDR.INI file, add a "Debug" line in the "FREELOADER" section,
as follows:

```
[FREELOADER]
Debug=/DEBUG /DEBUGPORT=COM:0xCC00 /BAUDRATE=115200
```

----

NOTE for KDCOM/KDGDB:

Since `strtoul()` is used, but isn't exported by ntoskrnl, link against
the "strtol" static library that has been introduced in commit d317d4fbcc
(r71481).
2026-03-21 00:10:21 +01:00
Hermès Bélusca-Maïto
956d9f7973 [FREELDR][KDCOM][KDGDB][KDVM][NTOS:KD] Don't overrun the command-line when parsing "DEBUGPORT"
Don't loop past the end of the command-line buffer, if the command-line
terminates with a lone "DEBUGPORT" without any extra parameter following.
For example: "some things   DEBUGPORT  "
2026-03-21 00:06:20 +01:00
Hermès Bélusca-Maïto
c4d60756dd [FREELDR][KDCOM][KDGDB][NTOS:KD] Some code "nits"
- Don't hardcode constant string lengths.

- Use `_strnicmp()` -- Ideally we shouldn't have to unconditionally upcase
  the global kernel command-line string to perform substrings comparisons.

- Cast `atol()` returned value to `ULONG`.
2026-03-19 22:49:29 +01:00
Hermès Bélusca-Maïto
4d0642b67f [FREELDR][KDCOM][KDGDB][NTOS:KD] Minor code comments enhancements 2026-03-19 22:14:00 +01:00
Hermès Bélusca-Maïto
b1a31610ac [FREELDR][KDCOM][KDGDB] Remove deprecated "IRQ" debugger command-line option
- The "IRQ" debugger option was introduced in commit 5a6adb4f13 (r2546).
  It was used by the in-kernel GDB stub, to manually wire an interrupt
  handler `GspBreakIn()` to allow the debugger to break into the system
  when a command is received on the GDB serial port.

  Side-remark:
  The hooking was done via `HalGetInterruptVector()` + `IoConnectInterrupt()`,
  but only at phase 1 initialization when the memory manager was up, which
  can be "late" enough during system boot initialization.
  Instead of using `IoConnectInterrupt()`, one could have used explicit
  `KeInitializeInterrupt()` + `KeConnectInterrupt()` calls that would
  have worked much earlier in the boot stage.

- This functionality was soon after disabled in commit c804ca06be (r2946)
  in the GDB stub (see `ntoskrnl/kd/gdbstub.c!KdGdbStubInit()`), never
  to be re-enabled again.
  It was removed completely in commit e160c0fb26 (r14799).

- Since ReactOS was (until recently) always debugged locally using the
  in-kernel KDBG debugger, break-in was done with TAB-K keypress,
  intercepted by the keyboard driver that triggered a `DbgBreakPoint()`,
  thus no break-in via serial port interrupt was necessary.

- Remote debugger break-in detection, which is the standard method that
  is used when remote-debugging using KD transport DLLs and WinDbg, was
  introduced in commit 12e7593f24 (r25984). As with the rest of debugger
  communication and as done on Windows, detection is done by polling the
  serial port at certain times, namely in the `KeUpdateSystemTime()`
  kernel procedure periodically invoked by the timer interrupt.
  This break-in detection was then erroneously removed in commit bf8b9467dc
  (r45140), and reinstated in commit 014b23b9a (r56194).

- Parsing of this "IRQ" option was copy-pasted in other modules (FreeLoader,
  KDCOM, and KDGDB), even though it was never used. The parsing was then
  removed in KDBG itself in commit 95faf65ebf, but left in the other
  modules... until now!
2026-03-19 21:52:14 +01:00
Hermès Bélusca-Maïto
3012af5e30 [CPORTLIB][FREELDR][KD][NTOS] Move duplicated UART settings into a common header 2026-03-16 16:18:43 +01:00
Katayama Hirofumi MZ
fe11f7a2e5 [REACTOS] Refresh old URLs (#7632)
URLs are getting old. We have to
update URLs for documentation
purpose.
JIRA issue: CORE-19963
- Refresh old URLs.
- Add " (DEAD_LINK)" labels
  to dead links.
- Use MS Learn links rather
  than MSDN ones.
- Some dead links revived by
  Web Archive.
- Don't change Wine Tests
  and Wine Sync.
- Don't change 3rd party libraries.
- Don't append "redirected" labels.
2025-01-28 13:36:45 +09:00
Jérôme Gardou
00ce9ad42a [CMAKE] Declare KD stub Dlls as kerneldll 2021-03-24 15:20:06 +01:00
Dmitry Borisov
4501bbac8f [KDCOM][NTOS:INBV][FREELDR] Decrease default baud rate for PC-98 target (#2601)
According to PC-9801 Bible p. 50, divisor for PIT will become unsupported in some cases after having removed the fractional part. Replace 19200 value with 9600 which is supported by both 10 MHz and 8 MHz machines.
2020-04-21 23:22:42 +03:00
Dmitry Borisov
222e79232c [CPORTLIB][NTOS:INBV][KDCOM][FREELDR] Add ComPort library for NEC PC-98 series (#2407)
There are 2 known serial ports:
    COM1 - based on Intel 8251A
    COM2 - National Semiconductor 16550
2020-03-06 19:50:31 +01:00
Jérôme Gardou
23373acbb9 [CMAKE] Use modules instead of shared libraries
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.

On my system, this reduces the configure-time by a factor of two.
2019-04-06 17:43:38 +02:00
Hermès Bélusca-Maïto
f9b6429468 Delete "ghost" old(*) files that have been mysteriously added back during the SVN-to-Git transition.
To check that these changes are correct, checkout in a directory (let's call it "ros_svn") the /trunk/reactos/ of our read-only SVN repo r76032 and in /trunk/reactos/modules/, the rosapps, rostests and wallpapers.
In a second directory (let's call it "ros_git"), clone the corresponding Git-converted ReactOS directory.
Before applying this patch (and the previous one that added back the empty directories), you should see additional files in ros_git that are not in ros_svn, corresponding to these files I'm deleting here (plus some .gitignore files),
and you should also see additional files in ros_svn that do not appear in ros_git: these are the empty directories I've restored in my previous patch.

Now, after the application of both the previous patch that restores the empty directories (and deletes the .gitignore files), and this patch that removes the ghost files, you should only see that the only differences
between ros_git and ros_svn are the extra .keep files in the empty directories, and that's all!

Command-line for the tests:
diff --strip-trailing-cr -r ros_svn ros_git > diff_svn2git.txt

"-r" means recursive, and "--strip-trailing-cr" ignores the CR-LF vs. LF (or CR) EOLs.

(*): by "ghost" old(*) files I understand files that existed previously in the far past, that then were deleted long ago in SVN, and that popped out back during the Git migration.
2017-10-04 10:28:36 +02:00
Colin Finck
c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00