LLDB  mainline
PlatformRemoteGDBServer.cpp
Go to the documentation of this file.
1 //===-- PlatformRemoteGDBServer.cpp ---------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 #include "lldb/Host/Config.h"
11 
13 #include "lldb/Core/Debugger.h"
14 #include "lldb/Core/Module.h"
15 #include "lldb/Core/ModuleList.h"
16 #include "lldb/Core/ModuleSpec.h"
18 #include "lldb/Core/StreamFile.h"
20 #include "lldb/Host/Host.h"
21 #include "lldb/Host/HostInfo.h"
22 #include "lldb/Host/PosixApi.h"
23 #include "lldb/Target/Process.h"
24 #include "lldb/Target/Target.h"
25 #include "lldb/Utility/FileSpec.h"
26 #include "lldb/Utility/LLDBLog.h"
27 #include "lldb/Utility/Log.h"
29 #include "lldb/Utility/Status.h"
31 #include "lldb/Utility/UriParser.h"
32 
35 
36 using namespace lldb;
37 using namespace lldb_private;
38 using namespace lldb_private::platform_gdb_server;
39 
41 
42 static bool g_initialized = false;
43 
44 void PlatformRemoteGDBServer::Initialize() {
45  Platform::Initialize();
46 
47  if (!g_initialized) {
48  g_initialized = true;
49  PluginManager::RegisterPlugin(
50  PlatformRemoteGDBServer::GetPluginNameStatic(),
51  PlatformRemoteGDBServer::GetDescriptionStatic(),
52  PlatformRemoteGDBServer::CreateInstance);
53  }
54 }
55 
56 void PlatformRemoteGDBServer::Terminate() {
57  if (g_initialized) {
58  g_initialized = false;
59  PluginManager::UnregisterPlugin(PlatformRemoteGDBServer::CreateInstance);
60  }
61 
62  Platform::Terminate();
63 }
64 
65 PlatformSP PlatformRemoteGDBServer::CreateInstance(bool force,
66  const ArchSpec *arch) {
67  bool create = force;
68  if (!create) {
69  create = !arch->TripleVendorWasSpecified() && !arch->TripleOSWasSpecified();
70  }
71  if (create)
72  return PlatformSP(new PlatformRemoteGDBServer());
73  return PlatformSP();
74 }
75 
76 llvm::StringRef PlatformRemoteGDBServer::GetDescriptionStatic() {
77  return "A platform that uses the GDB remote protocol as the communication "
78  "transport.";
79 }
80 
81 llvm::StringRef PlatformRemoteGDBServer::GetDescription() {
82  if (m_platform_description.empty()) {
83  if (IsConnected()) {
84  // Send the get description packet
85  }
86  }
87 
88  if (!m_platform_description.empty())
89  return m_platform_description.c_str();
90  return GetDescriptionStatic();
91 }
92 
93 bool PlatformRemoteGDBServer::GetModuleSpec(const FileSpec &module_file_spec,
94  const ArchSpec &arch,
95  ModuleSpec &module_spec) {
96  Log *log = GetLog(LLDBLog::Platform);
97 
98  const auto module_path = module_file_spec.GetPath(false);
99 
100  if (!m_gdb_client_up ||
101  !m_gdb_client_up->GetModuleInfo(module_file_spec, arch, module_spec)) {
102  LLDB_LOGF(
103  log,
104  "PlatformRemoteGDBServer::%s - failed to get module info for %s:%s",
105  __FUNCTION__, module_path.c_str(),
106  arch.GetTriple().getTriple().c_str());
107  return false;
108  }
109 
110  if (log) {
111  StreamString stream;
112  module_spec.Dump(stream);
113  LLDB_LOGF(log,
114  "PlatformRemoteGDBServer::%s - got module info for (%s:%s) : %s",
115  __FUNCTION__, module_path.c_str(),
116  arch.GetTriple().getTriple().c_str(), stream.GetData());
117  }
118 
119  return true;
120 }
121 
122 Status PlatformRemoteGDBServer::GetFileWithUUID(const FileSpec &platform_file,
123  const UUID *uuid_ptr,
124  FileSpec &local_file) {
125  // Default to the local case
126  local_file = platform_file;
127  return Status();
128 }
129 
130 /// Default Constructor
131 PlatformRemoteGDBServer::PlatformRemoteGDBServer()
132  : Platform(/*is_host=*/false) {}
133 
134 /// Destructor.
135 ///
136 /// The destructor is virtual since this class is designed to be
137 /// inherited from by the plug-in instance.
139 
141  Target &target, BreakpointSite *bp_site) {
142  // This isn't needed if the z/Z packets are supported in the GDB remote
143  // server. But we might need a packet to detect this.
144  return 0;
145 }
146 
148  if (m_gdb_client_up)
149  m_os_version = m_gdb_client_up->GetOSVersion();
150  return !m_os_version.empty();
151 }
152 
153 llvm::Optional<std::string> PlatformRemoteGDBServer::GetRemoteOSBuildString() {
154  if (!m_gdb_client_up)
155  return llvm::None;
156  return m_gdb_client_up->GetOSBuildString();
157 }
158 
159 llvm::Optional<std::string>
161  if (!m_gdb_client_up)
162  return llvm::None;
163  return m_gdb_client_up->GetOSKernelDescription();
164 }
165 
166 // Remote Platform subclasses need to override this function
168  if (!m_gdb_client_up)
169  return ArchSpec();
170  return m_gdb_client_up->GetSystemArchitecture();
171 }
172 
174  if (IsConnected()) {
175  Log *log = GetLog(LLDBLog::Platform);
176  FileSpec working_dir;
177  if (m_gdb_client_up->GetWorkingDir(working_dir) && log)
178  LLDB_LOGF(log,
179  "PlatformRemoteGDBServer::GetRemoteWorkingDirectory() -> '%s'",
180  working_dir.GetPath().c_str());
181  return working_dir;
182  } else {
184  }
185 }
186 
188  const FileSpec &working_dir) {
189  if (IsConnected()) {
190  // Clear the working directory it case it doesn't get set correctly. This
191  // will for use to re-read it
192  Log *log = GetLog(LLDBLog::Platform);
193  LLDB_LOGF(log, "PlatformRemoteGDBServer::SetRemoteWorkingDirectory('%s')",
194  working_dir.GetPath().c_str());
195  return m_gdb_client_up->SetWorkingDir(working_dir) == 0;
196  } else
197  return Platform::SetRemoteWorkingDirectory(working_dir);
198 }
199 
201  if (m_gdb_client_up) {
202  assert(m_gdb_client_up->IsConnected());
203  return true;
204  }
205  return false;
206 }
207 
209  Status error;
210  if (IsConnected()) {
211  error.SetErrorStringWithFormat("the platform is already connected to '%s', "
212  "execute 'platform disconnect' to close the "
213  "current connection",
214  GetHostname());
215  return error;
216  }
217 
218  if (args.GetArgumentCount() != 1) {
219  error.SetErrorString(
220  "\"platform connect\" takes a single argument: <connect-url>");
221  return error;
222  }
223 
224  const char *url = args.GetArgumentAtIndex(0);
225  if (!url)
226  return Status("URL is null.");
227 
228  llvm::Optional<URI> parsed_url = URI::Parse(url);
229  if (!parsed_url)
230  return Status("Invalid URL: %s", url);
231 
232  // We're going to reuse the hostname when we connect to the debugserver.
233  m_platform_scheme = parsed_url->scheme.str();
234  m_platform_hostname = parsed_url->hostname.str();
235 
236  auto client_up =
237  std::make_unique<process_gdb_remote::GDBRemoteCommunicationClient>();
238  client_up->SetPacketTimeout(
240  client_up->SetConnection(std::make_unique<ConnectionFileDescriptor>());
241  client_up->Connect(url, &error);
242 
243  if (error.Fail())
244  return error;
245 
246  if (client_up->HandshakeWithServer(&error)) {
247  m_gdb_client_up = std::move(client_up);
248  m_gdb_client_up->GetHostInfo();
249  // If a working directory was set prior to connecting, send it down
250  // now.
251  if (m_working_dir)
252  m_gdb_client_up->SetWorkingDir(m_working_dir);
253 
255  ArchSpec remote_arch = m_gdb_client_up->GetSystemArchitecture();
256  if (remote_arch) {
257  m_supported_architectures.push_back(remote_arch);
258  if (remote_arch.GetTriple().isArch64Bit())
259  m_supported_architectures.push_back(
260  ArchSpec(remote_arch.GetTriple().get32BitArchVariant()));
261  }
262  } else {
263  client_up->Disconnect();
264  if (error.Success())
265  error.SetErrorString("handshake failed");
266  }
267  return error;
268 }
269 
271  Status error;
272  m_gdb_client_up.reset();
273  m_remote_signals_sp.reset();
274  return error;
275 }
276 
278  if (m_gdb_client_up)
279  m_gdb_client_up->GetHostname(m_hostname);
280  if (m_hostname.empty())
281  return nullptr;
282  return m_hostname.c_str();
283 }
284 
285 llvm::Optional<std::string>
287  std::string name;
288  if (m_gdb_client_up && m_gdb_client_up->GetUserName(uid, name))
289  return std::move(name);
290  return llvm::None;
291 }
292 
293 llvm::Optional<std::string>
295  std::string name;
296  if (m_gdb_client_up && m_gdb_client_up->GetGroupName(gid, name))
297  return std::move(name);
298  return llvm::None;
299 }
300 
302  const ProcessInstanceInfoMatch &match_info,
303  ProcessInstanceInfoList &process_infos) {
304  if (m_gdb_client_up)
305  return m_gdb_client_up->FindProcesses(match_info, process_infos);
306  return 0;
307 }
308 
310  lldb::pid_t pid, ProcessInstanceInfo &process_info) {
311  if (m_gdb_client_up)
312  return m_gdb_client_up->GetProcessInfo(pid, process_info);
313  return false;
314 }
315 
317  Log *log = GetLog(LLDBLog::Platform);
318  Status error;
319 
320  LLDB_LOGF(log, "PlatformRemoteGDBServer::%s() called", __FUNCTION__);
321 
322  if (!IsConnected())
323  return Status("Not connected.");
324  auto num_file_actions = launch_info.GetNumFileActions();
325  for (decltype(num_file_actions) i = 0; i < num_file_actions; ++i) {
326  const auto file_action = launch_info.GetFileActionAtIndex(i);
327  if (file_action->GetAction() != FileAction::eFileActionOpen)
328  continue;
329  switch (file_action->GetFD()) {
330  case STDIN_FILENO:
331  m_gdb_client_up->SetSTDIN(file_action->GetFileSpec());
332  break;
333  case STDOUT_FILENO:
334  m_gdb_client_up->SetSTDOUT(file_action->GetFileSpec());
335  break;
336  case STDERR_FILENO:
337  m_gdb_client_up->SetSTDERR(file_action->GetFileSpec());
338  break;
339  }
340  }
341 
342  m_gdb_client_up->SetDisableASLR(
343  launch_info.GetFlags().Test(eLaunchFlagDisableASLR));
344  m_gdb_client_up->SetDetachOnError(
345  launch_info.GetFlags().Test(eLaunchFlagDetachOnError));
346 
347  FileSpec working_dir = launch_info.GetWorkingDirectory();
348  if (working_dir) {
349  m_gdb_client_up->SetWorkingDir(working_dir);
350  }
351 
352  // Send the environment and the program + arguments after we connect
353  m_gdb_client_up->SendEnvironment(launch_info.GetEnvironment());
354 
355  ArchSpec arch_spec = launch_info.GetArchitecture();
356  const char *arch_triple = arch_spec.GetTriple().str().c_str();
357 
358  m_gdb_client_up->SendLaunchArchPacket(arch_triple);
359  LLDB_LOGF(
360  log,
361  "PlatformRemoteGDBServer::%s() set launch architecture triple to '%s'",
362  __FUNCTION__, arch_triple ? arch_triple : "<NULL>");
363 
364  int arg_packet_err;
365  {
366  // Scope for the scoped timeout object
368  *m_gdb_client_up, std::chrono::seconds(5));
369  arg_packet_err = m_gdb_client_up->SendArgumentsPacket(launch_info);
370  }
371 
372  if (arg_packet_err == 0) {
373  std::string error_str;
374  if (m_gdb_client_up->GetLaunchSuccess(error_str)) {
375  const auto pid = m_gdb_client_up->GetCurrentProcessID(false);
376  if (pid != LLDB_INVALID_PROCESS_ID) {
377  launch_info.SetProcessID(pid);
378  LLDB_LOGF(log,
379  "PlatformRemoteGDBServer::%s() pid %" PRIu64
380  " launched successfully",
381  __FUNCTION__, pid);
382  } else {
383  LLDB_LOGF(log,
384  "PlatformRemoteGDBServer::%s() launch succeeded but we "
385  "didn't get a valid process id back!",
386  __FUNCTION__);
387  error.SetErrorString("failed to get PID");
388  }
389  } else {
390  error.SetErrorString(error_str.c_str());
391  LLDB_LOGF(log, "PlatformRemoteGDBServer::%s() launch failed: %s",
392  __FUNCTION__, error.AsCString());
393  }
394  } else {
395  error.SetErrorStringWithFormat("'A' packet returned an error: %i",
396  arg_packet_err);
397  }
398  return error;
399 }
400 
402  if (!KillSpawnedProcess(pid))
403  return Status("failed to kill remote spawned process");
404  return Status();
405 }
406 
407 lldb::ProcessSP
409  Debugger &debugger, Target &target,
410  Status &error) {
411  lldb::ProcessSP process_sp;
412  if (IsRemote()) {
413  if (IsConnected()) {
414  lldb::pid_t debugserver_pid = LLDB_INVALID_PROCESS_ID;
415  std::string connect_url;
416  if (!LaunchGDBServer(debugserver_pid, connect_url)) {
417  error.SetErrorStringWithFormat("unable to launch a GDB server on '%s'",
418  GetHostname());
419  } else {
420  // The darwin always currently uses the GDB remote debugger plug-in
421  // so even when debugging locally we are debugging remotely!
422  process_sp = target.CreateProcess(launch_info.GetListener(),
423  "gdb-remote", nullptr, true);
424 
425  if (process_sp) {
426  process_sp->HijackProcessEvents(launch_info.GetHijackListener());
427 
428  error = process_sp->ConnectRemote(connect_url.c_str());
429  // Retry the connect remote one time...
430  if (error.Fail())
431  error = process_sp->ConnectRemote(connect_url.c_str());
432  if (error.Success())
433  error = process_sp->Launch(launch_info);
434  else if (debugserver_pid != LLDB_INVALID_PROCESS_ID) {
435  printf("error: connect remote failed (%s)\n", error.AsCString());
436  KillSpawnedProcess(debugserver_pid);
437  }
438  }
439  }
440  } else {
441  error.SetErrorString("not connected to remote gdb server");
442  }
443  }
444  return process_sp;
445 }
446 
448  std::string &connect_url) {
449  assert(IsConnected());
450 
451  ArchSpec remote_arch = GetRemoteSystemArchitecture();
452  llvm::Triple &remote_triple = remote_arch.GetTriple();
453 
454  uint16_t port = 0;
455  std::string socket_name;
456  bool launch_result = false;
457  if (remote_triple.getVendor() == llvm::Triple::Apple &&
458  remote_triple.getOS() == llvm::Triple::IOS) {
459  // When remote debugging to iOS, we use a USB mux that always talks to
460  // localhost, so we will need the remote debugserver to accept connections
461  // only from localhost, no matter what our current hostname is
462  launch_result =
463  m_gdb_client_up->LaunchGDBServer("127.0.0.1", pid, port, socket_name);
464  } else {
465  // All other hosts should use their actual hostname
466  launch_result =
467  m_gdb_client_up->LaunchGDBServer(nullptr, pid, port, socket_name);
468  }
469 
470  if (!launch_result)
471  return false;
472 
473  connect_url =
475  (socket_name.empty()) ? nullptr : socket_name.c_str());
476  return true;
477 }
478 
480  assert(IsConnected());
481  return m_gdb_client_up->KillSpawnedProcess(pid);
482 }
483 
485  ProcessAttachInfo &attach_info, Debugger &debugger,
486  Target *target, // Can be NULL, if NULL create a new target, else use
487  // existing one
488  Status &error) {
489  lldb::ProcessSP process_sp;
490  if (IsRemote()) {
491  if (IsConnected()) {
492  lldb::pid_t debugserver_pid = LLDB_INVALID_PROCESS_ID;
493  std::string connect_url;
494  if (!LaunchGDBServer(debugserver_pid, connect_url)) {
495  error.SetErrorStringWithFormat("unable to launch a GDB server on '%s'",
496  GetHostname());
497  } else {
498  if (target == nullptr) {
499  TargetSP new_target_sp;
500 
501  error = debugger.GetTargetList().CreateTarget(
502  debugger, "", "", eLoadDependentsNo, nullptr, new_target_sp);
503  target = new_target_sp.get();
504  } else
505  error.Clear();
506 
507  if (target && error.Success()) {
508  // The darwin always currently uses the GDB remote debugger plug-in
509  // so even when debugging locally we are debugging remotely!
510  process_sp =
511  target->CreateProcess(attach_info.GetListenerForProcess(debugger),
512  "gdb-remote", nullptr, true);
513  if (process_sp) {
514  error = process_sp->ConnectRemote(connect_url.c_str());
515  if (error.Success()) {
516  ListenerSP listener_sp = attach_info.GetHijackListener();
517  if (listener_sp)
518  process_sp->HijackProcessEvents(listener_sp);
519  error = process_sp->Attach(attach_info);
520  }
521 
522  if (error.Fail() && debugserver_pid != LLDB_INVALID_PROCESS_ID) {
523  KillSpawnedProcess(debugserver_pid);
524  }
525  }
526  }
527  }
528  } else {
529  error.SetErrorString("not connected to remote gdb server");
530  }
531  }
532  return process_sp;
533 }
534 
536  uint32_t mode) {
537  if (!IsConnected())
538  return Status("Not connected.");
539  Status error = m_gdb_client_up->MakeDirectory(file_spec, mode);
540  Log *log = GetLog(LLDBLog::Platform);
541  LLDB_LOGF(log,
542  "PlatformRemoteGDBServer::MakeDirectory(path='%s', mode=%o) "
543  "error = %u (%s)",
544  file_spec.GetPath().c_str(), mode, error.GetError(),
545  error.AsCString());
546  return error;
547 }
548 
550  uint32_t &file_permissions) {
551  if (!IsConnected())
552  return Status("Not connected.");
553  Status error =
554  m_gdb_client_up->GetFilePermissions(file_spec, file_permissions);
555  Log *log = GetLog(LLDBLog::Platform);
556  LLDB_LOGF(log,
557  "PlatformRemoteGDBServer::GetFilePermissions(path='%s', "
558  "file_permissions=%o) error = %u (%s)",
559  file_spec.GetPath().c_str(), file_permissions, error.GetError(),
560  error.AsCString());
561  return error;
562 }
563 
565  uint32_t file_permissions) {
566  if (!IsConnected())
567  return Status("Not connected.");
568  Status error =
569  m_gdb_client_up->SetFilePermissions(file_spec, file_permissions);
570  Log *log = GetLog(LLDBLog::Platform);
571  LLDB_LOGF(log,
572  "PlatformRemoteGDBServer::SetFilePermissions(path='%s', "
573  "file_permissions=%o) error = %u (%s)",
574  file_spec.GetPath().c_str(), file_permissions, error.GetError(),
575  error.AsCString());
576  return error;
577 }
578 
580  File::OpenOptions flags,
581  uint32_t mode,
582  Status &error) {
583  if (IsConnected())
584  return m_gdb_client_up->OpenFile(file_spec, flags, mode, error);
585  return LLDB_INVALID_UID;
586 }
587 
589  if (IsConnected())
590  return m_gdb_client_up->CloseFile(fd, error);
591  error = Status("Not connected.");
592  return false;
593 }
594 
597  if (IsConnected())
598  return m_gdb_client_up->GetFileSize(file_spec);
599  return LLDB_INVALID_UID;
600 }
601 
603  CompletionRequest &request, bool only_dir) {
604  if (IsConnected())
605  m_gdb_client_up->AutoCompleteDiskFileOrDirectory(request, only_dir);
606 }
607 
609  void *dst, uint64_t dst_len,
610  Status &error) {
611  if (IsConnected())
612  return m_gdb_client_up->ReadFile(fd, offset, dst, dst_len, error);
613  error = Status("Not connected.");
614  return 0;
615 }
616 
618  const void *src, uint64_t src_len,
619  Status &error) {
620  if (IsConnected())
621  return m_gdb_client_up->WriteFile(fd, offset, src, src_len, error);
622  error = Status("Not connected.");
623  return 0;
624 }
625 
627  const FileSpec &destination,
628  uint32_t uid, uint32_t gid) {
629  return Platform::PutFile(source, destination, uid, gid);
630 }
631 
633  const FileSpec &src, // The name of the link is in src
634  const FileSpec &dst) // The symlink points to dst
635 {
636  if (!IsConnected())
637  return Status("Not connected.");
638  Status error = m_gdb_client_up->CreateSymlink(src, dst);
639  Log *log = GetLog(LLDBLog::Platform);
640  LLDB_LOGF(log,
641  "PlatformRemoteGDBServer::CreateSymlink(src='%s', dst='%s') "
642  "error = %u (%s)",
643  src.GetPath().c_str(), dst.GetPath().c_str(), error.GetError(),
644  error.AsCString());
645  return error;
646 }
647 
649  if (!IsConnected())
650  return Status("Not connected.");
651  Status error = m_gdb_client_up->Unlink(file_spec);
652  Log *log = GetLog(LLDBLog::Platform);
653  LLDB_LOGF(log, "PlatformRemoteGDBServer::Unlink(path='%s') error = %u (%s)",
654  file_spec.GetPath().c_str(), error.GetError(), error.AsCString());
655  return error;
656 }
657 
659  if (IsConnected())
660  return m_gdb_client_up->GetFileExists(file_spec);
661  return false;
662 }
663 
665  llvm::StringRef shell, llvm::StringRef command,
666  const FileSpec &
667  working_dir, // Pass empty FileSpec to use the current working directory
668  int *status_ptr, // Pass NULL if you don't want the process exit status
669  int *signo_ptr, // Pass NULL if you don't want the signal that caused the
670  // process to exit
672  *command_output, // Pass NULL if you don't want the command output
673  const Timeout<std::micro> &timeout) {
674  if (!IsConnected())
675  return Status("Not connected.");
676  return m_gdb_client_up->RunShellCommand(command, working_dir, status_ptr,
677  signo_ptr, command_output, timeout);
678 }
679 
681  m_trap_handlers.push_back(ConstString("_sigtramp"));
682 }
683 
685  if (!IsConnected())
687 
689  return m_remote_signals_sp;
690 
691  // If packet not implemented or JSON failed to parse, we'll guess the signal
692  // set based on the remote architecture.
694 
695  StringExtractorGDBRemote response;
696  auto result =
697  m_gdb_client_up->SendPacketAndWaitForResponse("jSignalsInfo", response);
698 
699  if (result != decltype(result)::Success ||
700  response.GetResponseType() != response.eResponse)
701  return m_remote_signals_sp;
702 
703  auto object_sp =
705  if (!object_sp || !object_sp->IsValid())
706  return m_remote_signals_sp;
707 
708  auto array_sp = object_sp->GetAsArray();
709  if (!array_sp || !array_sp->IsValid())
710  return m_remote_signals_sp;
711 
712  auto remote_signals_sp = std::make_shared<lldb_private::GDBRemoteSignals>();
713 
714  bool done = array_sp->ForEach(
715  [&remote_signals_sp](StructuredData::Object *object) -> bool {
716  if (!object || !object->IsValid())
717  return false;
718 
719  auto dict = object->GetAsDictionary();
720  if (!dict || !dict->IsValid())
721  return false;
722 
723  // Signal number and signal name are required.
724  int signo;
725  if (!dict->GetValueForKeyAsInteger("signo", signo))
726  return false;
727 
728  llvm::StringRef name;
729  if (!dict->GetValueForKeyAsString("name", name))
730  return false;
731 
732  // We can live without short_name, description, etc.
733  bool suppress{false};
734  auto object_sp = dict->GetValueForKey("suppress");
735  if (object_sp && object_sp->IsValid())
736  suppress = object_sp->GetBooleanValue();
737 
738  bool stop{false};
739  object_sp = dict->GetValueForKey("stop");
740  if (object_sp && object_sp->IsValid())
741  stop = object_sp->GetBooleanValue();
742 
743  bool notify{false};
744  object_sp = dict->GetValueForKey("notify");
745  if (object_sp && object_sp->IsValid())
746  notify = object_sp->GetBooleanValue();
747 
748  std::string description;
749  object_sp = dict->GetValueForKey("description");
750  if (object_sp && object_sp->IsValid())
751  description = std::string(object_sp->GetStringValue());
752 
753  remote_signals_sp->AddSignal(signo, name.str().c_str(), suppress, stop,
754  notify, description.c_str());
755  return true;
756  });
757 
758  if (done)
759  m_remote_signals_sp = std::move(remote_signals_sp);
760 
761  return m_remote_signals_sp;
762 }
763 
765  const std::string &platform_scheme, const std::string &platform_hostname,
766  uint16_t port, const char *socket_name) {
767  const char *override_scheme =
768  getenv("LLDB_PLATFORM_REMOTE_GDB_SERVER_SCHEME");
769  const char *override_hostname =
770  getenv("LLDB_PLATFORM_REMOTE_GDB_SERVER_HOSTNAME");
771  const char *port_offset_c_str =
772  getenv("LLDB_PLATFORM_REMOTE_GDB_SERVER_PORT_OFFSET");
773  int port_offset = port_offset_c_str ? ::atoi(port_offset_c_str) : 0;
774 
775  return MakeUrl(override_scheme ? override_scheme : platform_scheme.c_str(),
776  override_hostname ? override_hostname
777  : platform_hostname.c_str(),
778  port + port_offset, socket_name);
779 }
780 
782  const char *hostname,
783  uint16_t port, const char *path) {
784  StreamString result;
785  result.Printf("%s://[%s]", scheme, hostname);
786  if (port != 0)
787  result.Printf(":%u", port);
788  if (path)
789  result.Write(path, strlen(path));
790  return std::string(result.GetString());
791 }
792 
794  Status &error) {
795  std::vector<std::string> connection_urls;
796  GetPendingGdbServerList(connection_urls);
797 
798  for (size_t i = 0; i < connection_urls.size(); ++i) {
799  ConnectProcess(connection_urls[i].c_str(), "gdb-remote", debugger, nullptr, error);
800  if (error.Fail())
801  return i; // We already connected to i process successfully
802  }
803  return connection_urls.size();
804 }
805 
807  std::vector<std::string> &connection_urls) {
808  std::vector<std::pair<uint16_t, std::string>> remote_servers;
809  if (!IsConnected())
810  return 0;
811  m_gdb_client_up->QueryGDBServer(remote_servers);
812  for (const auto &gdbserver : remote_servers) {
813  const char *socket_name_cstr =
814  gdbserver.second.empty() ? nullptr : gdbserver.second.c_str();
815  connection_urls.emplace_back(
817  gdbserver.first, socket_name_cstr));
818  }
819  return connection_urls.size();
820 }
lldb_private::ProcessInstanceInfo
Definition: ProcessInfo.h:106
lldb_private::UUID
Definition: UUID.h:23
g_initialized
static bool g_initialized
Definition: PlatformRemoteGDBServer.cpp:42
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::m_supported_architectures
std::vector< ArchSpec > m_supported_architectures
Definition: PlatformRemoteGDBServer.h:187
lldb_private::ArchSpec
Definition: ArchSpec.h:32
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::MakeDirectory
Status MakeDirectory(const FileSpec &file_spec, uint32_t file_permissions) override
Definition: PlatformRemoteGDBServer.cpp:535
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::CalculateTrapHandlerSymbolNames
void CalculateTrapHandlerSymbolNames() override
Ask the Platform subclass to fill in the list of trap handler names.
Definition: PlatformRemoteGDBServer.cpp:680
lldb_private::StructuredData::Object::IsValid
virtual bool IsValid() const
Definition: StructuredData.h:77
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::IsConnected
bool IsConnected() const override
Definition: PlatformRemoteGDBServer.cpp:200
lldb_private::ArchSpec::TripleVendorWasSpecified
bool TripleVendorWasSpecified() const
Definition: ArchSpec.h:357
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetHostname
const char * GetHostname() override
Definition: PlatformRemoteGDBServer.cpp:277
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::DoGetGroupName
llvm::Optional< std::string > DoGetGroupName(UserIDResolver::id_t uid) override
Definition: PlatformRemoteGDBServer.cpp:294
LLDB_INVALID_PROCESS_ID
#define LLDB_INVALID_PROCESS_ID
Definition: lldb-defines.h:81
ModuleSpec.h
lldb_private::URI::Parse
static llvm::Optional< URI > Parse(llvm::StringRef uri)
Definition: UriParser.cpp:27
Host.h
StringExtractor::GetStringRef
llvm::StringRef GetStringRef() const
Definition: StringExtractor.h:48
lldb_private::Platform::PutFile
virtual Status PutFile(const FileSpec &source, const FileSpec &destination, uint32_t uid=UINT32_MAX, uint32_t gid=UINT32_MAX)
Definition: Platform.cpp:1179
lldb_private::File::OpenOptions
OpenOptions
Definition: File.h:49
LLDB_INVALID_UID
#define LLDB_INVALID_UID
Definition: lldb-defines.h:80
lldb_private::ModuleSpec::Dump
void Dump(Stream &strm) const
Definition: ModuleSpec.h:162
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:344
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetFileSize
lldb::user_id_t GetFileSize(const FileSpec &file_spec) override
Definition: PlatformRemoteGDBServer.cpp:596
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::DisconnectRemote
Status DisconnectRemote() override
Definition: PlatformRemoteGDBServer.cpp:270
Module.h
BreakpointLocation.h
PlatformRemoteGDBServer.h
lldb_private::ProcessInstanceInfoMatch
Definition: ProcessInfo.h:160
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::m_platform_scheme
std::string m_platform_scheme
Definition: PlatformRemoteGDBServer.h:162
lldb_private::Platform::m_os_version
llvm::VersionTuple m_os_version
Definition: Platform.h:909
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::CloseFile
bool CloseFile(lldb::user_id_t fd, Status &error) override
Definition: PlatformRemoteGDBServer.cpp:588
lldb_private::Platform::m_trap_handlers
std::vector< ConstString > m_trap_handlers
Definition: Platform.h:925
lldb_private::Flags::Test
bool Test(ValueType bit) const
Test a single flag bit.
Definition: Flags.h:96
lldb_private::ProcessLaunchInfo::GetFlags
Flags & GetFlags()
Definition: ProcessLaunchInfo.h:64
lldb_private::ProcessInfo::SetProcessID
void SetProcessID(lldb::pid_t pid)
Definition: ProcessInfo.h:68
lldb_private::Args
Definition: Args.h:33
lldb_private::ArchSpec::GetTriple
llvm::Triple & GetTriple()
Architecture triple accessor.
Definition: ArchSpec.h:454
lldb_private::platform_gdb_server
Definition: PlatformRemoteGDBServer.h:20
Debugger.h
lldb_private::Target
Definition: Target.h:469
lldb_private::Target::CreateProcess
const lldb::ProcessSP & CreateProcess(lldb::ListenerSP listener_sp, llvm::StringRef plugin_name, const FileSpec *crash_file, bool can_connect)
Definition: Target.cpp:205
LLDB_PLUGIN_DEFINE_ADV
LLDB_PLUGIN_DEFINE_ADV(ObjectContainerUniversalMachO, ObjectContainerMachOArchive) void ObjectContainerUniversalMachO
Definition: ObjectContainerUniversalMachO.cpp:23
lldb_private::StreamString::GetString
llvm::StringRef GetString() const
Definition: StreamString.cpp:51
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::m_gdb_client_up
std::unique_ptr< process_gdb_remote::GDBRemoteCommunicationClient > m_gdb_client_up
Definition: PlatformRemoteGDBServer.h:158
Process.h
lldb_private::ProcessAttachInfo::GetListenerForProcess
lldb::ListenerSP GetListenerForProcess(Debugger &debugger)
Definition: Process.cpp:2756
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::PutFile
Status PutFile(const FileSpec &source, const FileSpec &destination, uint32_t uid=UINT32_MAX, uint32_t gid=UINT32_MAX) override
Definition: PlatformRemoteGDBServer.cpp:626
Target.h
lldb_private::FileSpec
Definition: FileSpec.h:55
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetFileExists
bool GetFileExists(const FileSpec &file_spec) override
Definition: PlatformRemoteGDBServer.cpp:658
ProcessInfo.h
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetPendingGdbServerList
virtual size_t GetPendingGdbServerList(std::vector< std::string > &connection_urls)
Definition: PlatformRemoteGDBServer.cpp:806
ProcessGDBRemote.h
ModuleList.h
lldb_private::BreakpointSite
Definition: BreakpointSite.h:35
lldb_private::ProcessLaunchInfo
Definition: ProcessLaunchInfo.h:31
Log.h
lldb_private::Platform::GetRemoteWorkingDirectory
virtual FileSpec GetRemoteWorkingDirectory()
Definition: Platform.h:247
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetRemoteWorkingDirectory
FileSpec GetRemoteWorkingDirectory() override
Definition: PlatformRemoteGDBServer.cpp:173
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::SetFilePermissions
Status SetFilePermissions(const FileSpec &file_spec, uint32_t file_permissions) override
Definition: PlatformRemoteGDBServer.cpp:564
lldb_private::eLoadDependentsNo
@ eLoadDependentsNo
Definition: lldb-private-enumerations.h:231
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchGDBServer
virtual bool LaunchGDBServer(lldb::pid_t &pid, std::string &connect_url)
Definition: PlatformRemoteGDBServer.cpp:447
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::KillSpawnedProcess
virtual bool KillSpawnedProcess(lldb::pid_t pid)
Definition: PlatformRemoteGDBServer.cpp:479
lldb_private::StreamString::GetData
const char * GetData() const
Definition: StreamString.h:43
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetRemoteOSVersion
bool GetRemoteOSVersion() override
Definition: PlatformRemoteGDBServer.cpp:147
lldb_private::Platform::SetRemoteWorkingDirectory
virtual bool SetRemoteWorkingDirectory(const FileSpec &working_dir)
Definition: Platform.cpp:738
StreamString.h
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::AutoCompleteDiskFileOrDirectory
void AutoCompleteDiskFileOrDirectory(CompletionRequest &request, bool only_dir) override
Definition: PlatformRemoteGDBServer.cpp:602
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetProcessInfo
bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info) override
Definition: PlatformRemoteGDBServer.cpp:309
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetRemoteSystemArchitecture
ArchSpec GetRemoteSystemArchitecture() override
Definition: PlatformRemoteGDBServer.cpp:167
StringExtractorGDBRemote::eResponse
@ eResponse
Definition: StringExtractorGDBRemote.h:187
lldb_private::ConstString
Definition: ConstString.h:39
lldb_private::StreamString
Definition: StreamString.h:23
StringExtractorGDBRemote::GetResponseType
ResponseType GetResponseType() const
Definition: StringExtractorGDBRemote.cpp:18
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::CreateSymlink
Status CreateSymlink(const FileSpec &src, const FileSpec &dst) override
Definition: PlatformRemoteGDBServer.cpp:632
lldb_private::Platform::m_working_dir
FileSpec m_working_dir
Definition: Platform.h:905
lldb_private::TargetList::CreateTarget
Status CreateTarget(Debugger &debugger, llvm::StringRef user_exe_path, llvm::StringRef triple_str, LoadDependentFiles get_dependent_modules, const OptionGroupPlatform *platform_options, lldb::TargetSP &target_sp)
Create a new Target.
lldb_private::ProcessLaunchInfo::GetFileActionAtIndex
const FileAction * GetFileActionAtIndex(size_t idx) const
Definition: ProcessLaunchInfo.cpp:109
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetRemoteOSKernelDescription
llvm::Optional< std::string > GetRemoteOSKernelDescription() override
Definition: PlatformRemoteGDBServer.cpp:160
lldb_private::ProcessLaunchInfo::GetListener
lldb::ListenerSP GetListener() const
Definition: ProcessLaunchInfo.h:125
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetSoftwareBreakpointTrapOpcode
size_t GetSoftwareBreakpointTrapOpcode(Target &target, BreakpointSite *bp_site) override
Definition: PlatformRemoteGDBServer.cpp:140
lldb_private::ArchSpec::TripleOSWasSpecified
bool TripleOSWasSpecified() const
Definition: ArchSpec.h:361
ConnectionFileDescriptor.h
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::SetRemoteWorkingDirectory
bool SetRemoteWorkingDirectory(const FileSpec &working_dir) override
Definition: PlatformRemoteGDBServer.cpp:187
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::ConnectRemote
Status ConnectRemote(Args &args) override
Definition: PlatformRemoteGDBServer.cpp:208
lldb_private::Debugger
Definition: Debugger.h:74
HostInfo.h
lldb_private::ProcessLaunchInfo::GetNumFileActions
size_t GetNumFileActions() const
Definition: ProcessLaunchInfo.h:58
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::ProcessLaunchInfo::GetWorkingDirectory
const FileSpec & GetWorkingDirectory() const
Definition: ProcessLaunchInfo.cpp:123
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetRemoteOSBuildString
llvm::Optional< std::string > GetRemoteOSBuildString() override
Definition: PlatformRemoteGDBServer.cpp:153
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::~PlatformRemoteGDBServer
~PlatformRemoteGDBServer() override
Destructor.
lldb_private::Platform::GetRemoteUnixSignals
virtual const lldb::UnixSignalsSP & GetRemoteUnixSignals()
Definition: Platform.cpp:1674
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::FindProcesses
uint32_t FindProcesses(const ProcessInstanceInfoMatch &match_info, ProcessInstanceInfoList &process_infos) override
Attach to an existing process by process name.
Definition: PlatformRemoteGDBServer.cpp:301
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::OpenFile
lldb::user_id_t OpenFile(const FileSpec &file_spec, File::OpenOptions flags, uint32_t mode, Status &error) override
Definition: PlatformRemoteGDBServer.cpp:579
lldb_private::Platform::m_hostname
std::string m_hostname
Definition: Platform.h:908
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::Unlink
Status Unlink(const FileSpec &path) override
Definition: PlatformRemoteGDBServer.cpp:648
lldb_private::ProcessAttachInfo
Definition: Process.h:113
lldb_private::Debugger::GetTargetList
TargetList & GetTargetList()
Get accessor for the target list.
Definition: Debugger.h:199
lldb_private::FileAction::eFileActionOpen
@ eFileActionOpen
Definition: FileAction.h:23
lldb_private::Platform::IsRemote
bool IsRemote() const
Definition: Platform.h:424
lldb_private::process_gdb_remote::GDBRemoteCommunication::ScopedTimeout
Definition: GDBRemoteCommunication.h:104
StreamFile.h
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::WriteFile
uint64_t WriteFile(lldb::user_id_t fd, uint64_t offset, const void *data, uint64_t len, Status &error) override
Definition: PlatformRemoteGDBServer.cpp:617
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::m_platform_hostname
std::string m_platform_hostname
Definition: PlatformRemoteGDBServer.h:163
lldb_private::ModuleSpec
Definition: ModuleSpec.h:27
lldb_private::Status
Definition: Status.h:44
lldb_private::Args::GetArgumentAtIndex
const char * GetArgumentAtIndex(size_t idx) const
Gets the NULL terminated C string argument pointer for the argument at index idx.
Definition: Args.cpp:264
lldb_private::Timeout< std::micro >
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::RunShellCommand
Status RunShellCommand(llvm::StringRef shell, llvm::StringRef command, const FileSpec &working_dir, int *status_ptr, int *signo_ptr, std::string *command_output, const lldb_private::Timeout< std::micro > &timeout) override
Definition: PlatformRemoteGDBServer.cpp:664
uint32_t
lldb_private::ProcessInfo::GetEnvironment
Environment & GetEnvironment()
Definition: ProcessInfo.h:86
lldb::pid_t
uint64_t pid_t
Definition: lldb-types.h:85
lldb_private::StructuredData::Object::GetAsDictionary
Dictionary * GetAsDictionary()
Definition: StructuredData.h:91
GDBRemoteSignals.h
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::KillProcess
Status KillProcess(const lldb::pid_t pid) override
Kill process on a platform.
Definition: PlatformRemoteGDBServer.cpp:401
if
if(APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY) remove_module_flags() endif() macro(add_host_subdirectory group) list(APPEND HOST_SOURCES $
Definition: Host/CMakeLists.txt:1
uint16_t
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetRemoteUnixSignals
const lldb::UnixSignalsSP & GetRemoteUnixSignals() override
Definition: PlatformRemoteGDBServer.cpp:684
lldb_private::ProcessLaunchInfo::GetHijackListener
lldb::ListenerSP GetHijackListener() const
Definition: ProcessLaunchInfo.h:131
PluginManager.h
lldb_private::Platform
Definition: Platform.h:71
lldb_private::Stream::Printf
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:107
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::MakeGdbServerUrl
std::string MakeGdbServerUrl(const std::string &platform_scheme, const std::string &platform_hostname, uint16_t port, const char *socket_name)
Definition: PlatformRemoteGDBServer.cpp:764
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::ConnectToWaitingProcesses
size_t ConnectToWaitingProcesses(lldb_private::Debugger &debugger, lldb_private::Status &error) override
Connect to all processes waiting for a debugger to attach.
Definition: PlatformRemoteGDBServer.cpp:793
Status.h
lldb::user_id_t
uint64_t user_id_t
Definition: lldb-types.h:84
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::GetFilePermissions
Status GetFilePermissions(const FileSpec &file_spec, uint32_t &file_permissions) override
Definition: PlatformRemoteGDBServer.cpp:549
lldb_private::LLDBLog::Platform
@ Platform
lldb_private::ProcessInfo::GetArchitecture
ArchSpec & GetArchitecture()
Definition: ProcessInfo.h:60
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::LineStatus::Success
@ Success
PosixApi.h
FileSpec.h
lldb_private::Stream::Write
size_t Write(const void *src, size_t src_len)
Output character bytes to the stream.
Definition: Stream.h:101
lldb_private::platform_gdb_server::PlatformRemoteGDBServer
Definition: PlatformRemoteGDBServer.h:22
StringExtractorGDBRemote
Definition: StringExtractorGDBRemote.h:21
lldb_private::StructuredData::ParseJSON
static ObjectSP ParseJSON(const std::string &json_text)
Definition: StructuredData.cpp:25
lldb_private::Log
Definition: Log.h:115
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess
Status LaunchProcess(ProcessLaunchInfo &launch_info) override
Launch a new process on a platform, not necessarily for debugging, it could be just for running the p...
Definition: PlatformRemoteGDBServer.cpp:316
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::DebugProcess
lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger, Target &target, Status &error) override
Subclasses do not need to implement this function as it uses the Platform::LaunchProcess() followed b...
Definition: PlatformRemoteGDBServer.cpp:408
UriParser.h
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::MakeUrl
virtual std::string MakeUrl(const char *scheme, const char *hostname, uint16_t port, const char *path)
Definition: PlatformRemoteGDBServer.cpp:781
lldb_private::GetLog
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition: Log.h:309
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::DoGetUserName
llvm::Optional< std::string > DoGetUserName(UserIDResolver::id_t uid) override
Definition: PlatformRemoteGDBServer.cpp:286
lldb_private::FileSpec::GetPath
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
Definition: FileSpec.cpp:364
lldb_private::ProcessAttachInfo::GetHijackListener
lldb::ListenerSP GetHijackListener() const
Definition: Process.h:176
lldb_private::Args::GetArgumentCount
size_t GetArgumentCount() const
Gets the number of arguments left in this command object.
Definition: Args.h:116
lldb_private::ProcessInstanceInfoList
std::vector< ProcessInstanceInfo > ProcessInstanceInfoList
Definition: Host.h:31
lldb_private::StructuredData::Object
Definition: StructuredData.h:70
lldb
Definition: SBAddress.h:15
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::ReadFile
uint64_t ReadFile(lldb::user_id_t fd, uint64_t offset, void *data_ptr, uint64_t len, Status &error) override
Definition: PlatformRemoteGDBServer.cpp:608
lldb_private::process_gdb_remote::ProcessGDBRemote::GetPacketTimeout
static std::chrono::seconds GetPacketTimeout()
Definition: ProcessGDBRemote.cpp:205
LLDBLog.h
lldb_private::Platform::ConnectProcess
virtual lldb::ProcessSP ConnectProcess(llvm::StringRef connect_url, llvm::StringRef plugin_name, Debugger &debugger, Target *target, Status &error)
Definition: Platform.cpp:1753
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::Attach
lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger, Target *target, Status &error) override
Attach to an existing process using a process ID.
Definition: PlatformRemoteGDBServer.cpp:484
lldb_private::CompletionRequest
Definition: CompletionRequest.h:100
lldb_private::platform_gdb_server::PlatformRemoteGDBServer::m_remote_signals_sp
lldb::UnixSignalsSP m_remote_signals_sp
Definition: PlatformRemoteGDBServer.h:165
lldb_private::UnixSignals::Create
static lldb::UnixSignalsSP Create(const ArchSpec &arch)
Definition: UnixSignals.cpp:32