devenv: Fix path handling for gdb support

And enable gdb support only when gdb is avalaible
This commit is contained in:
Thibault Saunier 2020-01-14 20:02:20 -03:00 committed by Nirbheek Chauhan
parent 2f11c43f49
commit 7d08aef9ed

View file

@ -137,12 +137,17 @@ def get_wine_subprocess_env(options, env):
return env return env
def setup_gdb(options): def setup_gdb(options):
bdir = os.path.realpath(options.builddir)
python_paths = set() python_paths = set()
if not shutil.which('gdb'):
return python_paths
bdir = os.path.realpath(options.builddir)
for libpath, gdb_path in [ for libpath, gdb_path in [
("subprojects/gstreamer/gst/", "subprojects/gstreamer/libs/gst/helpers/"), (os.path.join("subprojects", "gstreamer", "gst"),
("subprojects/glib/gobject", None), os.path.join("subprojects", "gstreamer", "libs", "gst", "helpers")),
("subprojects/glib/glib", None)]: (os.path.join("subprojects", "glib", "gobject"), None),
(os.path.join("subprojects", "glib", "glib"), None)]:
if not gdb_path: if not gdb_path:
gdb_path = libpath gdb_path = libpath