[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-debug-dev] How to develop a non-gdb debugger for CDT?
|
Felix,
You should download CDT source code, and *debug the debugger* to learn.
It is also recommended to understand CDT architecture by exploring its
packages, classes, (Names are the best hints) and types hierarchy.
The best practice is not to modify CDT source, but to extend the
supplied abstract lasses and interfaces.
Keep CDT architecture.
About names : Look for classes which has GDB in their names.
I remember it was a good start. Understand the classes roles, and find
out which abstract classes / interfaces you should extend / implement.
I hope this information will help you.
BTW : Compiler is an art by itself - eclipse will not help you here...
Haim
Felix Yuan wrote:
The DSP we deal with is a video processor. From past up to the present,
programmers write assemble code for it. To improve the efficiency of
development, we are requested to customize a special C language for it.
And we'll develop some tools including compiler, profiler, debugger, etc,
and integrate them with Eclipse.
Now, I prefer to option A you provided. It seems that we can make
less modification to the CDT. But the difficulty is that we don't know how
CDT UI interacts with gdb. Is there any GNU documents about gdb
helpful to us?
In option B, you say we can create new commands and output classes to
interact with our debugger. I wonder these "classes" are already in CDT
and we should modify them for our debugger, OR, these "classes" are not
belong to CDT and we must add new ones. If the latter is true, how does
CDT UI interact with these classes? It seems to return to option A.
Thanks again.
Best Regards,
Felix
----- Original Message -----
From: "Haim Cohen" <haim.cohen@xxxxxxxxxx>
To: <cdt-debug-dev@xxxxxxxxxxx>
Sent: Tuesday, September 30, 2003 9:29 PM
Subject: Re: [cdt-debug-dev] How to develop a non-gdb debugger for CDT?
It seems you have 2 options :
A : Implement gdb MI interface in your debugger. You should check what
are the gdb commands sent to gdb by CDT, and what is the output of each
command. You can learn about it by running gdb from command line.
The interface to gdb is located in the commands and, run them in gdb and
look at the output to see if you can supply this information from your
debugger.
B : Using the existing interface of your debugger, create new commands
and output classes, to interact with your debugger. There is some
parsing work here, so plan your debugger interface carefully.
Of course, instead of running the local gdb, run your debugger.
I am curious - what is the DSP you develop the debugger for ?
Haim
Felix Yuan wrote:
Hi Haim,
thank you for your reply.
Our projcet is to develop a C compile system for a special DSP. It has a
simulator
that we can use to debug assemble code.
The original plan is to use remote debugging with gdb. But the debugger
team
has met some diffculties when they tried to port gdb to our system. So
they
select
plan B, to develop their own debugger which is not as complex as gdb
is.
They want to wrap the simulator in the debugger and provide some calling
interface
for debugging. So we must know how CDT is making use of the MI-interface
of
gdb as you mentioned. And then we could replace gdb by our own debugger
without
modifying too many CDT source files.
We expect more advice from you.
Thanks.
Best Regards,
Felix
----- Original Message -----
From: "Haim Cohen" <haim.cohen@xxxxxxxxxx>
To: <cdt-debug-dev@xxxxxxxxxxx>
Sent: Tuesday, September 30, 2003 4:50 PM
Subject: Re: [cdt-debug-dev] How to develop a non-gdb debugger for CDT?
Hi Felix,
I have some experience with debuggers in Eclipse.
The interface between the inferior debugger and CDT is the command line
interface of the debugger. CDT is making use of the MI-interface of gdb
- nothing fancy, just output format which is easier to parse.
I suggest you to take a look in CDT code, in the
org.eclipse.cdt.debug.mi.core package.
I did not find any documentation for this.
What are your source language and target that you can not use gdb ?
Haim
Felix Yuan wrote:
Hi,
Is it possible to integrate a non-gdb debugger with CDT seamlessly?
If yes, how should we design the debugger? Where can I find the
document
about the interfaces between CDT UI and debugger engine?
Thanks in advance.
Regards,
Felix
_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
--