Debugging custom programming languages with wdw?

7 views
Skip to first unread message

Johann 'Myrkraverk' Oskarsson

unread,
Apr 26, 2020, 1:03:24 PM4/26/20
to
Dear openwatcom.contributors,

I came across bld/wv/hlp/whatsup.doc in the source tree. There they
explain that it's possible to debug AutoCAD Lisp applications with the
Watcom debugger. This is right at the start of the file, if you care
to take a look.

Is this capability still existant in the OpenWatcom source tree? Can
I develop a trap file for my own, let's say interpreted, programming
language, and debug the applications in wdw?

What are trap files, and are the sources still around?

And if I can develop a trap file for my programming language, is it
possible to use wdw to automatically switch between the host language,
and extensions written in C? Similar to some debuggers who are able to
switch between Java and C code, when the application is using JNI.

--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk

Steven Levine

unread,
Apr 26, 2020, 7:11:59 PM4/26/20
to
On Sun, 26 Apr 2020 17:03:20 UTC, Johann 'Myrkraverk' Oskarsson
<joh...@myrkraverk.invalid> wrote:

Hi Johann,

> Is this capability still existant in the OpenWatcom source tree?

It should be.

> Can
> I develop a trap file for my own, let's say interpreted, programming
> language, and debug the applications in wdw?

Probably. If the .trp file can control your interpreted language's
runtime, it should be possible.

> What are trap files, and are the sources still around?

For the gory details, see

dig\ shared debug support (debugger, trap files,
profiler)
dip\ debug info processor
mad\ machine architecture descriptions used by
debugger
trap\ debugger trap files (std.d32 etc.)
wv\ debugger (wvideo)
doc\ debugger internals docs

in the OpenWatcom sources. .trp files interface with the OpenWatcom
debugger to pass machine dependent debugging data to the OpenWatcom
debugger (wdw or wd) which are pretty much machine independent.

> And if I can develop a trap file for my programming language, is it
> possible to use wdw to automatically switch between the host language,
> and extensions written in C?

That's an interesting question. The debugger knows how switch between
assembler and C and Fortran (I think). Please let us know what you
find out.

Steven


--
---------------------------------------------------------------------
Steven Levine <ste...@earthlink.bogus.net>
DIY/ArcaOS/Warp etc. www.scoug.com www.arcanoae.com www.warpcave.com
---------------------------------------------------------------------

Johann 'Myrkraverk' Oskarsson

unread,
Apr 27, 2020, 8:23:35 AM4/27/20
to
Thank you. I'll take a look, maybe next weekend. My language is still
in the design phase, so I won't have anything to show for a while, but I
do want mixed programming with, hopefully, debugging in wdw.

Jiri Malak

unread,
May 3, 2020, 10:54:45 AM5/3/20
to
Dne 27.4.2020 v 14:23 Johann 'Myrkraverk' Oskarsson napsal(a):
If you want introduced new Language you need to add support for it into:
- DIP (Debug Information Processor)
- support for language syntax to SSL processor (.prs files)
- encoding (code generator) and decoding (DIP) of debug information

Your host Operating system need appropriate Trap file, if you use
already supported OS, you don't need to create new trap file and you can
use it.
Details about trap file is in WD design documentation wddoc, you can
create if in pdf or other format.


Operating system (target host) is related to Trap file, that you need
develop it. Documentation related
The programming language is about debug information and its processing
in DIP processor.
Reply all
Reply to author
Forward
0 new messages