ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to develop a non-gdb debugger for DDD?


From: Andrew Gaylard
Subject: Re: How to develop a non-gdb debugger for DDD?
Date: Thu, 09 Oct 2003 20:55:08 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Felix Yuan wrote:
> Hi,
> I'm developing a debugger and wanna use DDD as its GUI. I have found a 
> post (http://mail.gnu.org/archive/html/ddd/2001-10/msg00015.html) and it 
> said
> "If the debugger is derived from gdb, and its command structure stayed 
> the same, then all you have do is to start it up:ddd --debugger 
> <debugger> --gdb. "
>  
> My debugger is not derived from gdb. But if I make its command structrue 
> the same with gdb, will it work? If yes, how should I design its command 
> structrue? Is there any document about interfaces and infrastructure of 
> command-line debuggers such as gdb?
>  
> Thanks in advance.
> Best regards,
> Felix

Hi Felix,

DDD communicates with the lower-level debugger using only its
command-line interface.  It "pretends" to be a real user,
issuing commands and parsing the responses.

If your debugger can handle similar commands and produce
similar output to that of gdb, it will ease the integration
process.  However, I'm certain that some features will be
added that don't exist in gdb, and vice-versa, so there
will be some modifications required to ddd.  They may be
minor, but I doubt that you'd get away with none at all.

The most recent debugger added to ddd was bashdb, which was
purposely designed to act in a similar fashion to gdb.
Even so, it required many changes to ddd.

I'd suggest examining the changes made to ddd from 3.3.1
to 3.3.5 (using CVS); that will give you some idea of the
work involved.

I'm not aware of any document describing the textual
interface to gdb (although I imagine it must exist
*somewhere*).  And gdb's interface has changed over the
last while from 4.18 through 5.x and now to 6.0.  I've made
some minor tweaks to ddd to handle the various changes;
the next release of ddd (3.3.8) will contain them.

I hope this helps.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]