I want to know if there are any tools/tool-kits which aid in building source level debuggers for domain specific languages ? (I work on a proprietary DSL, which doesn't have any tools and sometimes debugging will become difficult, so, if in case there are any such tool-kits, wanted to try)
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
This is an indirect answer to your question. In 1982 I wrote the first commercial C source-level debugger, CDB (also possibly the first remote debugger, kernel debugger, and multi-process/multi-thread debugger). I initially wrote it because I needed it (the only other option was
Since you are the person with the itch, you are also quite possibly the best person to embark on this journey.
The following things are needed to create a source-level debugger:
Once you have these things nailed down, your actual command processing should be pretty straightforward. For example, when you hit a breakpoint, you read the PC, map it to file:line and display that line (normally with +/-5 lines of context). For a stack trace, you get the SP and print each frame using the additional symbol info that gives local variable offset from the SP, etc., etc.
What commands make sense will be driven by how you (and your future users) think when using the language. Things that make sense for one language are nonsense when applied to another. For example, given the C declaration
The Devil is in the Details on these 4 items, so let me know if you would like any more help offline. My email is in my profile.