Scenario Application code Print frame script Analysis GDB session Frame 0 0x7fffffffe240: 0x0000555555554040 0x0000000300000008 0x7fffffffe250: 0x0000000000000000 0x0000000b00000000 0x7fffffffe260: 0x00007fffffffe280 0x000055555555518e
Continue readingCategory: Computer
Add prefix for shared libs location (GDB)
GDB is looking for the shared libs at specific paths. It’s possible to add a prefix to those paths. Example
Continue readingConditional breakpoints (C++)
Showcase Debugging $ g++ -g main.cpp $ gdb a.out (gdb) b main.cpp:5 if i == 5 Breakpoint 1 at 0xa24:
Continue readingRandom number generation (C++)
Let’s generate 10 integers with a uniform distribution between 1 and 6. Historic approach Only uniform distribution provided. 👎 Modern
Continue readingResolve variables with CMake
Structure cmake_example/ ├── CMakeLists.txt ├── config.hpp.in └── main.cpp Files CMakeLists.txt config.hpp.in main.cpp Execution $ cmake -S”src” -B”build” $ cmake –build
Continue readingSwitch between docker platforms (macOS)
Introduction Docker Engine … Client-server application Docker CLI Docker daemon (docker) (Docker REST API) (dockerd) Docker Desktop / OrbStack …
Continue readingBoost execution performance
Make it parallel Most machines these days have multiple cores, some even support hyper threading. If you want your code
Continue readingC++ develop container (Docker)
Docker file cpp_dev.dockerfile FROM debian:latest # Set non-interactive mode to avoid prompts during installation ENV DEBIAN_FRONTEND=noninteractive # Install necessary packages
Continue readingGit-submodule and Git-lfs
Git-submodule … allows you to include one repository inside another, keeping them as separate projects. Add a submodule to your
Continue readingForward X11 to macOS (Docker)
xsddiagram is used as an example application. Dockerfile FROM debian:bullseye-slim # Install packages RUN apt update && apt-get install -y
Continue reading