From: Frank Ch. Eigler Date: Fri, 14 Jan 2022 02:03:48 +0000 (-0500) Subject: PR28781: translator: imply -d from -c/-x X-Git-Tag: release-4.7~83 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=c0a3e7aeb9068fbf1967a6e8ef6427b6659598ef;p=systemtap.git PR28781: translator: imply -d from -c/-x Add unwindsyms data always for commands mentioned via -c/-x. --- 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++)