7 ms·
GDB Frontend with C Pointer Visualization
- nathell 7y agoThis 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/
- pjmlp 7y agoOr to go more into the past, a modern day Zortech C++ debugger. I still make use of DDD, one of the debuggers that made my UNIX development experience more enjoyable (vs PC/Mac tooling).
- kccqzy 7y agoWhat prevents you from using DDD on a PC or Mac though? You may need to install an X server, but you should still be able to run it.
- pjmlp 7y agoMy point was that UNIX tooling did not match PC and Mac IDE based tooling and DDD helped to make it less painful. Nowadays I focus on Apple, Microsoft, Oracle and Google platforms and languages, so DDD isn't something I miss.
- acqq 7y agoWhat I don't understand with this "modernity" is these "black background shimmery text" themes. Because that's what we had in bad old days before the monitors were able to show pixels -- the text consoles could actually show only text and the technology used was too poor to have nice pale background and black letters. But why would somebody want this on the modern displays, except because he does that instead of properly adjusting the background light or because "the real cool guys look at black screens" is beyond me. Seriously, the displays aren't cheap eighties displays anymore. And even then the expensive ones already looked much better by default than these "modern" themes now. /end of the old guy's lawn rant Otherwise, I definitely like every debugging tool that tries to have a good GUI.
- pjmlp 7y agoBasically that is how I feel when I see HD colour screens being used to organize XTerms, similar to the IBM XWindows terminals I got to use in 1994.
- gpderetta 7y agoI have tried to use a lighter background because apparently "that's the correct thing". After experiencing significant eye fatigue I switched back to dark blue.
- dragonwriter 7y ago> What I don't understand with this "modernity" is these "black background shimmery text" themes. Because we're mostly using emissive displays, and it turns out that trying to imitate what works on paper on an emissive display sucks for long term use (though it looks pretty at a glance, and if you are composing things for print WYSIWYG may be more important than what is most comfortable on the screen.) We tried light themes as the almost invariable rule for the first several decades of GUIs, but recently got over it. (Light backgrounds are awesome on reflective media, and if eInk was cheap and fast enough to use for primary monitors for coding we’d do that.)
- acqq 7y ago> Because we're mostly using emissive displays, and it turns out that trying to imitate what works on paper on an emissive display sucks for long term use I claim it’s not true. If one would measure The light flux of my screen I’m sure it wouldn’t be higher than that of the paper when reading in good light conditions. I claim that it’s dependent of how one configures his display.
- scoutt 7y agoEmitting light != reflecting light. I used to battle too against "dark modes". But I was forced to use VSCode for one project (since a couple of months), and I have to say that I became so used to it that now I want to use "dark mode" everywhere I can. Unfortunately IDEs for embedded like KEIL uVision will never get such feature, and now it's a pain to go back to white background.
- t3lp3r10n 7y agoI love the ability of ddd to plot 1d and 2d arrays in gnuplot, while you debug, updating the plot after each next instruction. Really handy for numerical codes. I have not found yet another tool with the same functionality. The python calls from gdb allows to do something similar but does not update automatically and you have to use much more code
- lokedhs 7y agoThat 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?
- agapon 7y agoOf course.
- mistrial9 7y agocurious - 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 7y agoI'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.
- pjmlp 7y agoExactly my kind of experience learning UNIX, while coming from Amiga/PC/Mac IDE world, back in those days.
- ktm5j 7y ago
- Asooka 7y agoWould 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.
- stargrazer 7y agocgdb probably gets you part way there. you can view code source in the upper half while stepping your code in the lower half.
- philibuster 7y agovisual 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-code-extensions.vscode-clangd https://marketplace.visualstudio.com/items?itemName=llvm-vs-... Another good project that people love to hate is eclipse, if you want a GDB powered GUI, its always worth a shot.
- testuser66 7y agoIs 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?
- jmiskovic 7y agoI'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 7y agoIt would be more pleasant to read your post if you didn't use code formatting. https://imgur.com/tYH8HWy https://imgur.com/tYH8HWy
- rohanrhu 7y agoThank you for your feedback. You can look this: https://github.com/rohanrhu/gdb-frontend#gdb-related-issues-and-tips https://github.com/rohanrhu/gdb-frontend#gdb-related-issues-... I will implement adding additional folders to sources. You can check this demo: https://www.youtube.com/watch?v=6LNR8u19x6Y https://www.youtube.com/watch?v=6LNR8u19x6Y If something is wrong for you, you can create an issue on Github. You can set breakpoints via clicking line numbers. I did not implemented shortcuts yet. :)
- ducktective 7y agoI 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 7y ago"Mastering Qt 5" would be one of them. https://www.packtpub.com/eu/web-development/mastering-qt-5-second-edition https://www.packtpub.com/eu/web-development/mastering-qt-5-s...
- ducktective 7y agoThere seems to be critical reviews against Packt publications but this one is good right? Have you read it yourself?
- pjmlp 7y agoI have read it a while ago, it was kind of alright. There aren't that many books on Qt, besides Packt ones, AFAIK.
- akerro 7y agoThere is also https://github.com/cs01/gdbgui https://github.com/cs01/gdbgui
- looperhacks 7y agoFrom the project page: > Note: This project is no longer under active development.
- ktm5j 7y agoNot 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.
- gibsjose 7y agoIf 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.
- globular-toast 7y agoI did a double take on the word "extensionable". I think the word is extensible.
- mijoharas 7y agoIs there any video of what this looks like and how it works?
- rohanrhu 7y agohttps://www.youtube.com/watch?v=6LNR8u19x6Y https://www.youtube.com/watch?v=6LNR8u19x6Y
- alexhutcheson 7y agoFor 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#TUI https://sourceware.org/gdb/current/onlinedocs/gdb/TUI.html#T... 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#Emacs https://sourceware.org/gdb/current/onlinedocs/gdb/Emacs.html...
- abhgh 7y agoSeconding TUI. Pretty solid. In fact if you need a better debugger than that I see no reason as to not jump to a good IDE ... no other middle ground required.
- shmerl 7y agoIs it better than cgdb? https://cgdb.github.io https://cgdb.github.io
- alexhutcheson 7y agoI haven't tried cgdb. Based on the screenshots they look pretty similar.
- jstimpfle 7y agoHere 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
- Doingmything123 7y agoWith 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.
- voldacar 7y agoThis looks awesome. I've wanted to make something like this for a long time but keep putting it off. very cool