4 ms·
Demystifying Debuggers
- captn3m0 1y agoRelated: https://nostarch.com/building-a-debugger https://nostarch.com/building-a-debugger is close to publication (currently in Early Access) and covers building a debugger for x64.
- fileeditview 1y agoI have bought the book months back and I think I recently received an email that the final version was released. Anyways I can recommend it even though I am not finished with it yet.
- remexre 1y agoCould you check what version of DWARF it covers?
- ddelnano 1y agoIt covers version 4, but it explains differences with v5 as they come up.
- remexre 1y agoOkay, thanks!
- ddelnano 1y agoEven if you have experience with DWARF, I think you will learn something new from the book. I work on CNCF Pixie, which uses DWARF for eBPF uprobes and dynamic instrumentation. While I understood how our project uses DWARF, the book made many details much clearer for me.
- thasso 1y agoIf you are interested in debuggers, there was a post series by Sy Brand a few years back: https://blog.tartanllama.xyz/writing-a-linux-debugger-setup/ https://blog.tartanllama.xyz/writing-a-linux-debugger-setup/ Eli Bendersky also wrote about debuggers (I think his post is a great place to start): https://eli.thegreenplace.net/2011/01/23/how-debuggers-work-part-1 https://eli.thegreenplace.net/2011/01/23/how-debuggers-work-... I was fascinated with debuggers a while back exactly because they were so mysterious to me. I then wrote a ptrace debugger myself [1]. It features pretty simple implementations of the most common stuff you would expect in a debugger. Though I made the grave mistake of formatting all the code in GNU style. [1]: https://github.com/thass0/spray/tree/main/src https://github.com/thass0/spray/tree/main/src
- Rochus 1y agoAnd there is a brand new book with more than 700 pages about how to build a debugger by the same Author with a lot of additional information (see https://nostarch.com/building-a-debugger https://nostarch.com/building-a-debugger); I recently bought it and can highly recommend it.
- nyarlathotep_ 1y agoIt's really top-shelf. Haven't enjoyed a book of this kind since 'Crafting Interpreters.' There's added bonuses too--the author evidently is quite a skilled C++ programmer, so there's all sorts of little modern-cppisms in there that I was ignorant of as someone that's only ever written the language as a hobbyist.
- ddelnano 1y agoAlso second that the book is a fantastic read. I work in the eBPF profiling space (on CNCF Pixie) and this has helped me understand DWARF concepts that I previously took at face value in our project's implementation.
- apples_oranges 1y agoVery interesting topic. Once you know how they work, the next fun thing is writing code that can detect or prevent debugging (and thus circumventing your DRM or copy protection..) ;)
- mdaniel 1y agoRelevant: Denuvo Analysis - https://news.ycombinator.com/item?id=44226406 https://news.ycombinator.com/item?id=44226406 - Jun, 2025 (136 comments)
- furkansahin 1y agoAmazing! I'll follow. For what it's worth, I owe my career to the Eclipse debugger. At some point I started using it so much that my friends started to call me "debugger". I find writing code together with a debugger extremely educating.
- wiz21c 1y agoI've used debuggers now and then. What's the state of the art nowadays (in terms of cool functionalities) ? (too lazy to ggl or gpt it)
- zeusk 1y agoI've used kd/windbg at Microsoft, lldb at Apple, gdb at Intel; WinDbg(Next) and kd are still my absolute favorite. Coolest feature of windbg is time travel debugging - https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/time-travel-debugging-replay https://learn.microsoft.com/en-us/windows-hardware/drivers/d...
- flysand7 1y agoRemedyBG might also be worth looking at. It is my go to debugger that I've used on Windows and it's made to look and feel like the debugger that comes with Visual Studio, except that it works way faster and you can hold the "Go to next line" key and see the watch window update in real time. Unfortunately you have to pay for it and it doesn't work on linux, but oh well.
- nh23423fefe 1y agoyeah, windbg pretty amazing. loved writing debugger scripts to do repros and the state just right
- gregthelaw 1y agoIf you'll excuse the shameless self promotion, I gave a talk at C++Now last year on how time travel debuggers work: https://www.youtube.com/watch?v=NiGzdv84iDE https://www.youtube.com/watch?v=NiGzdv84iDE (Warning: contains me trying to play Doom :)
- wiz21c 1y agocool, never heard of windbg, looks real good
- tilne 1y ago> But perhaps most importantly, debuggers are an intricate piece of the puzzle of the design of a development platform—a future I become more interested in every day, given the undeniable decay infecting modern computing devices and their software ecosystems. I agree with this sentiment, yet still I’m wondering if it’s fully justified. There has never been more bad software than right now, but there has never been more good software either, no? It’s not super relevant to the main contents of the article. Just a bit that caught my attention with regards to how it made me think.
- indy 1y agoThinking selfishly, the absolute quantity of good/bad software isn't as important as the software you have to interact with on a day-to-day basis. Good software is invisible and under-appreciated, you use it for it's purpose and move on, bad software really sticks out.
- tilne 1y agoGood point. The amount of bad software I’m forced to interact with regularly has gone up, mostly because there’s so many systems cobbled together in workflows now.
- jxjnskkzxxhx 1y ago> there has never been more good software Right. It's incredible that something like Linux is free. For a more recent example, look at Vs code. An even more recent example, look at how many open weight llms there are out there.
- tilne 1y agoYeah vs code was one of the first examples I thought of as well. It has its own set of issues for sure, but even as a former vim fanatic it’s amazing from both a default experience perspective and that of a power user.
- bigstrat2003 1y agoI definitely would not call VS Code good software, at least not overall. It's good in that it's not buggy, but it uses an absurdly high amount of system resources without any actual benefit. It is not ok that just to open a handful of small text files, it uses 1-2 GB of memory.
- HexDecOctBin 1y agoRelated: Ryan is the lead developer behind Epic Games's raddebugger. https://github.com/EpicGamesExt/raddebugger/ https://github.com/EpicGamesExt/raddebugger/
- brettermeier 1y agoArticle doesn't mentoin what RAD actually means, does someone know?