12 ms·
Seer: A GUI front end to GDB for Linux
- pvg 2y agoA mediumish discussion 2 years ago https://news.ycombinator.com/item?id=33044885 https://news.ycombinator.com/item?id=33044885
- mech422 2y agooh nice - reminds me of DDD(1) DDD was like magic first time I saw it. Oh wow - DDD is still maintained ?? :-D 1 https://en.wikipedia.org/wiki/Data_Display_Debugger https://en.wikipedia.org/wiki/Data_Display_Debugger 2 https://www.gnu.org/software/ddd/ https://www.gnu.org/software/ddd/
- j1elo 2y agoDDD was taught to me when in University, 20 years ago, and it already felt clunky, my views are now much more moderate but Motif still feels like an eyesore. Conversations over the years have shown me that DDD was a great inverse marketing tool, ironically pushing developers towards the embedded debugger UI in their favorite IDEs... despite DDD itself being indeed very powerful. But even "usefulness over aesthetics" has its limits!
- donaldihunter 2y agoYeah, I remember DDD being an incredible tool back in the day, but it was clunky even when it was new (1995). https://www.gnu.org/software/ddd/manual/pdf/ddd-paper.pdf https://www.gnu.org/software/ddd/manual/pdf/ddd-paper.pdf
- synergy20 2y agomotif does not work well with high resolution display, sadly
- anthk 2y agoCurrent DDD under the updated OpenMotif with TTF fonts can look much better than it did in the 90's and 00's, miles ahead than LessTif/former propietary Motif. It blends perfectly with EMWM where I have Liberation Sans/Mono for almost everything.
- dirkf 2y agoThere's one DDD feature that I haven't found elsewhere: its graphical representation of a struct and its contents. You can double-click on a pointer field and then it draws whatever that field pointed to, with a nice arrow connecting the two. I've found it a very powerful yet compact way to visualize the state of a program when debugging.
- jlintz 2y agoyes! this was so great in college to learn pointers and visualize linked lists
- malkia 2y agoReminds of SmallTalk / and Lisp's - https://en.wikipedia.org/wiki/Common_Lisp_Interface_Manager https://en.wikipedia.org/wiki/Common_Lisp_Interface_Manager There was even a story, that (at least for Common Lisp), you can start from almost blank state, but have an exception handler installed (that can continue), so as you go you live-edit and add pieces missing, or if code crashes change. This is all good, until nowadays, where you really want to know what's deployed in production, and not just the last stuff I've live fixed. I mean, I guess both have values tbh, but hard to pull two models like this and use... bit like - debugger or printf statements (or both!)
- bitwize 2y agoAnd it still uses Motif! Awesome!
- mark_undoio 2y agoI love that DDD has a variety of graphical visualisations built in. I always thought the ability to data structures was particularly cool. A while ago there was a project to port it to GTK3 but I think that went away. I'm glad the mainline project is still going.
- mech422 2y agoyeah - the 'data display' part was the real killer feature :-)
- jandrese 2y agoI always liked the concept with DDD, but I could never keep it from crashing more than the program I was trying to fix.
- ta988 2y agoIt is much better now.
- begriffs 2y ago> DDD is still maintained? Absolutely. I wrote about its features here https://begriffs.com/posts/2022-07-17-debugging-gdb-ddd.html https://begriffs.com/posts/2022-07-17-debugging-gdb-ddd.html Since the article was written, the maintainers fixed the issues I pointed out. No need for many of those workarounds now. Versions 3.4.0 and 3.4.1 are substantial.
- canucker2016 2y agoIs there any URL that lists what's new in v3.4.0 and v3.4.1? The DDD website ( https://www.gnu.org/software/ddd/ https://www.gnu.org/software/ddd/ ) points to the source tar.gz and the full manual, but nothing that says "What's New" in recent versions.
- JNRowe 2y agoMight not be as direct as you'd like, but all well managed¹ GNU projects ship a NEWS file in their tarball. In this case you can also read it from savannah² without fetching the tarball. ¹ https://www.gnu.org/prep/standards/standards.html#NEWS-File https://www.gnu.org/prep/standards/standards.html#NEWS-File ² https://svn.savannah.gnu.org/viewvc/ddd/trunk/doc/NEWS?view=markup https://svn.savannah.gnu.org/viewvc/ddd/trunk/doc/NEWS?view=...
- anonymousiam 2y agoDDD is great. I still use it, but I am a fossil. I sought out DDD when I was looking for something similar to dbxtool, which I used on the early Sun Microsystems machines. Folks today are spoiled with things such as Source Level Debugging.
- deleted 2y ago[deleted]
- slashdave 2y agoComing from VMS at the time, I was confused why there was no decent full screen interface to gdb. DDD was such a disappointment in this regard.
- Jach 2y agoFor me it reminds me of Insight, which was my favorite GDB front-end and worked great on Windows back in the cygwin era. Unfortunately it's definitely no longer maintained. https://sourceware.org/insight/screenshots.php https://sourceware.org/insight/screenshots.php (Well, I guess someone did rescue it to put it on github and do some work: https://github.com/antony-jr/insight https://github.com/antony-jr/insight )
- tekknolagi 2y agoSee also https://github.com/nakst/gf https://github.com/nakst/gf
- hexomancer 2y agoSlightly off topic but I think it is a good place to ask: One of the few things from windows that I miss when using linux is the debugging experience with visual studio (not code). When debugging a medium-sized C++ project on windows, the launch of the debug build is pretty fast and stepping over lines is almost instantaneous. On linux launching the executable using gdb takes like 10 seconds loading modules and stepping over each line takes like half a second which I think is intolerable (lldb is even worse). Yet I don't see people complaining about this online very much. Am I missing something? E.g. is there a compiler flag that speeds up debug launch time and step speed that I am not using?
- PhilipRoman 2y agoHaven't observed anything like that. Even with remote gdbserver on a low power embeddeded device, stepping has always been instant for me. Could be a C++ vs C thing. The only thing which takes time is debuginfod downloads.
- hexomancer 2y agoHow large is your code base? I am talking about 100K+ LOC with many complex dependencies (mainly Qt modules).
- f1shy 2y ago2 Mio LOC, no problem here. Sounds like maybe you have reverse-debugging enabled? I mean target record or target record-full? Anyway, I seldom do step-by-step. I typically work with dprintf.
- hexomancer 2y agoNope, with reverse-debugging enabled it will be insanely slow, not something that you can miss. I am curious does your project have large external dependencies or is it self-contained.
- wizzledonker 2y ago
- j1elo 2y agoThis is a Qt UI for GDB. There's also gdbgui that I know of, a web-based UI for GDB: https://www.gdbgui.com/ https://www.gdbgui.com/ Always good to see more movement in the debug tooling
- lacedeconstruct 2y agoVscode also has an ok gdb frontend, very nice when you are debugging embedded microcontrollers
- dzaima 2y agoTo add on to the pile of more GDB GUIs, here's one I've made: https://github.com/dzaima/grr https://github.com/dzaima/grr. Though it's still got a fair bit of missing features that may be essential for some uses (due to my usage being largely assembly-level, which doesn't need too many fancy features).
- halb 2y agoSpeaking of web-based debuggers, I recenty created a similar project but focused on x86-64 assembly debugging: https://github.com/robalb/x86-64-playground https://github.com/robalb/x86-64-playground
- hulitu 2y agoAnd DDD. A Motif front end.
- havblue 2y agoI like how gdb with qt creator works without any complicated configuration. You click on some breakpoints then hit play and the ide takes care of the rest.
- alexhutcheson 2y agoGDB also has a built-in text user interface (TUI) that is surprisingly easy to use[1]. It even supports mouse interaction. [1] https://sourceware.org/gdb/current/onlinedocs/gdb.html/TUI.html https://sourceware.org/gdb/current/onlinedocs/gdb.html/TUI.h...
- genpfault 2y agoOnly works if GDB has been built with TUI support, sadly :(
- cyberpunk 2y ago… If you are debugging c code surely you’re able to compile a debugger with whatever options you want?
- rty32 2y agoIn theory, yes, but in practice, people who know how to compile gdb is a small subset of people who need to debug c code. Not to mention that it actually takes extra time to do so, when people are used to debug Python/JavaScript/Go code with one single click these days.
- Gormo 2y agoJust grabbed the source, and it's a pretty bog standard ./configure ; make. Simple build instructions in the readme. Not sure this is a daunting challenge for any even moderately skilled developer.
- desdenova 2y agoMost people who use C nowadays are students, not "moderately skilled developers". Students barely know how to manually put together a Makefile.
- 2y ago
- rkharsan64 2y agoOn a general note, I would recommend any new (and experienced!) programmers to master the debugging tools of their ecosystem. I've seen countless experienced developers use printf-based debugging and waste hourse debugging something which could've been easily figured out by setting a breakpoint and stepping through your code. This is also a good way to understand code you're unfamiliar with. This is one area where I believe a GUI tool is so much better: I can hover over variable names to view their values, expand and collapse parts of a nested structure, edit values easily, and follow execution in the same environment I write my code in. Sure, it doesn't help much for some scenarios (one I've heard people mention is multithreaded code, where logs are better?), but for most people it's not that far from a superpower.
- VyseofArcadia 2y agoBut also, experienced programmers should never forget their printf debugging roots. I was debugging something earlier this week that was hit like a hundred times in a tight loop. After the first dozen or so times I told gdb to continue, I realized, wait, this will be faster if I just fprintf some relevant information to a file. Sure enough the file pointed me in the right direction, and I was able to go back and get fancy with "disp" and "cond" and hit that breakpoint only when I needed to.
- mark_undoio 2y agoYou could also use GDB's Dynamic Printf (https://sourceware.org/gdb/current/onlinedocs/gdb.html/Dynamic-Printf.html https://sourceware.org/gdb/current/onlinedocs/gdb.html/Dynam...) to do the logging directly from GDB. Essentially you set it like a breakpoint (attaching a printf style string to a code location) and then just "continue" until you've gathered what you want.
- VyseofArcadia 2y agoOh sweet. I didn't know about that. I will be adding that to my toolbox.
- 2y ago
- w4rh4wk5 2y agoAnyone has experience with this and can compare it to kdbg?
- badsectoracula 2y agoI built it and tried it out a bit with Godot on Linux. It seems OK (the UI is a bit on the "- how many widgets do you want? - yes" side), but also a bit janky. Trying to change the font for the editor didn't work, hovering over a variable to see its value either does nothing (but there is a sub-second cursor change that indicates something is supposed to happen) or it shows an error from GDB about trying to use an expression with a type or keyword (so there was an intent to show a value on a tooltip, it is just broken) - doubleclicking on a variable does add it in some panel with its current value and a timestamp, so the functionality for reading values/expressions from the UI is there too, just not done in the same way as the tooltips. If polished a bit it could be useful, though from all the frontends i've tried the one i disliked the least (none are great) is Gede[0] (which i just noticed had a new release a few hours ago) as it has a very simple and straightforward UI and while it doesn't expose much functionality, what exposes seem to work fine without bugs. [0] https://gede.dexar.se/ https://gede.dexar.se/
- jwrallie 2y ago> it has a very simple and straightforward UI and while it doesn't expose much functionality, what exposes seem to work fine without bugs. Nice one, I will add it to my notes to use it next time I need debugging. The least thing I want when looking for a bug in my own code is to have to deal with bugs in the debugging tools.
- epasveer 2y agoHi, Seergdb author here. Thanks for your honest review. Can you explain more about not being able to set the editor font? My tests show that as working. Make sure to "Save Configuration..." to make things permanent. Also, for the "show variable value on hover", I'll test it. Can you (or others) create an issue on my github page for any bugs or feature requests? Thanks.
- badsectoracula 2y agoI submitted a bug report for the font: https://github.com/epasveer/seer/issues/265 https://github.com/epasveer/seer/issues/265
- nurettin 2y agoQt GUI itself can use gdb/ldb and display a fair amount of data structures from the standard library. Note that gdb is also scriptable with python, so you can easily register your own printers.
- glitchc 2y agoeclipse-cdt includes a GDB integrated debugger UI for C and C++ since forever. What's new here?
- einpoklum 2y agoEclipse CDT is a whole IDE; is rather complex, and one might even say convoluted; and is Java based. Seer is none of these things. Of course - it's not like a GDB GUI is a novelty in itself, there are quite a few. But a GDB-GUI-only utility is a meaningful and important niche to consider.
- howtofly 2y agoI've used classic eclipse-cdt for over a decade until it cannot keep up with post-C++14 standards. It seems that it recently regains activity with the introduction of https://github.com/ghentschke/eclipse-cdt-lsp https://github.com/ghentschke/eclipse-cdt-lsp
- VyseofArcadia 2y agoFor the Emacs users in the crowd, GUD is a pretty great GDB integration.
- cherryteastain 2y agolsp-mode+dap-mode also work well but requires some manual fiddling with launch.json files
- alexhutcheson 2y agoI prefer the GDB Graphical Interface in Emacs[1] (M-x gdb), rather than the more basic integration via GUD[2] (M-x gud-gdb). I’ve had to switch to GUD to run lldb recently, and I miss having dedicated windows that show breakpoints, threads, the current stack, etc. The one nice thing about GUD is that the interface is consistent across debuggers, so I don’t need to refresh myself on the keyboard shortcuts when switching between debugging Python with pdb and C++ with lldb. [1] https://www.gnu.org/software/emacs/manual/html_node/emacs/GDB-Graphical-Interface.html https://www.gnu.org/software/emacs/manual/html_node/emacs/GD... [2] https://www.gnu.org/software/emacs/manual/html_node/emacs/Starting-GUD.html https://www.gnu.org/software/emacs/manual/html_node/emacs/St...
- seanw444 2y agoEver since the advent of LSP, Emacs has felt superior to everything else. I have no reason to leave it. Especially once they made it faster with native comp. Like why should I keep trying this month's new editor with a couple new gimmicky features, when I can just pop a plugin onto Emacs that adds that exact feature set, while maintaining everything else how I like it. I first really got into coding when Atom was a thing, and then that died off and became VS Code and I was pretty sad about it, because while VS Code is good, it doesn't follow the same philosophy as Atom. But then I took the time to learn Emacs ~4 years ago, and nothing new ever comes close to convincing me it's outdated tech that I need to move on from. That was a random rant, but I'm just really appreciate Emacs, and I'm glad it's stuck around.
- VyseofArcadia 2y agoEven before the dawn of the LSP era, Emacs was pretty great with ctags.
- kombine 2y agoWhen I used to program in C++ on Linux 10+ years ago, I used Qt Creator which has a built-in debugger (GDB frontend). It worked great and I don't see a reason to use anything else for C++ [and Qt].
- cassepipe 2y agoAfter trying many frontends for gdb I find that the TUI is the best. You just need to know about Ctrl + L to redraw if your program is printing stuff because the interface then become garbled. I just put : layout src set confirm off in my $XDG_CONFIG_HOME/gdb/gdbinit
- CarpaDorada 2y agoI like a colored prompt with set prompt \001\033[01;36m\002(gdb)\001\033[0m\002 and I save history with set history save on set history size 500000 set history filename ~/.cache/gdb/history
- cassepipe 2y agoI like to do that as well. Just want to keep it short :) Also I use vim mode for bash and since it's in .inputrc I also have a vim mode in gdb which I like a lot even though it's as good as zsh's
- DSMan195276 2y agoI've used "gdb-dashboard" a lot, would recommend it. It's similar to the TUI (though I haven't used the TUI much), but you can pick and choose to display a large variety of information and the colors make the output much easier to read. You can also make the dashboard display on another or across multiple terminals, letting you create a much nicer window layout. I've scripted this up with tmux before to have it automatically create the terminal layout and connect them to gdb, you can create really nice layouts that way (though it can be a lot of effort).
- skirge 2y agogef has tmux support so program's output goes to other tmux pane
- EasyMark 2y agoctrl+l is a must know for TUI stuff, including when vim messes up. that fixed so many mysterious "crashes" for me after I found out about it.
- reacweb 2y agoI sometimes need to use gdb to investigate bugs in C or Ada, but it is not my main activity. As a result I will not invest days to setup a debugging environment that I will not remember how to use 6 month later. My solution: I use emacs and have a short note with instructions: M-x gdb -i=mi exe_full_name -p 29123 M-x gdb-many-windows set follow-fork-mode child
- alfiedotwtf 2y agoDebugger vs printf: Has anyone found a reliable way to use a debugger when you have a) multi-process b) multi-threaded c) async d) timeouts? I would love to use a debugger but printf and logs “just work”
- fisf 2y agoGDB can do a, b, c (async Code is not really special?). d is going to be tricky and really depends.
- slashdave 2y agoThe syntax is clunky, but watchpoints can do what you want. https://ftp.gnu.org/old-gnu/Manuals/gdb/html_mono/gdb.html#SEC30 https://ftp.gnu.org/old-gnu/Manuals/gdb/html_mono/gdb.html#S...
- Mr-Frog 2y agoI used GDB to debug contributions to the ION Delay-Tolerant-Networking stack, which is composed of dozens of processes. After some practice it became super easy to attach GDB instances to several running processes and watch the C structs be passed between them.
- alfiedotwtf 2y agoThanks to all the replies… ok, looks like I’m going to have another go at debugging!
- malkia 2y agoIn case you are in Windows, and connected to Linux and/or using WSL, you can also use WinDBG/VisualStudio to debug (remotely) Linux processes!
- dgfitz 2y agoAs long as you have gdbserver running on the remote end, no?
- asyx 2y agoThis is usually not how wsl stuff is implemented. Usually applications set up the Windows to WSL communication themselves including Microsoft products. Might be different in this case of course but then the experience would be a lot less smooth than what Microsoft themselves set as the default with the VSCode remote extension.
- dgfitz 2y agoI keyed off “Linux and/or wsl” specifically. I didn’t know wsl had that interoperability cooked in, I would have assumed the vm still needed gdbserver running in order to connect for a “remote” debug session.
- shmerl 2y agoThis combo works well for me: neovim + nvim-dap + nvim-dap-ui + gdb (with native DAP protocol support).
- skirge 2y agopwndbg, gef, edb
- levzettelin 2y agoIs this using vscode's DAP under the hood?
- epasveer 2y agoNo it is not. It's using gdb's "mi" mode.
- arunc 2y agoLong time gdb TUI user, migrated to VSCode recently. Haven't looked back. Occasionally I do use TUI to look at the disassembly.
- sourcepluck 2y agoThe GNU project (and RMS) seem to get a lot of meme-ridicule, but GDB is a powerhouse. I've only had occasion to mess with it a little, but it seems to have had such a huge impact on people's development work over the years.
- pipes 2y agoGenuine question what does gnu get ridiculed for?
- sourcepluck 2y agoThe GNU/Linux copypasta thing which is all over reddit all the time, for example. Saying the software is "bloated" is another trope. Thirdly, a suggestion that it (GNU, free software) is all very impractical or "backward". I guess in general a feeling that it's not "cool" or "hip", maybe? I don't know, it seems very common to me. Have you not seen anything like that?
- spamatica 2y agoI must be checking the wrong forums. Never seen it.
- sourcepluck 2y agoOk, that's interesting to hear. More reason to spend (even) less time on Reddit and Youtube, I suppose, which is probably where I've been over-exposed to these sorts of points.
- pipes 2y agoPeople on Reddit have call bin utils and core utils bloated? I sort of assumed we all just took those for granted as rock solid and the reason that we can have a free Unix operating system. Huh. Maybe I'm wrong though. What subreddits are saying this? Again, genuine question, I think I must be getting old!