From 20cf48052d37b7002013459112f0f93ee9773177 Mon Sep 17 00:00:00 2001 From: Eric Cousineau Date: Thu, 4 Mar 2021 17:06:47 -0500 Subject: [PATCH] Updated Debugging segfaults and hard to decipher pybind11 bugs (markdown) --- Debugging-segfaults-and-hard-to-decipher-pybind11-bugs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Debugging-segfaults-and-hard-to-decipher-pybind11-bugs.md b/Debugging-segfaults-and-hard-to-decipher-pybind11-bugs.md index 5662a2d..dcf2eba 100644 --- a/Debugging-segfaults-and-hard-to-decipher-pybind11-bugs.md +++ b/Debugging-segfaults-and-hard-to-decipher-pybind11-bugs.md @@ -47,7 +47,7 @@ def traced(func, ignoredirs=None): Usage of this could look like the following: -```sh +```py import debug import my_crazy_cool_module # Say this has bindings buried 3 levels deep. @@ -69,13 +69,13 @@ The easiest way to do this is to use a debug build w/ a debug Python interpreter Here's an example workflow of debugging a specific unittest on CPython 3.8 on Ubuntu 18.04; this assumes the following packages are installed: -``` +```sh sudo apt install cmake build-essential python3.8-dev python3.8-venv python3.8-dbg ``` Then here's an example of running a unittest with GDB: -``` +```sh cd pybind11 python3.8-dbg -m venv ./venv