Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] DSF debugger support independent of CDT.

Hi Bruno,
I think it's a cool idea and theoretically at least totally doable.  The biggest entanglements between the debugger and CDT is in areas of breakpoints and source lookup.  So you should be able to pull out the rest of the services into a lower level feature, then replace breakpoints with your own service.

Cheers,
Pawel

On 11/6/13, 7:48 AM, Bruno Medeiros wrote:
Great, I've done the honors of adding this as a enhancement request:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=421166

Here's an example of one issue so far I encountered with this use case:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=421164
(fortunately a very minor issue, trivial to workaround)


Why would it be an issue that DSF-GDB would be hard to make independent of CDT? It seems that certain functionality (such a the util stuff that verifies binaries, or launch configuration parameters that used in both debug and non-debug - binary location, working directory, arguments, etc. ) would have to be moved to this common, lower layer, but it seems sensible and feasible.
Then again I only took a quick and superficial at CDT code, I'm not at all familiar with its internals.



On Tue, Nov 5, 2013 at 6:59 PM, Doug Schaefer <dschaefer@xxxxxxx> wrote:
I was going to agree with this even without the last line :).

In fact at one point a long time ago, I had gdb support working with Ada with minimal changes to the CDT. It’s pretty handy that way.

Marc K can comment and Pawel may agree, but I do think DSF is generic enough to be pushed lower. Not sure as much about GDB. It gets confusing around launch configurations and anything we want to do around add the debugger to the toolchain concept. (BTW, we’re doing some thinking on that).

It would be interesting to know what the dependencies are internally in DSF/GDB to the rest of the CDT. Assuming we create an IDE project and want to move DSF down to it, we would need to do some surgury.

From: Bruno Medeiros <bruno.do.medeiros@xxxxxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Tuesday, November 5, 2013 at 1:09 PM
To: "cdt-dev@xxxxxxxxxxx" <cdt-dev@xxxxxxxxxxx>
Subject: [cdt-dev] DSF debugger support independent of CDT.

Hello.

I've recently been trying out CDT's DSF-GDB debugger functionality, and it works quite well, which is great.
The interesting thing here is that it works well even for executables that were compiled from languages other than C/C++, as long as it's a language GDB has support for. This means there is the real possibility of using DSF-GDB for debugging support in IDEs other than CDT, and in fact that's exactly what I'm working on. I'm developing for DDT, an Eclipse IDE for the D language, and I'm trying to integrate DSF-GDB as the debugger functionality.
It doesn't seem like this was an intended use of DSF-GDB, but fortunately it's technically feasible already, since the CDT launch supports a project-less configuration. So, I'm implementing this by creating and configuring a org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate from my IDE's own delegate, and then launching it. So the basics of this approach works, but there a few kinks to it. First and foremost, having a dependency on DSF-GDB implies a dependency on the whole of CDT. Yet it seems like DSF debugger support could (and should) be abstracted into a language-independent layer/feature. Then CDT and other IDEs could make use of it, and this would make sure all debugger functionality would be available for non-C/C++ projects (there are already one or two other minor limitations I've found that I could not resolve, and there might be more as I complete the integration). But before delving further, I would like to get a feel for how much interest there is to pursue this enhancement? Can a ticket be opened for this?

BTW, Goclipse is another IDE that would benefit from this (as Go is another language supported by stock GDB). Goclipse does have it's own GDB debugger integration already, but it's not as full-featured as CDT's, it has several significant bugs, and has not been maintained in a while.

[ Doug, remember you wanted to help improve Eclipse's IDE framework support for other languages. Here's a low hanging fruit you can help with ;-) ]

--
Bruno Medeiros

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev




--
Bruno Medeiros


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top