From c0a3e7aeb9068fbf1967a6e8ef6427b6659598ef Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 13 Jan 2022 21:03:48 -0500 Subject: [PATCH] PR28781: translator: imply -d from -c/-x Add unwindsyms data always for commands mentioned via -c/-x. --- NEWS | 4 ++++ session.cxx | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/NEWS b/NEWS index 5e569eb6f..8957e83e0 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ * What's new in version 4.7, PRERELEASE +- target processes given with the -c/-x parameters are now always + added to the -d list for possible symbol/unwind data extraction, + for simplifying profiling invocations. Consider --ldd. + * What's new in version 4.6, 2021-11-15 - SystemTap has added support for the 64-bit RISC-V architecture. diff --git a/session.cxx b/session.cxx index 209df5bf0..ec1400ee0 100644 --- a/session.cxx +++ b/session.cxx @@ -1676,6 +1676,13 @@ systemtap_session::parse_cmdline (int argc, char * const argv []) } } + // add the -c CMD / -x PID into the unwindsyms list as if -d ... were given + try { + if (cmd != "" || target_pid != 0) + additional_unwindsym_modules.insert(resolve_path(find_executable(cmd_file(), + sysroot, sysenv))); + } catch (...) { } + for (std::set::iterator it = additional_unwindsym_modules.begin(); it != additional_unwindsym_modules.end(); it++) -- 2.43.5