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 readingCategory: Debugging & Memory
Layout 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 readingvtable – a way to realise polymorphism (C++)
Currently most C++ compilers use vtables to realise polymorphism. The object (obj @ 0x614c20) contains a pointer to the vtable
Continue readingCustom allocator to track std::vector
Source code Debugging Result As soon as the std::vector runs out of memory its default allocator (std::allocator<T>) allocates a new
Continue readingGarbage collection (Basics)
A garbage collector is a hidden background tool that cleans unused application memory automatically. It’s necessary for languages which aren’t
Continue reading