Author Topic: DDD-like watches  (Read 38023 times)

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
DDD-like watches
« on: January 10, 2006, 08:37:35 am »
I must admit I don't use debuggers that much but, when I do, getting a good interface helps a lot.

There's a *nix front-end for GDB (and some other debuggers) called DDD. The only way to get it working on Windows is thru Cygwin + X for Cygwin, but it won't work as good as on a *nix OS.

The GUI library used is awful (well, it's Motif but it looks awful), but it has a pretty nice watches window/widget.

Take a look:



Pretty nice, even more when you're dealing with pointers.

Someone could find this useful too:



Now you have seen how far a debugger front-end can go, could you imagine Code::Blocks with something like that (of course, with the nice interface of Code::Blocks :))?

First step: the widget.

Ideas, suggestions, objections, VOLUNTEERS?

(I just wanted to show you that, I have my doubts about implementing it :P)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: DDD-like watches
« Reply #1 on: January 10, 2006, 11:38:28 am »
Really interesting :D. Dammage that to work under Windows it needs Cygwin :(.

IMHO, It would be a useful addition to C::B.

Michael
 

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: DDD-like watches
« Reply #2 on: January 10, 2006, 01:25:38 pm »
ddd (data display debuger) is by far the best frontend to gdb. When you get past it's interface you can do anything that is possible with gdb. The main thing here is that it's a dedicated application that only does one thing for many many years and does it good - being a gdb frontend. I don't think that it would be possible to get the features of ddd on codeblocks (it would require the whole team to get involved with just that).
Of course since I heavily use ddd I'd like to see something like that in c::b
Life would be so much easier if we could just look at the source code.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: DDD-like watches
« Reply #3 on: January 10, 2006, 06:01:02 pm »
AFAIK, wxWidgets has some plotting functions. But I think that before considering writing a graphical front-end, we would have to do something similar with text-only. Or at least have an object framework for representing the data.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: DDD-like watches
« Reply #4 on: January 10, 2006, 06:07:19 pm »
Quote from: Ceniza
Ideas, suggestions, objections, VOLUNTEERS?

I see no reason for graphical gizmos in a debugger. Really, what do you need that for?
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: DDD-like watches
« Reply #5 on: January 10, 2006, 06:09:48 pm »
At the risk of sounding extremely stupid or ignorant... what data produced by a debugger makes sense to be displayed in a 3D area plot?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

lonesock

  • Guest
Re: DDD-like watches
« Reply #6 on: January 10, 2006, 06:48:40 pm »
I would use the graphical displays.  I do a lot with Finite Elements / other numerical methods, and very often my programming mistakes come from certain elements being skipped or computed twice, etc.  With a graphical tool to look at my data it would be easy to spot if a certain data-point is never changing or NaN or whatever.

Jonathan

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: DDD-like watches
« Reply #7 on: January 10, 2006, 10:17:24 pm »
Quote from: lord mandrav
I see no reason for graphical gizmos in a debugger. Really, what do you need that for?

It isn't a need, I just like to "visualize" things better, and it seems I'mn't alone :)

Quote from: thomas
At the risk of sounding extremely stupid or ignorant... what data produced by a debugger makes sense to be displayed in a 3D area plot?

At least for lonesock it makes sense. I just wanted to show another image of what DDD can do. Not like I'm going to use it by now :)

I was looking for a wx widget which could help in the implementation but found nothing.

There's still a lot of work to do, bugs to squash and more in the way to consider this at least "average priority", but who knows, this little thingy could become true (Code::Blocks 7.0 maybe?) :)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: DDD-like watches
« Reply #8 on: January 10, 2006, 11:08:06 pm »
I was looking for a wx widget which could help in the implementation but found nothing.
wxGLCanvas
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: DDD-like watches
« Reply #9 on: January 10, 2006, 11:31:46 pm »
wxGLCanvas? I mean the watches one, not the 3D one. Something able to draw boxes with text, arrows, and such, similar to Graphviz.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: DDD-like watches
« Reply #10 on: January 11, 2006, 12:12:25 am »
Is OGL (in wxWidgets contrib) not exactly what you want? I've never used it, but I guess that's what you need.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: DDD-like watches
« Reply #11 on: January 11, 2006, 12:15:34 am »
I don't really think OGL is what I want/need :)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: DDD-like watches
« Reply #12 on: January 11, 2006, 12:17:36 am »
But it says "draw lines, shapes, and connectors"... :)

EDIT:
Hey, wait a minute... why don't you write out SVG to a string buffer? Then you can feed that to a SVG renderer, there are a few for wxWidgets. That way, it's scaleable and printable, too, for free :)
« Last Edit: January 11, 2006, 12:19:56 am by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: DDD-like watches
« Reply #13 on: January 11, 2006, 12:34:06 am »
thomas: have you tried DDD? :)

With SVG we could make a nice looking drawing, but... I still think you're considering a widget for the plots while I'm considering a widget for the watches.

The widget is needed to implement the drawings in the first image, the one with the list.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: DDD-like watches
« Reply #14 on: January 11, 2006, 12:43:34 am »
The widget is needed to implement the drawings in the first image, the one with the list.
Yes, SVG is just fine for that. Make a big SVG canvas and give it a document which has a box here, an arrow there, and some text. Should work really nicely, and you can use all of the SVG candy like rounded boxes and transparency or gradients if you like.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."