From 3a654ed959edb2ef8e5450ba004771bcff1a001a Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Thu, 14 Nov 2024 10:49:27 -0800 Subject: [PATCH] recording: track DEBUGINFOD_URLS environment variable This is handy to know in case we want to use it to find symbols after the fact with a capture. --- src/libsysprof/sysprof-recording.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libsysprof/sysprof-recording.c b/src/libsysprof/sysprof-recording.c index 35c3dbdc..57e53e7e 100644 --- a/src/libsysprof/sysprof-recording.c +++ b/src/libsysprof/sysprof-recording.c @@ -104,6 +104,7 @@ sysprof_recording_fiber (gpointer user_data) g_autoptr(DexFuture) monitor = NULL; g_autoptr(DexFuture) message = NULL; g_autoptr(GError) error = NULL; + const char *debuginfod_urls = NULL; struct utsname uts; struct sysinfo si; gint64 begin_time; @@ -189,6 +190,9 @@ sysprof_recording_fiber (gpointer user_data) add_metadata (self, "HOSTTYPE", g_getenv ("HOSTTYPE")); add_metadata (self, "OSTYPE", g_getenv ("OSTYPE")); + if ((debuginfod_urls = g_getenv ("DEBUGINFOD_URLS"))) + add_metadata (self, "DEBUGINFOD_URLS", debuginfod_urls); + /* Log information about the spawning process */ if (self->spawnable != NULL) {