Lack of debugging information in Watcom debugger

245 Views Asked by At

Currently I am using Clion IDE plus latest version of Open Watcom v2 windows 32 bit compiler to develop some 16 bit MS-DOS application. The problem I have is I don't see all required debugging information when using watcom windows debugger (wdw.exe).

Being specific, I see global variables, global and any other types of functions, even those imported from asm files. But well, local variables list is empty all the time. But more importantly - the only c-code I can see is little test.c file which contains only main() function and nothing else except for includes.

What do I need to do to finally get C-level debugging for whole project? What am I missing?


All source files is located in one directory, so, they all should be visible to debugger. But it sees only main c file.

Of course I am compiling with -d2 switch, as well as -hw. DEBUG WATCOM ALL is also presented in linker config file before any FILE directives. Reading manuals to compiler and linker... Well, it's nice that I've found many interesting things in manuals, but nothing helped with exactly that issue so far :)

List of compiler switches I currently using:

WCC.EXE:
CALL WCC.EXE -dTEST -bt=dos -0 -za99 -wx -we -mc -zp2 -hw -d2 
%SRC_FULL_NAME%
WLINK:
CALL WLINK.EXE @..\CC.LK

CC.LK:
SYSTEM DOS
DEBUG WATCOM ALL
FILE TEST.OBJ
FILE LUTILS.OBJ
FILE LGL.OBJ
NAME TEST.EXE
OPTION ELIMINATE
...
1

There are 1 best solutions below

0
On

compiler and linker parameters seems good. The problem comes from wd seting. Initially it uses setup.dbg but this one has no information about your source path. so do like this:

  1. launch wd.exe; don't open your .exe (click cancel)
  2. go to File Source Path and enter your source file path for example C:\ or C:*.c if you mounted your dosbox C: on your source file path
  3. open your exe file
  4. Open Code Modules windows and double click on the module (filename you wish) it open it in Source window and you can then see source code and put breakpoints 5)File -> Save Setup and give your custom name as MySetup.cfg Each time you restart wd, launch it and you will find your windows setting and source file path. wd works well on dosbox even with big programs using DOS4GW extended memory