From: Jérémie Galarneau Date: Wed, 22 May 2024 00:42:19 +0000 (+0000) Subject: vscode: export MI_XSD_PATH and LD_LIBRARY_PATH in gdb wrapper X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=503cc7c20cc196b9e8aefb8a7739d181924af178;p=lttng-tools.git vscode: export MI_XSD_PATH and LD_LIBRARY_PATH in gdb wrapper vscode fails to launch a session daemon using the libtool wrapper on machines that don't have lttng installed since the XSD can't be loaded. Export the MI_XSD_PATH to point to the file in the source tree to allow the daemon to launch. Moreover, launching the session daemon fails since it can't find liblttng-ctl.so.0. Adding the library's .libs to LD_LIBRARY_PATH works around the issue. Change-Id: I52929b858917e5a103e067e6861cbdb5172744be Signed-off-by: Jérémie Galarneau --- diff --git a/.vscode/launch.json b/.vscode/launch.json index 4541842e1..be9691232 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -38,6 +38,12 @@ { "name": "LTTNG_SESSION_CONFIG_XSD_PATH", "value": "${workspaceFolder}/src/common/" + }, + // Assumes the 64-bit consumer was built. Point to the in-tree + // binary. + { + "name": "LTTNG_CONSUMERD64_BIN", + "value": "${workspaceFolder}/src/bin/lttng-consumerd/lttng-consumerd" } ], "externalConsole": false, diff --git a/.vscode/libtool_gdb_wrapper.sh b/.vscode/libtool_gdb_wrapper.sh index 0f60c832d..37ec9e5fb 100755 --- a/.vscode/libtool_gdb_wrapper.sh +++ b/.vscode/libtool_gdb_wrapper.sh @@ -6,4 +6,7 @@ # Wrapper script to setup the environment before invoking gdb # on the in-tree binaries (under `.libs`) +CURDIR=$(dirname "$0")/ +export LD_LIBRARY_PATH="$CURDIR/../src/lib/lttng-ctl/.libs:$LD_LIBRARY_PATH" + libtool --mode=execute gdb "$@"