Re: debug java application
Brought to you by:
set
From: Salvador E. T. <sal...@in...> - 2005-09-28 18:41:40
|
On 28/09/05 15:06, Szasz Pal wrote: > Hi! > > How complicated would be to add debuggin support for java programs? > Java also has a console mode debugger, jdb, but I don't know how similar > it is to gdb. > > And in general how complicated would be to make a general debugging > framework? Ie. SETEDIT would connect to the mid-layer and communicate > to it with it's own protocoll. Then the mid-layer can communicate with > the real debugger. The advantage would be that new debuggers could be > added withouth needing to recompile setedit. Answer: not so easy and not so complicated ;-) Currently SETEdit uses an abstraction layer called "libmigdb", that's a separated library (currently only static version available). So you could just write a library with the same API as "libmigdb" to communicate with the debugger. But this isn't the best approach. The best (and a little bit more complicated) is to write a binary that translates "GDB/MI" commands into the commands used by your debugger. The GDB/MI protocol is documented in GDB docs (some missing and missleading stuff, be careful!). This protocol uses plain text (to avoid the problems associated with binary data) and is designed for "Machine Interaction". It means the format of the responses isn't designed to be human readable, but they are quite easy to be parsed. This approach can be done without altering SETEdit (nor libmidbg) sources (or with very little changes). But the most important thing you get: you can use any other gdb frontend that implements GDB/MI protocol. I know Eclipse is one. The "ultimate" approach is to just cooperate with the debugger team and help to just add GDB/MI protocol to the debugger itself. Does it answer your question? Ask me if you have doubts. Regards, SET -- Salvador Eduardo Tropea (SET). (Electronics Engineer) Visit my home page: http://welcome.to/SetSoft or http://www.geocities.com/SiliconValley/Vista/6552/ Alternative e-mail: se...@co... se...@ie... Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013 |