================
@@ -0,0 +1,158 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "DynamicLoaderAcceleratorGDBRemote.h"
+#include "Plugins/Process/gdb-remote/ProcessGDBRemote.h"
+#include "lldb/Core/Module.h"
+#include "lldb/Core/PluginManager.h"
+#include "lldb/Core/Section.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Utility/LLDBLog.h"
+#include "lldb/Utility/Log.h"
+
+using namespace lldb;
+using namespace lldb_private;
+using namespace lldb_private::process_gdb_remote;
+
+LLDB_PLUGIN_DEFINE(DynamicLoaderAcceleratorGDBRemote)
+
+DynamicLoader *
+DynamicLoaderAcceleratorGDBRemote::CreateInstance(Process *process,
+                                                  bool force) {
+  // The library list comes from the accelerator's GDB server.
+  if (process->GetPluginName() != ProcessGDBRemote::GetPluginNameStatic())
+    return nullptr;
+  if (force)
+    return new DynamicLoaderAcceleratorGDBRemote(process);
+
+  const llvm::Triple &triple =
+      process->GetTarget().GetArchitecture().GetTriple();
+  if (triple.isAMDGPU() || triple.isNVPTX())
----------------
satyajanga wrote:

@clayborg I am confused. 

cpu-process calls the accelerator-plugin-initialize, but gpu-process needs the 
dyld-plugin-name. 

I think we want gpu-llgs to tell which dyld-plugin to use. so in that case 
accelerator-initialize response is not the right place.

So I believe your jLLDBSettings is more cleaner approach. I will rename this 
packet to jLLDBProcessSettings and do the same logic. 

let me know what you think?

https://github.com/llvm/llvm-project/pull/217393
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to