Post by Mat NieuwenhovenPost by Mat NieuwenhovenPost by ta0590897(Sorry about crossposting from the subreddit but it has only 2 subscribers)
I want to run my DOS program, cross-compiled with OW, in a virtual DOS
machine such as DOSBox or QEMU. The host is Windows, and I want to do my
debugging via either wdw.exe or better still Code::Blocks.
While I managed to set up FreeDOS in QEMU to do networking, I don't know
how to proceed from here. I cannot get tcpserv.exe to run even after
installing a packet driver, it says "unable to open socket stream".
Though I don't really know much about networking.
After googling the issue, I got the impression that remote debugging
does not really work in Open Watcom except via serial cable.
Is this true? Just so I'm not spending all my time trying something futile.
Hi,
in general remote debugging works quite well. I've used serial, TCP/IP, and
something specific to OS/2 (and possible parallel as well).
So in Freedos tcpserv doesn't work? Have you tested the generic TCP/IP
things first, link pinging an outside host, and using the browser Arachne?
I did a quick test with VirtualBox (VB) and the pre-configured FreeDos (FD)
virtual machine at http://lazybrowndog.net/freedos/virtualbox/ , which also
has clear instructions., which I followed.
<snip>
I did some more testing, this time on Windows, and remote debugging using
TCP in FreeDos seems to work, as follows:
- Use the preconfigured FD mentioned above, and boot menu item 3 (TCP). I
set up the VM with a bridged network adapter, because it needs its own IP
address. It is possible it would work with a VB host-only network too, I
haven't tested that. If you use that, don't enable its DHCP server, that
doesn't work with FD, use fixed IP addresses.
- The FD is initially set up using DHCP. In FD I used MC to set up the FTP
server to c:\ftpdata (create the directory): change \fdos\ftppass.txt to
have a sandbox /drive-c/ftpdata and uploaddir / . Start the ftpsrv, then
from windows in a cmd prompt go to the Watcom binw directory. There start
the ftp client (ftp <ipaddress_of_FD>), login, enter binary, then transfer
std.trp and tcpserv.exe to FD. Plus any program you want to debug. In FD
stop ftpsrv.
- In FD using MC, change c:\autoexec.bat, to rem out the DHCP line in
config 3. Also configure \fdos\wattcp.cfg with a good IP config (should be
similar to the DHCP config, just different IP address), Halt FD (not
reboot). Start FD from VM GUI.
- In FD, go to \ftpdata, start tcpserv .
- In Windows, in a cmd prompt in the Watcom binnt directory, start 'wd
/tr=tcp;<ipaddress_of_FD> application_to_debug .
I also tested again NetBIOS (you'll need std.trp and netserv.exe in FD),
after booting to FD menu item 5. netserv starts, but from the host Windows
machine "wd /tr=net application_to_debug" didn't connect. Of course the
Windows machine must be configured for 'native' NetBIOS also, not just the
standard NetBIOS over TCP/IP.
I also tested serial again using a named pipe \\.\pipe\vmwaredebug, after
starting the program "vmwaregateway /t" in a cmd prompt (see the VB help
about serial ports). If FD is started, you see in vmwaregateway an incoming
pipe connection. Because vmwaregateway provides by default an TCP server on
localhost:567 (tested with telnet), I used "wd /tr=tcp;localhost:567". It
doesn't actually give an error but doesn't interact with FD's serserv,
possibly because the protocol for tcp and ser are different.
Happy debugging!
Mat Nieuwenhoven