LLDB  mainline
SBPlatform.cpp
Go to the documentation of this file.
1 //===-- SBPlatform.cpp ------------------------------------------*- C++ -*-===//
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 
9 #include "lldb/API/SBPlatform.h"
10 #include "SBReproducerPrivate.h"
11 #include "lldb/API/SBError.h"
12 #include "lldb/API/SBFileSpec.h"
13 #include "lldb/API/SBLaunchInfo.h"
14 #include "lldb/API/SBUnixSignals.h"
15 #include "lldb/Host/File.h"
16 #include "lldb/Target/Platform.h"
17 #include "lldb/Target/Target.h"
18 #include "lldb/Utility/ArchSpec.h"
19 #include "lldb/Utility/Args.h"
20 #include "lldb/Utility/Status.h"
21 
22 #include "llvm/Support/FileSystem.h"
23 
24 #include <functional>
25 
26 using namespace lldb;
27 using namespace lldb_private;
28 
29 // PlatformConnectOptions
31  PlatformConnectOptions(const char *url = NULL)
32  : m_url(), m_rsync_options(), m_rsync_remote_path_prefix(),
33  m_rsync_enabled(false), m_rsync_omit_hostname_from_remote_path(false),
34  m_local_cache_directory() {
35  if (url && url[0])
36  m_url = url;
37  }
38 
40 
41  std::string m_url;
42  std::string m_rsync_options;
47 };
48 
49 // PlatformShellCommand
51  PlatformShellCommand(const char *shell_command = NULL)
52  : m_command(), m_working_dir(), m_status(0), m_signo(0) {
53  if (shell_command && shell_command[0])
54  m_command = shell_command;
55  }
56 
58 
59  std::string m_command;
60  std::string m_working_dir;
61  std::string m_output;
62  int m_status;
63  int m_signo;
64  Timeout<std::ratio<1>> m_timeout = llvm::None;
65 };
66 // SBPlatformConnectOptions
68  : m_opaque_ptr(new PlatformConnectOptions(url)) {
70 }
71 
73  const SBPlatformConnectOptions &rhs)
76  (const lldb::SBPlatformConnectOptions &), rhs);
77 
78  *m_opaque_ptr = *rhs.m_opaque_ptr;
79 }
80 
82 
85  void,
86  SBPlatformConnectOptions, operator=,(
88  rhs);
89 
90  *m_opaque_ptr = *rhs.m_opaque_ptr;
91 }
92 
95 
96  if (m_opaque_ptr->m_url.empty())
97  return NULL;
98  return m_opaque_ptr->m_url.c_str();
99 }
100 
101 void SBPlatformConnectOptions::SetURL(const char *url) {
102  LLDB_RECORD_METHOD(void, SBPlatformConnectOptions, SetURL, (const char *),
103  url);
104 
105  if (url && url[0])
106  m_opaque_ptr->m_url = url;
107  else
108  m_opaque_ptr->m_url.clear();
109 }
110 
113 
115 }
116 
118  const char *options, const char *remote_path_prefix,
119  bool omit_hostname_from_remote_path) {
121  (const char *, const char *, bool), options,
122  remote_path_prefix, omit_hostname_from_remote_path);
123 
126  omit_hostname_from_remote_path;
127  if (remote_path_prefix && remote_path_prefix[0])
128  m_opaque_ptr->m_rsync_remote_path_prefix = remote_path_prefix;
129  else
131 
132  if (options && options[0])
133  m_opaque_ptr->m_rsync_options = options;
134  else
135  m_opaque_ptr->m_rsync_options.clear();
136 }
137 
140 
141  m_opaque_ptr->m_rsync_enabled = false;
142 }
143 
147 
149 }
150 
153  (const char *), path);
154 
155  if (path && path[0])
157  else
159 }
160 
161 // SBPlatformShellCommand
163  : m_opaque_ptr(new PlatformShellCommand(shell_command)) {
165  shell_command);
166 }
167 
169  const SBPlatformShellCommand &rhs)
172  (const lldb::SBPlatformShellCommand &), rhs);
173 
174  *m_opaque_ptr = *rhs.m_opaque_ptr;
175 }
176 
178 
181 
182  m_opaque_ptr->m_output = std::string();
183  m_opaque_ptr->m_status = 0;
184  m_opaque_ptr->m_signo = 0;
185 }
186 
189 
190  if (m_opaque_ptr->m_command.empty())
191  return NULL;
192  return m_opaque_ptr->m_command.c_str();
193 }
194 
195 void SBPlatformShellCommand::SetCommand(const char *shell_command) {
197  shell_command);
198 
199  if (shell_command && shell_command[0])
200  m_opaque_ptr->m_command = shell_command;
201  else
202  m_opaque_ptr->m_command.clear();
203 }
204 
208 
209  if (m_opaque_ptr->m_working_dir.empty())
210  return NULL;
211  return m_opaque_ptr->m_working_dir.c_str();
212 }
213 
216  (const char *), path);
217 
218  if (path && path[0])
219  m_opaque_ptr->m_working_dir = path;
220  else
221  m_opaque_ptr->m_working_dir.clear();
222 }
223 
227 
228  if (m_opaque_ptr->m_timeout)
229  return m_opaque_ptr->m_timeout->count();
230  return UINT32_MAX;
231 }
232 
235  (uint32_t), sec);
236 
237  if (sec == UINT32_MAX)
238  m_opaque_ptr->m_timeout = llvm::None;
239  else
240  m_opaque_ptr->m_timeout = std::chrono::seconds(sec);
241 }
242 
245 
246  return m_opaque_ptr->m_signo;
247 }
248 
251 
252  return m_opaque_ptr->m_status;
253 }
254 
257 
258  if (m_opaque_ptr->m_output.empty())
259  return NULL;
260  return m_opaque_ptr->m_output.c_str();
261 }
262 
263 // SBPlatform
264 SBPlatform::SBPlatform() : m_opaque_sp() {
266 }
267 
268 SBPlatform::SBPlatform(const char *platform_name) : m_opaque_sp() {
269  LLDB_RECORD_CONSTRUCTOR(SBPlatform, (const char *), platform_name);
270 
271  Status error;
272  if (platform_name && platform_name[0])
273  m_opaque_sp = Platform::Create(ConstString(platform_name), error);
274 }
275 
277 
278 bool SBPlatform::IsValid() const {
280  return this->operator bool();
281 }
282 SBPlatform::operator bool() const {
283  LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBPlatform, operator bool);
284 
285  return m_opaque_sp.get() != NULL;
286 }
287 
290 
291  m_opaque_sp.reset();
292 }
293 
294 const char *SBPlatform::GetName() {
296 
297  PlatformSP platform_sp(GetSP());
298  if (platform_sp)
299  return platform_sp->GetName().GetCString();
300  return NULL;
301 }
302 
303 lldb::PlatformSP SBPlatform::GetSP() const { return m_opaque_sp; }
304 
305 void SBPlatform::SetSP(const lldb::PlatformSP &platform_sp) {
306  m_opaque_sp = platform_sp;
307 }
308 
311 
312  PlatformSP platform_sp(GetSP());
313  if (platform_sp)
314  return platform_sp->GetWorkingDirectory().GetCString();
315  return NULL;
316 }
317 
318 bool SBPlatform::SetWorkingDirectory(const char *path) {
319  LLDB_RECORD_METHOD(bool, SBPlatform, SetWorkingDirectory, (const char *),
320  path);
321 
322  PlatformSP platform_sp(GetSP());
323  if (platform_sp) {
324  if (path)
325  platform_sp->SetWorkingDirectory(FileSpec(path));
326  else
327  platform_sp->SetWorkingDirectory(FileSpec());
328  return true;
329  }
330  return false;
331 }
332 
335  (lldb::SBPlatformConnectOptions &), connect_options);
336 
337  SBError sb_error;
338  PlatformSP platform_sp(GetSP());
339  if (platform_sp && connect_options.GetURL()) {
340  Args args;
341  args.AppendArgument(
342  llvm::StringRef::withNullAsEmpty(connect_options.GetURL()));
343  sb_error.ref() = platform_sp->ConnectRemote(args);
344  } else {
345  sb_error.SetErrorString("invalid platform");
346  }
347  return LLDB_RECORD_RESULT(sb_error);
348 }
349 
352 
353  PlatformSP platform_sp(GetSP());
354  if (platform_sp)
355  platform_sp->DisconnectRemote();
356 }
357 
360 
361  PlatformSP platform_sp(GetSP());
362  if (platform_sp)
363  return platform_sp->IsConnected();
364  return false;
365 }
366 
367 const char *SBPlatform::GetTriple() {
369 
370  PlatformSP platform_sp(GetSP());
371  if (platform_sp) {
372  ArchSpec arch(platform_sp->GetSystemArchitecture());
373  if (arch.IsValid()) {
374  // Const-ify the string so we don't need to worry about the lifetime of
375  // the string
376  return ConstString(arch.GetTriple().getTriple().c_str()).GetCString();
377  }
378  }
379  return NULL;
380 }
381 
382 const char *SBPlatform::GetOSBuild() {
384 
385  PlatformSP platform_sp(GetSP());
386  if (platform_sp) {
387  std::string s;
388  if (platform_sp->GetOSBuildString(s)) {
389  if (!s.empty()) {
390  // Const-ify the string so we don't need to worry about the lifetime of
391  // the string
392  return ConstString(s.c_str()).GetCString();
393  }
394  }
395  }
396  return NULL;
397 }
398 
401 
402  PlatformSP platform_sp(GetSP());
403  if (platform_sp) {
404  std::string s;
405  if (platform_sp->GetOSKernelDescription(s)) {
406  if (!s.empty()) {
407  // Const-ify the string so we don't need to worry about the lifetime of
408  // the string
409  return ConstString(s.c_str()).GetCString();
410  }
411  }
412  }
413  return NULL;
414 }
415 
416 const char *SBPlatform::GetHostname() {
418 
419  PlatformSP platform_sp(GetSP());
420  if (platform_sp)
421  return platform_sp->GetHostname();
422  return NULL;
423 }
424 
427 
428  llvm::VersionTuple version;
429  if (PlatformSP platform_sp = GetSP())
430  version = platform_sp->GetOSVersion();
431  return version.empty() ? UINT32_MAX : version.getMajor();
432 }
433 
436 
437  llvm::VersionTuple version;
438  if (PlatformSP platform_sp = GetSP())
439  version = platform_sp->GetOSVersion();
440  return version.getMinor().getValueOr(UINT32_MAX);
441 }
442 
445 
446  llvm::VersionTuple version;
447  if (PlatformSP platform_sp = GetSP())
448  version = platform_sp->GetOSVersion();
449  return version.getSubminor().getValueOr(UINT32_MAX);
450 }
451 
454  (lldb::SBFileSpec &, lldb::SBFileSpec &), src, dst);
455 
456  SBError sb_error;
457  PlatformSP platform_sp(GetSP());
458  if (platform_sp) {
459  sb_error.ref() = platform_sp->GetFile(src.ref(), dst.ref());
460  } else {
461  sb_error.SetErrorString("invalid platform");
462  }
463  return LLDB_RECORD_RESULT(sb_error);
464 }
465 
468  (lldb::SBFileSpec &, lldb::SBFileSpec &), src, dst);
469  return LLDB_RECORD_RESULT(
470  ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
471  if (src.Exists()) {
472  uint32_t permissions =
473  FileSystem::Instance().GetPermissions(src.ref());
474  if (permissions == 0) {
475  if (FileSystem::Instance().IsDirectory(src.ref()))
476  permissions = eFilePermissionsDirectoryDefault;
477  else
478  permissions = eFilePermissionsFileDefault;
479  }
480 
481  return platform_sp->PutFile(src.ref(), dst.ref(), permissions);
482  }
483 
484  Status error;
485  error.SetErrorStringWithFormat("'src' argument doesn't exist: '%s'",
486  src.ref().GetPath().c_str());
487  return error;
488  }));
489 }
490 
493  (lldb::SBFileSpec &, lldb::SBFileSpec &), src, dst);
494  return LLDB_RECORD_RESULT(
495  ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
496  if (src.Exists())
497  return platform_sp->Install(src.ref(), dst.ref());
498 
499  Status error;
500  error.SetErrorStringWithFormat("'src' argument doesn't exist: '%s'",
501  src.ref().GetPath().c_str());
502  return error;
503  }));
504 }
505 
508  (lldb::SBPlatformShellCommand &), shell_command);
509  return LLDB_RECORD_RESULT(ExecuteConnected([&](const lldb::PlatformSP
510  &platform_sp) {
511  const char *command = shell_command.GetCommand();
512  if (!command)
513  return Status("invalid shell command (empty)");
514 
515  const char *working_dir = shell_command.GetWorkingDirectory();
516  if (working_dir == NULL) {
517  working_dir = platform_sp->GetWorkingDirectory().GetCString();
518  if (working_dir)
519  shell_command.SetWorkingDirectory(working_dir);
520  }
521  return platform_sp->RunShellCommand(command, FileSpec(working_dir),
522  &shell_command.m_opaque_ptr->m_status,
523  &shell_command.m_opaque_ptr->m_signo,
524  &shell_command.m_opaque_ptr->m_output,
525  shell_command.m_opaque_ptr->m_timeout);
526  }));
527 }
528 
531  launch_info);
532  return LLDB_RECORD_RESULT(
533  ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
534  ProcessLaunchInfo info = launch_info.ref();
535  Status error = platform_sp->LaunchProcess(info);
536  launch_info.set_ref(info);
537  return error;
538  }));
539 }
540 
543  return LLDB_RECORD_RESULT(
544  ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
545  return platform_sp->KillProcess(pid);
546  }));
547 }
548 
550  const std::function<Status(const lldb::PlatformSP &)> &func) {
551  SBError sb_error;
552  const auto platform_sp(GetSP());
553  if (platform_sp) {
554  if (platform_sp->IsConnected())
555  sb_error.ref() = func(platform_sp);
556  else
557  sb_error.SetErrorString("not connected");
558  } else
559  sb_error.SetErrorString("invalid platform");
560 
561  return sb_error;
562 }
563 
564 SBError SBPlatform::MakeDirectory(const char *path, uint32_t file_permissions) {
566  (const char *, uint32_t), path, file_permissions);
567 
568  SBError sb_error;
569  PlatformSP platform_sp(GetSP());
570  if (platform_sp) {
571  sb_error.ref() =
572  platform_sp->MakeDirectory(FileSpec(path), file_permissions);
573  } else {
574  sb_error.SetErrorString("invalid platform");
575  }
576  return LLDB_RECORD_RESULT(sb_error);
577 }
578 
581  path);
582 
583  PlatformSP platform_sp(GetSP());
584  if (platform_sp) {
585  uint32_t file_permissions = 0;
586  platform_sp->GetFilePermissions(FileSpec(path), file_permissions);
587  return file_permissions;
588  }
589  return 0;
590 }
591 
593  uint32_t file_permissions) {
595  (const char *, uint32_t), path, file_permissions);
596 
597  SBError sb_error;
598  PlatformSP platform_sp(GetSP());
599  if (platform_sp) {
600  sb_error.ref() =
601  platform_sp->SetFilePermissions(FileSpec(path), file_permissions);
602  } else {
603  sb_error.SetErrorString("invalid platform");
604  }
605  return LLDB_RECORD_RESULT(sb_error);
606 }
607 
611 
612  if (auto platform_sp = GetSP())
613  return LLDB_RECORD_RESULT(SBUnixSignals{platform_sp});
614 
616 }
617 
618 namespace lldb_private {
619 namespace repro {
620 
621 template <>
627  void,
628  SBPlatformConnectOptions, operator=,(
630  LLDB_REGISTER_METHOD(const char *, SBPlatformConnectOptions, GetURL, ());
632  (const char *));
633  LLDB_REGISTER_METHOD(bool, SBPlatformConnectOptions, GetRsyncEnabled, ());
635  (const char *, const char *, bool));
636  LLDB_REGISTER_METHOD(void, SBPlatformConnectOptions, DisableRsync, ());
638  GetLocalCacheDirectory, ());
639  LLDB_REGISTER_METHOD(void, SBPlatformConnectOptions, SetLocalCacheDirectory,
640  (const char *));
641 }
642 
643 template <>
647  (const lldb::SBPlatformShellCommand &));
649  LLDB_REGISTER_METHOD(const char *, SBPlatformShellCommand, GetCommand, ());
651  (const char *));
653  GetWorkingDirectory, ());
655  (const char *));
657  ());
658  LLDB_REGISTER_METHOD(void, SBPlatformShellCommand, SetTimeoutSeconds,
659  (uint32_t));
660  LLDB_REGISTER_METHOD(int, SBPlatformShellCommand, GetSignal, ());
661  LLDB_REGISTER_METHOD(int, SBPlatformShellCommand, GetStatus, ());
662  LLDB_REGISTER_METHOD(const char *, SBPlatformShellCommand, GetOutput, ());
663 }
664 
665 template <>
668  LLDB_REGISTER_CONSTRUCTOR(SBPlatform, (const char *));
670  LLDB_REGISTER_METHOD_CONST(bool, SBPlatform, operator bool, ());
672  LLDB_REGISTER_METHOD(const char *, SBPlatform, GetName, ());
674  LLDB_REGISTER_METHOD(bool, SBPlatform, SetWorkingDirectory, (const char *));
679  LLDB_REGISTER_METHOD(const char *, SBPlatform, GetTriple, ());
680  LLDB_REGISTER_METHOD(const char *, SBPlatform, GetOSBuild, ());
682  LLDB_REGISTER_METHOD(const char *, SBPlatform, GetHostname, ());
695  (lldb::SBLaunchInfo &));
698  (const char *, uint32_t));
700  (const char *));
702  (const char *, uint32_t));
704  ());
705 }
706 
707 }
708 }
SBError Launch(SBLaunchInfo &launch_info)
Definition: SBPlatform.cpp:529
void operator=(const SBPlatformConnectOptions &rhs)
Definition: SBPlatform.cpp:83
The registry contains a unique mapping between functions and their ID.
A command line argument class.
Definition: Args.h:32
void SetTimeoutSeconds(uint32_t sec)
Definition: SBPlatform.cpp:233
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
#define LLDB_RECORD_CONSTRUCTOR_NO_ARGS(Class)
std::string m_command
Definition: SBPlatform.cpp:59
lldb::PlatformSP GetSP() const
Definition: SBPlatform.cpp:303
PlatformShellCommand(const char *shell_command=NULL)
Definition: SBPlatform.cpp:51
std::string m_output
Definition: SBPlatform.cpp:61
void SetCommand(const char *shell_command)
Definition: SBPlatform.cpp:195
void SetWorkingDirectory(const char *path)
Definition: SBPlatform.cpp:214
const char * GetOSDescription()
Definition: SBPlatform.cpp:399
bool SetWorkingDirectory(const char *path)
Definition: SBPlatform.cpp:318
uint32_t GetOSMajorVersion()
Definition: SBPlatform.cpp:425
void SetLocalCacheDirectory(const char *path)
Definition: SBPlatform.cpp:151
SBPlatformConnectOptions(const char *url)
Definition: SBPlatform.cpp:67
SBError Get(SBFileSpec &src, SBFileSpec &dst)
Definition: SBPlatform.cpp:452
A file utility class.
Definition: FileSpec.h:55
An architecture specification class.
Definition: ArchSpec.h:32
const char * GetOSBuild()
Definition: SBPlatform.cpp:382
SBUnixSignals GetUnixSignals() const
Definition: SBPlatform.cpp:608
lldb::PlatformSP m_opaque_sp
Definition: SBPlatform.h:161
const char * GetTriple()
Definition: SBPlatform.cpp:367
void SetURL(const char *url)
Definition: SBPlatform.cpp:101
uint32_t GetFilePermissions(const char *path)
Definition: SBPlatform.cpp:579
ConstString m_local_cache_directory
Definition: SBPlatform.cpp:46
uint32_t GetOSMinorVersion()
Definition: SBPlatform.cpp:434
void set_ref(const lldb_private::ProcessLaunchInfo &info)
SBError Install(SBFileSpec &src, SBFileSpec &dst)
Definition: SBPlatform.cpp:491
Timeout< std::ratio< 1 > > m_timeout
Definition: SBPlatform.cpp:64
void SetErrorString(const char *err_str)
Definition: SBError.cpp:124
bool IsValid() const
Definition: SBPlatform.cpp:278
void DisconnectRemote()
Definition: SBPlatform.cpp:350
std::string m_rsync_remote_path_prefix
Definition: SBPlatform.cpp:43
SBError Put(SBFileSpec &src, SBFileSpec &dst)
Definition: SBPlatform.cpp:466
void RegisterMethods< SBPlatformShellCommand >(Registry &R)
Definition: SBPlatform.cpp:644
#define UINT32_MAX
Definition: lldb-defines.h:31
#define LLDB_REGISTER_CONSTRUCTOR(Class, Signature)
#define LLDB_RECORD_METHOD_NO_ARGS(Result, Class, Method)
bool m_rsync_omit_hostname_from_remote_path
Definition: SBPlatform.cpp:45
const char * GetLocalCacheDirectory()
Definition: SBPlatform.cpp:144
bool Exists() const
Definition: SBFileSpec.cpp:89
void EnableRsync(const char *options, const char *remote_path_prefix, bool omit_remote_hostname)
Definition: SBPlatform.cpp:117
lldb_private::Status & ref()
Definition: SBError.cpp:159
SBError ExecuteConnected(const std::function< lldb_private::Status(const lldb::PlatformSP &)> &func)
Definition: SBPlatform.cpp:549
#define LLDB_RECORD_CONSTRUCTOR(Class, Signature,...)
void RegisterMethods< SBPlatformConnectOptions >(Registry &R)
Definition: SBPlatform.cpp:622
PlatformConnectOptions * m_opaque_ptr
Definition: SBPlatform.h:49
void RegisterMethods< SBPlatform >(Registry &R)
Definition: SBPlatform.cpp:666
const lldb_private::ProcessLaunchInfo & ref() const
SBError Run(SBPlatformShellCommand &shell_command)
Definition: SBPlatform.cpp:506
const char * GetHostname()
Definition: SBPlatform.cpp:416
std::string m_working_dir
Definition: SBPlatform.cpp:60
#define LLDB_RECORD_METHOD(Result, Class, Method, Signature,...)
SBError MakeDirectory(const char *path, uint32_t file_permissions=eFilePermissionsDirectoryDefault)
Definition: SBPlatform.cpp:564
SBError SetFilePermissions(const char *path, uint32_t file_permissions)
Definition: SBPlatform.cpp:592
SBError Kill(const lldb::pid_t pid)
Definition: SBPlatform.cpp:541
const char * GetName()
Definition: SBPlatform.cpp:294
SBPlatformShellCommand(const char *shell_command)
Definition: SBPlatform.cpp:162
std::string m_rsync_options
Definition: SBPlatform.cpp:42
A uniqued constant string class.
Definition: ConstString.h:38
const char * GetCString() const
Get the string value as a C string.
Definition: ConstString.h:247
void SetSP(const lldb::PlatformSP &platform_sp)
Definition: SBPlatform.cpp:305
Definition: SBAddress.h:15
void AppendArgument(llvm::StringRef arg_str, char quote_char='\0')
Appends a new argument to the end of the list argument list.
Definition: Args.cpp:321
uint64_t pid_t
Definition: lldb-types.h:85
uint32_t GetOSUpdateVersion()
Definition: SBPlatform.cpp:443
#define LLDB_REGISTER_METHOD(Result, Class, Method, Signature)
int SetErrorStringWithFormat(const char *format,...) __attribute__((format(printf
Set the current error string to a formatted error string.
Definition: Status.cpp:255
#define LLDB_RECORD_METHOD_CONST_NO_ARGS(Result, Class, Method)
const char * GetWorkingDirectory()
Definition: SBPlatform.cpp:309
PlatformShellCommand * m_opaque_ptr
Definition: SBPlatform.h:83
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
Definition: FileSpec.cpp:376
PlatformConnectOptions(const char *url=NULL)
Definition: SBPlatform.cpp:31
SBError ConnectRemote(SBPlatformConnectOptions &connect_options)
Definition: SBPlatform.cpp:333
#define LLDB_RECORD_RESULT(Result)
class LLDB_API SBUnixSignals
Definition: SBDefines.h:94
#define LLDB_REGISTER_METHOD_CONST(Result, Class, Method, Signature)
const char * GetWorkingDirectory()
Definition: SBPlatform.cpp:205
An error handling class.
Definition: Status.h:44
void SetCString(const char *cstr)
Set the C string value.