BSDCan2017 - 0722d

BSDCan 2017
The Technical BSD Conference

Samy Bahra
Day Talks #1 - 9 June - 2017-06-09
Room DMS 1160
Start time 16:00
Duration 01:00
ID 787
Event type Lecture
Track Hacking
Language used for presentation English

Debugging the debugger

Why your debugger doesn't work when you need it to

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. This talk explores how these debuggers work, how the operating system could help, what makes them fail and how they can be used more effectively.

In this presentation, we will take you on a journey to some of the darkest and most confusing pits of systems programming involving debug formats, compilers and process control. We will describe situations where debuggers have failed you, why and how they can be addressed. These failures include missing critical data, corrupted output, performance bottlenecks and more.

Even a single snapshot of application state can yield important clues that can reduce time to resolution. This ranges from the classes of instructions involved, to run-time breadcrumbs from the garbage collector or memory allocator, to the relationships of objects in application memory. We will take a tour of commonly neglected areas of application state whose exploration can greatly reduce time to resolution of common classes of bugs. Various aspects of popular debuggers such as GDB and LLDB will be analyzed, including performance and debug information handling.

Some of the worst bugs are ones that leave engineers with no visibility into application state. Perhaps a process is unable to dump core on your filesystem, or your debugger hangs extracting application state or your compiler has completely optimized out a crucial piece of information. What are the common pitfalls and how can they be resolved? We will investigate real-world situations where standard symbolic debugging techniques are insufficient or fail and how some of those situations can be mitigated.