Backtraces for embedded Linux C and C++ programs
- Track: Embedded, Mobile and Automotive
- Room: UD2.120 (Chavanne)
- Day: Sunday
- Start: 09:00
- End: 09:25
- Video only: ud2120
- Chat: Join the conversation!
When a Python program crashes, a backtrace is printed — often enough to pinpoint and fix the issue. When a C or C++ program crashes on an embedded Linux system, however, nothing appears by default — except perhaps the dreaded “Segmentation fault” message. Unfortunately, there’s no simple --enable-backtrace option to enable human-readable backtraces at build time. Even worse, generating useful backtraces involves many subtle factors, and there’s no comprehensive resource that explains how to get them right.
This lack of clear information arises because backtraces depend on numerous variables: your hardware architecture, operating system, distribution, compiler, build configuration, and the specific tools used to unwind the stack.
In this talk, I’ll demystify how backtraces actually work and explore the key concepts behind them. I’ll also show how to leverage libunwind and minidebuginfo to obtain reliable backtraces on ARMv7 and ARMv8 systems, within the context of a Yocto-based embedded Linux distribution.
Speakers
| Mathieu Othacehe |