[glib: 1/2] meson: Add PYTHONPATH to load GDB helper module
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] meson: Add PYTHONPATH to load GDB helper module
- Date: Tue, 1 Mar 2022 11:24:21 +0000 (UTC)
commit 2bd152bfeb6ec54a122f268faa1a5b823332dc40
Author: Xavier Claessens <xavier claessens collabora com>
Date: Fri Feb 25 16:50:18 2022 -0500
meson: Add PYTHONPATH to load GDB helper module
Meson generates a gdbinit file that will automatically load glib and
gobject scripts. However that script uses a helper python module that
needs PYTHONPATH to be pointing into the right location in the source
tree to be able to find glib_gdb.py and gobject_gdb.py
glib/meson.build | 7 +++++++
gobject/meson.build | 7 +++++++
2 files changed, 14 insertions(+)
---
diff --git a/glib/meson.build b/glib/meson.build
index 6869a722d..93fa5049a 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -452,6 +452,13 @@ configure_file(
install_data('glib_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb'))
+# This is needed to make gdb find glib_gdb.py
+if meson.version().version_compare('>=0.58')
+ env = environment()
+ env.prepend('PYTHONPATH', meson.current_source_dir())
+ meson.add_devenv(env)
+endif
+
gdb_conf = configuration_data()
gdb_conf.set('datadir', glib_datadir)
# This is also used in gobject/meson.build
diff --git a/gobject/meson.build b/gobject/meson.build
index 74feb09d9..026a0351e 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -170,6 +170,13 @@ configure_file(
install: gdb_install,
)
+# This is needed to make gdb find gobject_gdb.py
+if meson.version().version_compare('>=0.58')
+ env = environment()
+ env.prepend('PYTHONPATH', meson.current_source_dir())
+ meson.add_devenv(env)
+endif
+
if enable_systemtap
gobject_stp = configure_file(input : 'gobject.stp.in',
output : '@0@.stp'.format(libgobject.full_path().split('/').get(-1)),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]