tags:

views:

58

answers:

2

I am using a rather obsure, proprietary langauge called WIL/Winbatch that had an awful IDE (winbatch studio).

I would like to develop an alternative environment; however, without the ability to set breakpoints, step, and examine variables, there is really no point. How does one begin even researching how to implementing a debugger for a proprietary language? Is it even legal? I guess I'm kind of locked in a mindset that the debugger portion must be able to examine the statements that are provided to it in WIL as they are executed, right? So somehow i have to trap the output of the interpreter? Or is it just a matter of reading locations in memory using whatever language? Thanks in advance.

+1  A: 

Why are you tied so closely to this language? If it's not well supported, there are many others you can use. Anyway, to actually answer your question, the difficulty depends on whether it is a compiled or interpreted language and whether or not you have access to any source code (which it seems of course, that you don't). That said, this would be a very challenging project as you would have to reverse engineer the compiled code for it to have any meaning. Your time would be better spent learning another (better) language.

Perhaps if you can give us an idea of why you want to use this language we could give you some help?

Michael Mior
Its not really a matter of choice. My employer has been committed to this language for quite a few years, and I'm just a 'worker bee' trying to make the most of it.Winbatch offers an interpreted version, and for an additional fee, you can purchase the compiler (which we have) for making PEs.
I would suggest trying to convince your employer of the problems you are encountering using such a language. But I can understand how sometimes you're just fighting a losing battle. In that case, I would take a look at Eclipse since it gives you a good base to start with.Here's one link that may help: http://www.eclipse.org/imp/documents/IMP_Users_Guide.pdf. IBM used to have a series about this on developerWorks, but it seems to have disappeared now.
Michael Mior
+1 for identifying the real problem here, which is the use of a weak proprietary language with no ecosystem around it. Employers never seem to understand that when workers are spending time creating IDEs and debuggers to compensate for the weaknesses of languages like winbatch, they're using up time reiventing the wheel for no good reason.
twneale
+1  A: 

Having been there and successfully completed the task, here are the things to keep in mind:

  1. Build it as a plug-in/extension to an IDE your team is already familiar with and likes. They'll thank you for providing an interface consistent with what they really know how to use, plus you can focus entirely on the features that make your language different from others.
  2. You'll have to learn the debugging protocol for your language. In our case, we had source access to the runtime for the interpreted language. In other cases, you may find documentation for GDB local or remote debugging interface, a library you can link to for the language's debugging protocols, or maybe even figure out what the call stacks look like and wrap the Windows Debugging API to analyze it behind the scenes.
  3. Don't build in excess of what the language provides. Adding debugging features takes a lot of time, and they have a rather annoying habit of needing to be significantly altered or completely rewritten as versions of the target language are updated.
280Z28