Skip to content
Jiří Malák edited this page Mar 5, 2019 · 12 revisions

The Open Watcom Remote Debugging

This document contains notes how to use Open Watcom Debugger for remote debugging for various targets and hosts.

Debugging for DOS with DOSBOX

Below is description how you can debug DOS executable (16 and 32-bit) from Windows. You need some virtual serial port emulation software. Example is for free Open Source software "com0com".

Install com0com software and configure it if necessary. You can use default setup for COM3/COM4 In this example COM3 is used by DOSBOX and COM4 is used by OW Debugger, you can change it if necessary.

You need to configure DOSBOX to use appropriate Windows serial port and map it to selected DOS serial port (COM1). Change DOSBOX configuration file for DOS COM1 serial port as

[serial]
serial1=directserial realport:COM3

DOS 32-bit Application debugging

Wire schema for 32-bit DOS application.

+-----------+ +----------+ +---+ +-----------+ +---+ +-----------+ +-----------+ +----------+     +----------+
|  WDW.EXE  | | SER.TRP  | | C | |           | | C | |           | |  SERSERV  | | RSI.TRP  |     | APP.EXE  |
|          / /           | | O | | nullmodem | | O | |  DOSBOX   | |  .EXE    / /           |     |          |
|          \ \           | | M | |           | | M | |           | |          \ \           |     |          |
|           | |          | | 4 | |           | | 3 | |  COM1     | |  COM1     | |          |     |          |
+-----------+ +----------+ +---+ +-----------+ +---+ +-----------+ +-----------+ +----------+     +----------+
                          |                         |
                          +------- com0com ---------+

Before start debugging for DOS 32-bit application you need copy some files to target DOSBOX.

  • DOS4GW.EXE (from OW BINW subdirectory)
  • SERSERV.EXE (from OW BINW subdirectory)
  • RSI.TRP (from OW BINW subdirectory)
  • RSIHELP.EXP (from OW BINW subdirectory)
  • application executable

On DOSBOX you need to run following command to start remote debug server.

SERSERV /trap=rsi

On host Windows system you must start OW Debugger by command

wdw -trap=ser;4 "application executable name"

DOS 16-bit Application debugging

Wire schema for 16-bit DOS application.

+-----------+ +----------+ +---+ +-----------+ +---+ +-----------+ +-----------+ +----------+     +----------+
|  WDW.EXE  | | SER.TRP  | | C | |           | | C | |           | |  SERSERV  | | STD.TRP  |     | APP.EXE  |
|          / /           | | O | | nullmodem | | O | |  DOSBOX   | |  .EXE    / /           |     |          |
|          \ \           | | M | |           | | M | |           | |          \ \           |     |          |
|           | |          | | 4 | |           | | 3 | |  COM1     | |  COM1     | |          |     |          |
+-----------+ +----------+ +---+ +-----------+ +---+ +-----------+ +-----------+ +----------+     +----------+
                          |                         |
                          +------- com0com ---------+

Before start debugging for DOS 16-bit application you need copy some files to target DOSBOX.

  • SERSERV.EXE (from OW BINW subdirectory)
  • STD.TRP (from OW BINW subdirectory)
  • application executable

On DOSBOX you need to run following command to start remote debug server.

SERSERV

On host Windows system you must start OW Debugger by command

wdw -trap=ser;4 "application executable name"
Clone this wiki locally