Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-debug-dev] Projectless debugging implemented in Zylin Embedded CDT 4.0

I've just finished implementing my projectless debugging experiment in
Zylin Embedded CDT 4.0 and committed it to cdt-contrib.

I took it for a spin and it appears to be able to do basic debugging at least.

If no projectname is specified in the debug configuration, I create a
FakeCProject object that implements ICProject and throws a runtime
exception for all methods except those that I observed in the debugger
is used. Otherwise operation is unchanged and I use the old code
w/ICProject as normal.

I've always thought that it is a massive overexposure of interfaces to
expose the ICProject to a launch session. GDB really doesn't need all
that info.

If my experiment proves successful over the next couple of days, then
it seems to me that projectless debugging could be supported by CDT
relatively easily. Ignoring pesky stuff like backwards compatibility,
available development resources, conflicting priorities, etc. :-)

Some ideas:

- Add a new narrower interface IProjectAdapter. I don't know that this
is the proper use of the "Adapter" Eclipse concept/terminology. This
adapter would basically only expose those methods of ICProject that
CDT cares about for debugging. Plugins could then implement an object
which supports a handful of methods. Implemnting IProjectAdapter for a
real ICProject would be trivial. Convert the internals of CDT to use
only IProjectAdapter during debugging.

- CDT could have something equivalent of the FakeCProject objects
implemented that plugins could subclass.

Source code:

http://cdt-contrib.cvs.sourceforge.net/*checkout*/cdt-contrib/embeddedcdt4_0/src/com/zylin/embeddedcdt/launch/FakeCProject.java?revision=1.1

http://cdt-contrib.cvs.sourceforge.net/cdt-contrib/embeddedcdt4_0/src/com/zylin/embeddedcdt/launch/


--
Øyvind Harboe
http://www.zylin.com - eCos ARM & FPGA  developer kit


Back to the top