Closed NCommander closed 7 years ago
for debugging DOS (extended) application (for PharLap extender) you must use pls.trp trap file. DLL version of pls.dll doesn't exist because you can run program only under DOS. pls20.trp is debug version of trap file (it is build on Travis site). I will switch off this setup to be generated standard name without version number in the name.
I switch off number in name on Travis build now only pure name will be created by example pls.trp etc.
it was switch on for simple debugging of OW 2.0 debugger by OW 1.9 debugger
It wasn't clear in the original bug report, but I'm doing remote debugging, not local debugging. The OW documentation states that the trap file has to be run on the remote debugger, not on the target machine.
I can successfully run serserv on DOS, and successfully start the application via wdw, but without the debug traps, I can't successfully break into the app. OW documentation states the trap file has to be loaded on the remote debugging side. Looking at the other .trp files, most of them also have a corresponding DLL file that goes with them.
I have the pls20.trp file, but I don't have the corrisponding pls20.dll, which causes wdw to report "Cannot load trap file (pls20.dll)".
The debugger is being invoked as such: wdw /tr=ser;6 /trap=pls
on target system (DOS) you must start serial server (DOS) with option -trap=pls. On the host system (Debugger) you start WD/WDW with option -trap=ser
It should work this way wdw -> ser -> serial link -> sersvr -> trap (pls) -> PLS application on host (Windows) is debuger with serial trap for host OS (Windows) on target (DOS) is serial server with pls trap (DOS)
See Debugger documentation on page 91
Well I feel like an idiot :/.
serserv is dying with "unable to find expander" so obviously I need to do some more setup work that I haven't quite figured out (I don't have the source for this binary, I'm simply getting a debugger going to aid reverse engineering).
I'll keep going through the documentation to work out how to get this all setup. Major thanks to the OW guys for keeping this great tool still chugging.
You need appropriate PharLap extender code on the target. It should be plshelp.exp which is in binw OW directory.
I've been trying to use the OpenWatcom to debug a legacy DOS application for reverse engineering. I've discovered that the trap files for various DOS extenders (in this case Phar Lap) appear to be MIA, and thus it's impossible to break into the debugger from the application.
It appears the source code to the traps are present in OW2 (https://github.com/open-watcom/open-watcom-v2/tree/master/bld/trap/lcl/dos/dosx/pls), and pls20.trp is present in the binary. However, pls20.dll is missing, so it's impossible to invoke wdw for remote debugging with /trp=pls (pls20.dll is missing is the error).
Not sure if this is a build error or a distribution error. I have a OW build on my desktop at home but I won't be able to see if pls20 is there for a few hours. Figured I should report this though to let those who actually understand the OW build system see if this can figure out what's gone wrong.