aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2022-02-23 08:17:08 -0500
committerXavier Claessens <xclaesse@gmail.com>2022-02-28 09:03:27 -0500
commit30cdb2a28077d9a0364b9ef6b231927c52436a6b (patch)
tree1e4f74d9a66d43b859d1a68ef7bbb018bfc9d34c /docs/markdown
parent6fafeb13b3b115b5fddf371b6b7624801559b99f (diff)
downloadmeson-30cdb2a28077d9a0364b9ef6b231927c52436a6b.zip
meson-30cdb2a28077d9a0364b9ef6b231927c52436a6b.tar.gz
meson-30cdb2a28077d9a0364b9ef6b231927c52436a6b.tar.bz2
devenv: Setup GDB auto-load scripts
When the project instals GDB helper scripts, copy them into meson-private directory with the right tree layout and write a .gdbinit script to load them automatically.
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Commands.md7
-rw-r--r--docs/markdown/snippets/devenv.md8
2 files changed, 15 insertions, 0 deletions
diff --git a/docs/markdown/Commands.md b/docs/markdown/Commands.md
index 2623b5c..3542aa4 100644
--- a/docs/markdown/Commands.md
+++ b/docs/markdown/Commands.md
@@ -324,4 +324,11 @@ These variables are set in environment in addition to those set using `meson.add
Since *Since 0.62.0* if bash-completion scripts are being installed and the
shell is bash, they will be automatically sourced.
+Since *Since 0.62.0* when GDB helper scripts (*-gdb.py, *-gdb.gdb, and *-gdb.csm)
+are installed with a library name that matches one being built, Meson adds the
+needed auto-load commands into `<builddir>/.gdbinit` file. When running gdb from
+top build directory, that file is loaded by gdb automatically. In the case of
+python scripts that needs to load other python modules, `PYTHONPATH` may need
+to be modified using `meson.add_devenv()`.
+
{{ devenv_arguments.inc }}
diff --git a/docs/markdown/snippets/devenv.md b/docs/markdown/snippets/devenv.md
index 19a272c..1c401c1 100644
--- a/docs/markdown/snippets/devenv.md
+++ b/docs/markdown/snippets/devenv.md
@@ -8,3 +8,11 @@ and [`python.extension_module()`](Python-module.md#extension_module).
If bash-completion scripts are being installed and the shell is bash, they will
be automatically sourced.
+
+## Setup GDB auto-load for `meson devenv`
+
+When GDB helper scripts (*-gdb.py, *-gdb.gdb, and *-gdb.csm) are installed with
+a library name that matches one being built, Meson adds the needed auto-load
+commands into `<builddir>/.gdbinit` file. When running gdb from top build
+directory, that file is loaded by gdb automatically.
+