1. Get FlameGraph git clone https://github.com/brendangregg/FlameGraph It’s a tool from Brendan Gregg. 2. Build the app $ g++ main.cpp -g
Continue readingCategory: Debugging & Memory
Pretty printer – Own type
Example code Without pretty printer (gdb) b 29 (gdb) r Breakpoint 1, main () at main.cpp:29 29 return 0; (gdb)
Continue readingStack unwinding
Mechanism 1. Frame pointers … the old default way Frame pointers are enabled by default. Strong optimization (“-O2”, “-O3”) will
Continue readingLayout of std::string (libstdc++)
Source code Analysis $ g++ –version g++ (Ubuntu 13.2.0-4ubuntu3) 13.2.0 $ g++ main.cpp -g $ gdb a.out (gdb) b 7
Continue readingLayout of std:set (libstdc++)
Source code Analysis $ g++ –version g++ (Ubuntu 13.2.0-4ubuntu3) 13.2.0 $ g++ main.cpp -g $ gdb a.out (gdb) b 6
Continue readingLayout of std::unordered_set (libstdc++)
Layout The meta element on the stack consumes 7 words (56 Byte on x64, 28 Byte on x86). Each node
Continue readingLayout of std:deque (libstdc++)
Layout The meta element on the stack consumes 10 words (80 Byte on x64, 40 Byte on x86). Each chunk
Continue readingAdding debug symbols to coredump
Let’s assume you have a coredump from an embedded device and you want to analyse it on your local machine.
Continue readingAnalyse reproducable stability issues
The following list contains a few ways to find the root cause for a stability issue. Rebuild with debug symbols
Continue readingEasy coredump example (Apport, GDB)
Setup apport Source code Coredump analysis Issue: player hasn’t been initialized before calling play().
Continue reading