[Lldb-commits] [PATCH] D158205: [lldb] Fix performance regression after adding GNUstep ObjC runtime

Jason Molenda via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 17 13:06:34 PDT 2023


jasonmolenda added inline comments.


================
Comment at: lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp:49
+  if (TT.isOSBinFormatELF())
+    return filename.starts_with("libobjc.so");
+  if (TT.isOSWindows())
----------------
theraven wrote:
> This is a bit unfortunate.  I know some downstream users that link the Objective-C runtime components into another .so, so we can't really rely on the name.  It would be nice if there were some mechanism for the user to specify the name of the runtime if they're using something non-standard.
If the runtime was merged in to a library with a known name, we could search for a name in the runtime (if it were the Darwin runtime, objc_msgSend would be a good candidate) in the list of libraries that might have the runtime in them.  Doing a "search for a symbol name in any binary that is added" is expensive, doing "search these three solibs for a symbol if they're loaded" is much less expensive, doing "is a solib with this name loaded" is free.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158205/new/

https://reviews.llvm.org/D158205



More information about the lldb-commits mailing list