From c1ae3ad9f42d510650f972671fcb0df0c3aa8388 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 14 Apr 2025 18:53:36 -0400 Subject: Remap source information in debugging info --- src/tomo.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/tomo.c b/src/tomo.c index 523e0b9d..61f2ed3d 100644 --- a/src/tomo.c +++ b/src/tomo.c @@ -500,6 +500,12 @@ void build_library(Text_t lib_dir_name) system("mkdir -p ~/.local/share/tomo/lib/"); system(String("ln -f -s ../installed/'", lib_dir_name, "'/lib'", lib_dir_name, SHARED_SUFFIX, "' ~/.local/share/tomo/lib/lib'", lib_dir_name, SHARED_SUFFIX, "'")); + // If we have `debugedit` on this system, use it to remap the debugging source information + // to point to the installed version of the source file. Otherwise, fail silently. + system(String("debugedit -b ", library_directory, + " -d ~/.local/share/tomo/installed/", lib_dir_name, + " ~/.local/share/tomo/installed/", lib_dir_name, "/lib", lib_dir_name, ".so" + " 2>/dev/null >/dev/null")); print("Installed \033[1m", lib_dir_name, "\033[m to ~/.local/share/tomo/installed"); } } -- cgit v1.2.3