What is a good unix alternative to DDD (Data Display Debugger)?

26,772

Solution 1

KDbg (http://www.kdbg.org/)

Solution 2

Well I tend to use either cgdb, kgdb or ddd. (and since you can't use ddd...)

cgdb is almost like the normal gdb but it shows the code in a split window above.

Solution 3

I use Eclipse CDT in my daily basis as well as Visual Studio and it is very good tool, as good as Visual Studio. It uses all the Eclipse infrastructure to create a very good gdb graphical interface. Is like debugging Java but with C++.

If you don't want to generate eclipse projects just for debugging because you still want to use vim as an editor you might want to know that Cmake has eclipse project generator. Some links that might help you regarding this issue: 1, 2, 3

Solution 4

Have you looked at the Emacs GDB integration? It's quite good, once you work out how to use it. Here's a screenshot: http://p.blog.csdn.net/images/p_blog_csdn_net/ariesjzj/pic3.jpg.

Alternatively, there's Eclipse. It's very pretty, and seems pretty comprehensive but I haven't used it much.

Failing that, I just use GDB in TUI mode (type 'layout next' lots of times until the display looks 'prettier').

I actually really miss Visual Studio now that I'm stuck developing for Linux and embedded systems.

Solution 5

gdbgui

gdbgui is a browser-based frontend to gdb, the gnu debugger. You can add breakpoints, view stack traces, and more in C, C++, Go, and Rust!

It's perfect for beginners and experts. Simply run gdbgui from the terminal to start the gdbgui server, and a new tab will open in your browser.

https://github.com/cs01/gdbgui/raw/master/screenshots/gdbgui_animation.gif

Share:
26,772
frankster
Author by

frankster

Updated on October 24, 2020

Comments

  • frankster
    frankster over 3 years

    I am developing c on linux using vim and debugging using ddd. However I find that ddd performs very poorly at scrolling on this machine so its sometimes very frustrating to use.

    I like the way that ddd maps fairly closely to the gdb command set as this means I am free to use gdb commands when I choose, but using gdb itself is not an option as it does not do a great job of displaying the source.

    Can anybody suggest a decent alternative to ddd? I am not looking for an IDE, merely a reasonably well implemented gui facade to gdb that is free software.

  • Juan
    Juan almost 15 years
    as an additional note, the old version of Sun Studio on Linux used the gcc compiler with gdb. I don't know if it is still compatible as they now ported their compilers to Linux.
  • frankster
    frankster almost 15 years
    First impressions: The opensuse11 package is buggy and the icon it installs doesn't launch the app, but I can launch it myself from /opt/kde3/bin/kdbg. Attaching to a process forces you to type the process number instead of searching the process list for a process with the same name as the binary you just loaded
  • frankster
    frankster almost 15 years
    The variable display in KDbg is nice.
  • frankster
    frankster almost 15 years
    though on the other hand, it seems like a bit of a pain to view the values of expressions such as "Array[Index].Struct.Member"
  • frankster
    frankster almost 15 years
    its a bit annoying having to break execution in order to disable a breakpoint
  • frankster
    frankster almost 15 years
    and if you want to detach from a process it seems you have to force it by loading a different file
  • Johan
    Johan almost 15 years
    This is kind of not useful today (even thou I give you +1 for the fact that there is hope for ddd ;)
  • frankster
    frankster almost 15 years
    double clicking on a breakpoint in the breakpoint list doesn't take you to the corresponding line of code
  • frankster
    frankster almost 15 years
    Insight's attach to process window is buggy - the filter box does nothing. However at least it puts up a process list which is a slight improvement on kdbg.
  • frankster
    frankster almost 15 years
    The drop down box with a list of functions to browse to in the source is a nice touch.
  • frankster
    frankster almost 15 years
    twice brought down my x server when I attached to a process, continued the process then attempted to pause the process. I can rule Insight out.
  • frankster
    frankster almost 15 years
    From what I can see, the Intel Debugger is available with the Intel Compiler but you can only get a zero-cost license for non-commercial use.
  • frankster
    frankster almost 15 years
    Sun Studio debugger (dbxtool) is based on java so its startup is rather slow.
  • frankster
    frankster almost 15 years
    Stun Studio debugger successfully pops up a tooltip with the value when you mouseover variables of the form Array[Index].Struct.Member, which none of the other GUIs have been able to. (of course GDB can always do this with a print command but for some reason none of the GUIs have implemented support for this).
  • frankster
    frankster almost 15 years
    Overall, I like a lot of things about dbxtool but the java-lagginess is such a shame.
  • frankster
    frankster almost 15 years
    aha I didn't know about this TUI mode of gdb. Its not great but it certainly addresses to some extent my gripe about gdb not displaying the source very well.
  • frankster
    frankster almost 15 years
    having problems with dbxtool on a 64-bit environment - dbx itself will load a 64-bit executable, but when I load the executable via dbxtool, it gives an unsupported architecture error, presumably because its trying to load it into the 32-bit version of dbx
  • frankster
    frankster over 14 years
    I just type layout - it gives an error but ends up with the layout most useful to me :D
  • matiu
    matiu almost 11 years
    +1 because it works in the console. So I can record my sessions with ttyrec, and share them with byobu/screen.
  • ysap
    ysap over 10 years
    Actually, you can define a gdb session in Eclipse w/o a project. Just define the program in the "Debug Configurations..." dialog, possibly using the "C/C++ Application" configuration selection. After filling the "C/C++ Application:" entry, and possibly the "Arguments" tab, click on the "Apply" and "Debug" buttons to get to the debug perspective.
  • Brent Faust
    Brent Faust over 10 years
    No need to give up vim when using Eclipse. I use the Vrapper Eclipse plugin which gives a reasonable amount of vi goodness.
  • tuket
    tuket over 9 years
    Insight is dead. I even tried to build but I didn't succed.
  • Atif
    Atif almost 8 years
    Looks like they may have been hope in 2009, but in 2016, a DDD overhaul looks rather hopeless..
  • EvertW
    EvertW over 4 years
    ddd was built using ancient technology. Let it rest in peace. The effort of reviving it is probably greater than building a new one. And in its current form it can still be useful on very small systems.