From 5b67a989cb568341db07d4c550d9697a78d9dd99 Mon Sep 17 00:00:00 2001 From: Simon Shillaker <554768+Shillaker@users.noreply.github.com> Date: Thu, 3 Feb 2022 16:41:33 +0100 Subject: [PATCH] Add gdbinit config (#217) --- .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)