[Lldb-commits] [PATCH] D106226: [lldb] Improve error message when "lldb attach" fails

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 7 11:51:26 PDT 2021

jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

This seems like a good idea, but the functionality belongs in the Linux Platform, not in the Target.cpp.  We try really hard to keep platform specific details out of the generic files.

Comment at: lldb/source/Target/Target.cpp:3121
+const char *fetchPtracePolicyIfApplicable(lldb::PlatformSP platform_sp) {
+  FileSpec filespec =
DavidSpickett wrote:
> Make this function static since it's only used in this file.
This function does not belong in Target.cpp.  This is Platform specific functionality and so belongs in the Linux Platform..  You need to add a "GetLaunchErrorDetails" or some better name for the general API, and implement that for the Unix systems that support proc, or only Linux if this functionality is only on Linux.

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list