8

I really like the DDD debugger, because it offers a visual representation of data structures, like this:

Googling returned no build for Windows, probably because it is a front end for the GNU debugger (although there is a Windows port of that).

I guess that I could use DDD with Cygwin, but I always have trouble getting X-windows working with Cygwin.

In any case, I would prefer a pure Windows solution without Cygwin.

Does anyone know of such a beast? And free, please, not commercial.


[Update] a few years later, and in a Dr Dobbs article I read

Nor DDD for Microsoft and Borland compilers, either, because their debugging information is not understood by GDB

So, it looks like the answer, sadly, is NO.

  • 2
  • 1
    +1 but, it is not free. And, see the comment to the the accepted answer; is is indeed a debugger front end, but is not DDD. I.E, it cannot display a linked list as shown above. – user5113 Jul 7 '14 at 8:09
  • Maybe ddd can be built with mingw? – Jason C Jul 7 '14 at 12:47
  • 1
    Maybe? If you don't know, why post? Maybe it can be done with a lump of cheese ... – Mawg Jan 20 '15 at 10:40
  • MS has opened PDB source code, so now Clang understands that format and can interact with Windows debuggers although I don't know if DDD works with lldb or not. IMHO linked list isn't commonly used (and shouldn't be used in general), so debugging linked lists is not very useful compared to visualized debugging other data structures, which Visual Studio is good at. However it's indeed useful for tree structures – phuclv Sep 3 '18 at 9:43
1

You could try Gnat Programming Studio (https://www.adacore.com/community) which is an IDE which supports Ada, C and C++ (and more)

Like all IDEs, you can create projects and debug them, but you can also load executables directly. If the path of the sources match the source on the disk, it will work with a default project, which describes easily in a pseudo-Ada file:

project Default is
    for Source_Dirs use ("src");
    for Object_Dir use "obj";
    for Main use ("main.c");
    for Languages use ("C");
end Default;

It has a graphical gdb interface and a graph display similar to DDD / Eclipse (depends on the versions), and Windows native version (no Cygwin). You can also type commands directly in the gdb console.

The showcased version is the professional edition, but the free version is released yearly and gets the pro features, just a little later.

In the screenshot below, I have tried graph display n which is a structure of my program.

typedef struct node_
{
  struct node_ *next;
  int v;
} Node;

enter image description here

It may not be what you want (since it looks more like Eclipse debug), but it used to look very much like DDD before (and they probably thought it was obsolete). I'll investigate more to see if the old graph display is still available, in the meanwhile you have a free/relatively lightweight debugger that doesn't require an Eclipse setup.

EDIT: you can also try the previous release of Gnat Programming Studio downloadable here:

https://www.adacore.com/download/more

select x86 (32-bit) and year 2017 (in 2018 they removed the graph display, bummer)

My example is a bit of a mess but with some work (using "dereference pointers" wisely) you could achieve something.

enter image description here

  • 1
    let me create a linked list example. I must admit I never tried that. – Jean-François Fabre Aug 22 '18 at 12:09
  • 2
    done, the result is somehow not what you're expecting, but older versions may be a match. I've asked the authors. – Jean-François Fabre Aug 23 '18 at 6:15
  • 1
    you don't have to accept since it's not exactly what you asked for, that's fine by me. yes GPS (Gnat Programming Studio) is highly underrated because it is originally done for Ada, but now (and with my zillion bugreports) it's becoming very good in C and faily good at C++ (thanks to clang parsing engine). It also doesn't need the cumbersome workspace and complex setup Eclipse needs. I have to test the free version / check older ones, though (even if using older versions isn't so good because you don't benefit from bugfixes) – Jean-François Fabre Aug 23 '18 at 7:37
  • 1
    They used to have those diagrams. I have asked a question for the support team to see how to get them back or whatever. And I also took time to test the free version of GPS and it's very very close to the professional version (I didn't update the screenshots though) – Jean-François Fabre Aug 23 '18 at 9:42
  • 2
    the paid version is just more up to date for bugs & features. The free version is released once a year. that's the only difference but a big one :) – Jean-François Fabre Aug 23 '18 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.