Backtrace

Tag: dwarf

Compile Once Debug Twice: Picking a Compiler for Debuggability (1/3)

Have you ever had an assert get triggered only to result in a useless core dump with missing variable information or an invalid callstack? Common factors that go into selecting a C or C++ compiler are: availability, correctness, compilation speed and application performance. A factor that is often neglected is debug information quality, which symbolic debuggers use to reconcile application executable state to the source-code form that is familiar to most software engineers. When production builds of an application fail, the level of access to program state directly impacts the ability for a software engineer to investigate and fix a bug. If a compiler has optimized out a variable or is unable to express to a symbolic debugger how to reconstruct the value of a variable, the engineer’s investigation process is significantly impacted. Either the engineer has to attempt to recreate the problem, iterate through speculative fixes or attempt to perform prohibitively expensive debugging, such as reconstructing program state through executable code analysis.

Debug information quality is in fact not proportionally related to the quality of the generated executable code and wildly varies from compiler to compiler. This blog post compares debug information quality between two popular compilers: gcc and clang. In this blog post, we will introduce the topic of optimization and highlight examples of their impact on debuggability. This blog post is part of a longer series, in the next blog post we’ll do finer grained analysis directly comparing gcc and clang in real world and synthetic programs.

Read More

CPPCast Guest Appearance

Our CEO, Abel Mathew, did a guest appearance at the end of last year on CPPCast. CPPCast is a podcast for C++ devs by C++ devs (hosts Rob Irving and Jason Turner). Rob, Jason, and Abel talk about C++ issues and items such as Zap CC, Conan joining JFrog, and how developers use C++. Abel also… Read More

Building a Go Debugger

Earlier this year we published a post titled Implementing A Debugger: The Fundamentals. This post gave an overview of debuggers, what they do, and how they work. In today’s post, we build upon this knowledge and talk about our journey of extending Backtrace’s debugger to support Go. Intro If you have the time and haven’t… Read More

Implementing a Debugger: The Fundamentals

This is the first of a two-part series describing the implementation of a generic debugging tool. Part one covers the core internals of a debugger; part two focuses on extending a debugger to support a specific programming language — Go. Implementing a debugging tool may seem like a monumental task. gdb, one of the most… Read More

Symbolic Debugging with DWARF

Symbolic debuggers are one of the most important tools in the programmer’s toolkit, but also one of the most overlooked pieces of technology. They have to work in some of the harshest conditions, supporting a huge set of programming languages and aggressive transformations by compilers. What makes them work? And when don’t they work? In… Read More