[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)

2024-06-22 Thread David Blaikie via lldb-commits

dwblaikie wrote:

> @ZequanWu, @labath, since this PR got reverted due to crash for 
> `--gsimple-template-names`, do you guys have a timeline to revise a new 
> version without crashing? I ask this because our internal customers have many 
> forward declarations that are suffering from the slow definition lookup. cc 
> @clayborg

It's certainly stuff that @ZequanWu, @labath, and myself are looking into. We 
could do a better job of communicating that upstream though :) I think we're 
meeting next week to chat a bit more about it, and can perhaps formalize that 
into some tracking bugs, etc.

https://github.com/llvm/llvm-project/pull/92328
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] c3fe1c4 - [lldb] Resolve executables more aggressively on the host

2024-06-22 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2024-06-22T08:18:15-07:00
New Revision: c3fe1c4472e72a3832be911e8fa9098fa84762a0

URL: 
https://github.com/llvm/llvm-project/commit/c3fe1c4472e72a3832be911e8fa9098fa84762a0
DIFF: 
https://github.com/llvm/llvm-project/commit/c3fe1c4472e72a3832be911e8fa9098fa84762a0.diff

LOG: [lldb] Resolve executables more aggressively on the host

When unifying the ResolveExecutable implementations in #96256, I missed
that RemoteAwarePlatform was able to resolve executables more
aggressively. The host platform can rely on the current working
directory to make relative paths absolute and resolve things like home
directories.

This should fix command-target-create-resolve-exe.test.

Added: 


Modified: 
lldb/include/lldb/Target/RemoteAwarePlatform.h
lldb/source/Target/RemoteAwarePlatform.cpp

Removed: 




diff  --git a/lldb/include/lldb/Target/RemoteAwarePlatform.h 
b/lldb/include/lldb/Target/RemoteAwarePlatform.h
index 6fbeec7888a98..fb2eecfaa23a8 100644
--- a/lldb/include/lldb/Target/RemoteAwarePlatform.h
+++ b/lldb/include/lldb/Target/RemoteAwarePlatform.h
@@ -20,6 +20,11 @@ class RemoteAwarePlatform : public Platform {
 public:
   using Platform::Platform;
 
+  virtual Status
+  ResolveExecutable(const ModuleSpec &module_spec,
+lldb::ModuleSP &exe_module_sp,
+const FileSpecList *module_search_paths_ptr) override;
+
   bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch,
  ModuleSpec &module_spec) override;
 

diff  --git a/lldb/source/Target/RemoteAwarePlatform.cpp 
b/lldb/source/Target/RemoteAwarePlatform.cpp
index 63243d6e71307..5fc2d63876b92 100644
--- a/lldb/source/Target/RemoteAwarePlatform.cpp
+++ b/lldb/source/Target/RemoteAwarePlatform.cpp
@@ -29,6 +29,29 @@ bool RemoteAwarePlatform::GetModuleSpec(const FileSpec 
&module_file_spec,
   return false;
 }
 
+Status RemoteAwarePlatform::ResolveExecutable(
+const ModuleSpec &module_spec, lldb::ModuleSP &exe_module_sp,
+const FileSpecList *module_search_paths_ptr) {
+  ModuleSpec resolved_module_spec(module_spec);
+
+  // The host platform can resolve the path more aggressively.
+  if (IsHost()) {
+FileSpec &resolved_file_spec = resolved_module_spec.GetFileSpec();
+
+if (!FileSystem::Instance().Exists(resolved_file_spec)) {
+  resolved_module_spec.GetFileSpec().SetFile(resolved_file_spec.GetPath(),
+ FileSpec::Style::native);
+  FileSystem::Instance().Resolve(resolved_file_spec);
+}
+
+if (!FileSystem::Instance().Exists(resolved_file_spec))
+  FileSystem::Instance().ResolveExecutableLocation(resolved_file_spec);
+  }
+
+  return Platform::ResolveExecutable(resolved_module_spec, exe_module_sp,
+ module_search_paths_ptr);
+}
+
 Status RemoteAwarePlatform::RunShellCommand(
 llvm::StringRef command, const FileSpec &working_dir, int *status_ptr,
 int *signo_ptr, std::string *command_output,



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits