News for hackers. Stuff that matters.
Re:Durin is a library for reading and writing the Dwarf debu... by zidel on Monday December 01, 2025 @05:49PM (#46114516)
One interesting thing about the dwarf format is that it is executable and Turing complete, running small programs on a virtual machine to figure out file names, line numbers and exception handling.
Re:Durin is a library for reading and writing the Dwarf debu... by lambda_foo on Monday December 01, 2025 @05:55PM (#46114593)
It's really fascinating the different little evaluators that exist in DWARF. I started writing one for the DWARF expression format (https://github.com/tmcgilchrist/durin/pull/7) that I'm integrating with a debugger and free-monad/effect handler style code to lookup the missing data to provide for the Requires* callbacks.

Then there is the line number evaluation, which I haven't started on.

Building a Debugger by Sy Brand (https://nostarch.com/building-a-debugger) is an awesome book if you want to learn more about this. It covers DWARF 4 and you build a full debugger in C++17 for Linux/x86_64. Can't recommend that book highly enough!

Re:Durin is a library for reading and writing the Dwarf debu... by zidel on Monday December 01, 2025 @06:04PM (#46114707)
And for the misuse angle there is this talk from Shmoocon 2011: https://www.youtube.com/watch?v=nLH7ytOTYto