
GDB Frontend with C Pointer Visualization - mariuz
https://github.com/rohanrhu/gdb-frontend
======
jmiskovic
I'm taking it for a spin and sharing my notes as I go:

    
    
        * UI has pleasant colors, I could get used to comfort of having all relevant info in side panes
        * The gdb starts in /opt/gdbfrontend directory, would be nice if it changed to dir you executed gdbfrontent in
        * I wish I could collapse Disassembly list - I don't want to see it ever
        * Icons don't have tooltips and some are not so clear
        * "Sources" pane doesn't actually have all the sources, some appear only after I set breakpoint in previously missing file
        * Breakpoints set manually through GDB console don't show up in UI breakpoint list
        * Usual shortcuts F10, F11... for stepping over and into don't work, while gdb commands n and s work only if lower pane has focus, so interface requires more mouse clicking
        * In my specific case it doesn't detect local variables or respond to added watches (fields to right stay blank)
    

This is where I stopped using it, don't have time to debug the debugger. I
appreciate the effort and it looks like it might be extremely handy tool in
future.

~~~
ebg13
It would be more pleasant to read your post if you didn't use code formatting.
[https://imgur.com/tYH8HWy](https://imgur.com/tYH8HWy)

------
nathell
This looks like a modern-day ddd [1]. Sorely needed. (Not much by me, since I
don't do a lot of C these days, but I'd definitely use this if I did.)

[1]: [https://www.gnu.org/software/ddd/](https://www.gnu.org/software/ddd/)

~~~
lokedhs
That reminds me about that one day in at Sun back in the late 90's when I
compiled Solaris in debug mode and set up KGDB.

I was running a full Solaris kernel while anothe rmachine was running GDB and
DDD. I was able to visualise all the kernel structures in realtime. It was
significantly more usable that I would have imagined it to be.

Can you do something similar these days with Linux?

~~~
mistrial9
curious - the Sun developers I saw in the late 90s had a multi-window debugger
but the local variables Did Not Update, and had to be 'refreshed' manually; at
the same time, I had MetrwoWerks IDE Debugger on a Macintosh, and easily had
all locals, source code, stack, RAM inspection by structure and more, all
updating with every change. The Sun devs were being PAID a LOT more, yet their
tools looked primitive and the contextual knowledge to use them was much
greater..

~~~
lokedhs
I'm not sure. I wasn't working as a kernel developer. I did have to debug
stuff though to find bugs or explain certain behaviours.

I guess one reason it wasn't used much is because it was a hassle to set up,
and I think it got a bit slow when you had a lot of information displayed. I
do recall not using this setup much in practice, as just breaking into the
debugger on the machine itself was faster and easier.

You had to lot of options when it came to working on the Solaris kernel, and
the code was so easy to understand. In fact, I believe the Solaris code base
is the best C code I've ever worked with. It's a pity what happened after
Oracle took over.

------
alexhutcheson
For those who aren't aware, gdb has a curses-based 'Text User Interface'
(TUI), which can be launched using 'gdb -tui':
[https://sourceware.org/gdb/current/onlinedocs/gdb/TUI.html#T...](https://sourceware.org/gdb/current/onlinedocs/gdb/TUI.html#TUI)

The interface is surprisingly good, and it's what I recommend to new gdb users
if they aren't using an IDE. I still prefer the Emacs integration[1], but I
don't recommend that to people who aren't already experienced Emacs users.

[1]
[https://sourceware.org/gdb/current/onlinedocs/gdb/Emacs.html...](https://sourceware.org/gdb/current/onlinedocs/gdb/Emacs.html#Emacs)

~~~
shmerl
Is it better than cgdb? [https://cgdb.github.io](https://cgdb.github.io)

~~~
alexhutcheson
I haven't tried cgdb. Based on the screenshots they look pretty similar.

------
gibsjose
If you’re looking for something more lightweight in between vanilla GDB and a
full GUI frontend, I would highly recommend GDB Dashboard:
[https://github.com/cyrus-and/gdb-dashboard](https://github.com/cyrus-and/gdb-
dashboard)

It’s just a single file (replaces your ~/.gdbinit) that wraps your GDB session
with a nice TUI using the Python API. I’ve found it to be a nice middle
ground.

------
ducktective
I see it is using PyQt5. Any favorite books/tutorials/guides on learning Qt5
or PyQt5? (I'm at 1/4 of Koenig's accelerated C++ and know some python to get
my day to day script needs done)

~~~
pjmlp
"Mastering Qt 5" would be one of them.

[https://www.packtpub.com/eu/web-development/mastering-
qt-5-s...](https://www.packtpub.com/eu/web-development/mastering-qt-5-second-
edition)

~~~
ducktective
There seems to be critical reviews against Packt publications but this one is
good right? Have you read it yourself?

~~~
pjmlp
I have read it a while ago, it was kind of alright.

There aren't that many books on Qt, besides Packt ones, AFAIK.

------
testuser66
Is this any different than the debugger visualisations that other editors/IDEs
have?

Genuinely curious, because if I'm understanding this correctly, it's just
another front-end like what VSCode/Atom(probably)/CLion/Visual Studio have
been doing for years if not decades.

I guess what I'm asking is: does this do a better job than the others?

------
jstimpfle
Here is a related video, where Eskill Steenberg shows off his data debugger /
live visualisation. It's networked so can be used remotely. Very impressive
stuff.

[https://handmadedev.show/ep-13-2016/](https://handmadedev.show/ep-13-2016/)

Starts at 01:06:14

------
akerro
There is also [https://github.com/cs01/gdbgui](https://github.com/cs01/gdbgui)

~~~
looperhacks
From the project page:

> Note: This project is no longer under active development.

~~~
ktm5j
Not having active development isn't necessarily a good reason to avoid
something, since it still works perfectly well.. There are only so many
features needed in a debugger and security is not a real concern.

------
Asooka
Would be amazing if this could also integrate with a language server to
provide code browsing functionality. These days I'm using Vim's gdb
integration, which doesn't have any data visualisation features, but lets me
use all of my code browsing plugins.

~~~
philibuster
visual studio code is pretty good these days when you get the right
extensions. I've setup my projects to be debugged with gdb with vscode as the
GUI. My build system also generate a compile_commands.json to feed to clangd
[https://marketplace.visualstudio.com/items?itemName=llvm-
vs-...](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-
extensions.vscode-clangd)

Another good project that people love to hate is eclipse, if you want a GDB
powered GUI, its always worth a shot.

------
globular-toast
I did a double take on the word "extensionable". I think the word is
extensible.

------
voldacar
This looks awesome. I've wanted to make something like this for a long time
but keep putting it off. very cool

------
Doingmything123
With all of the improvements to static and run-time analysis that we see
within compilers like -fsanitize, will it ever get to the point were tools
like GDB become obsolete? It seems to me that as more work goes into this, it
will become very hard for gdb/valgrind/... to compete with the full
power/knowledge available to a compiler.

------
mijoharas
Is there any video of what this looks like and how it works?

~~~
rohanrhu
[https://www.youtube.com/watch?v=6LNR8u19x6Y](https://www.youtube.com/watch?v=6LNR8u19x6Y)

