From 44ea2beb5f7043755d1a21016f4a86d982061581 Mon Sep 17 00:00:00 2001 From: Simon Shillaker Date: Wed, 2 Feb 2022 16:55:51 +0000 Subject: [PATCH] Add gdbinit config --- .gdbinit | 3 +++ docker/faabric.dockerfile | 4 ++++ docs/development.md | 5 +++++ 3 files changed, 12 insertions(+) create mode 100644 .gdbinit diff --git a/.gdbinit b/.gdbinit new file mode 100644 index 000000000..8ae87fa19 --- /dev/null +++ b/.gdbinit @@ -0,0 +1,3 @@ + +handle SIGSEGV nostop noprint + diff --git a/docker/faabric.dockerfile b/docker/faabric.dockerfile index 69f480eb2..044bfb9d6 100644 --- a/docker/faabric.dockerfile +++ b/docker/faabric.dockerfile @@ -23,6 +23,10 @@ RUN inv dev.cmake --shared --build=Release RUN inv dev.cc faabric --shared RUN inv dev.install faabric --shared +# GDB config, allow loading repo-specific config +RUN touch /root/.gdbinit +RUN echo "set auto-load safe-path /" > /root/.gdbinit + # CLI setup ENV TERM xterm-256color SHELL ["/bin/bash", "-c"] diff --git a/docs/development.md b/docs/development.md index 533a6614c..24932631b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -68,6 +68,11 @@ pip install -r requirements.txt inv dev.cc faabric ``` +## Debugging + +Note that Faabric provides its own `.gdbinit` file which will ensure segfaults +(used in dirty tracking) aren't caught by gdb by default. + ## Testing We have some standard tests using [Catch2](https://github.com/catchorg/Catch2)