Pernosco Blog

New features in Linux 6.10 contributed by Pernosco

The Linux 6.10 kernel release contains two new features in the perf event subsystem contributed by Pernosco. These features are intended to benefit rr (and thus Pernosco), but they also have broader applications if adopted by other software. In this blog post I will discuss what we added, why it benefits rr, and the broader applications it could have.

More...

ELF symbol interposition and RTLD_LOCAL

You may be familiar with "the LD_PRELOAD trick". This "trick" is used to implement things like heaptrack. By interposing a third library between an application and libc's malloc/free you can track the state of the heap and recognize errors like double frees and memory leaks. But this doesn't work for libraries loaded with RTLD_LOCAL, which is the default behavior of dlopen. Why not? Let's look at how this sort of linking works normally first, and then we can figure out why it goes wrong with RTLD_LOCAL.

More...

Shrink Your Compile Times With Split DWARF

What if you could reduce the time it takes to link your program by 25%, reduce the memory it takes to link your program by 40%, and reduce the size of the binary by 50%, all by changing a compiler flag? That's the power of "split DWARF", a compiler and debugger feature that uses a new format for the DWARF debugging information that's specifically designed to reduce the work the linker is required to do. Let's dive into how it works and what is required for you to benefit from it.

More...

Automatic Downcasting: How Does It Work?

Many programming languages include mechanisms for dynamic polymorphism. These pose challenges for debuggers, because viewing only fields from the declared type of a variable may not be particularly useful. Automatically deducing the most-"derived" type and downcasting to it presents the entire object to developers and makes debugging code that uses dynamic polymorphism much more pleasant. Our Pernosco Omniscient Debugger automatically downcasts types that use dynamic polymorphism in supported languages (C++, Rust, and Ada). You might also be familiar with this technique in gdb via the set print object on command. But how is it actually implemented?

More...

Making Debuggers Sad: C++ Identifier Canonicalization

More...

Older Posts →