LLDB  mainline
SBDebugger.cpp
Go to the documentation of this file.
1 //===-- SBDebugger.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 
9 #include "lldb/API/SBDebugger.h"
10 #include "SystemInitializerFull.h"
12 #include "lldb/Utility/LLDBLog.h"
13 
14 #include "lldb/API/SBBroadcaster.h"
18 #include "lldb/API/SBError.h"
19 #include "lldb/API/SBEvent.h"
20 #include "lldb/API/SBFile.h"
21 #include "lldb/API/SBFrame.h"
22 #include "lldb/API/SBListener.h"
23 #include "lldb/API/SBProcess.h"
25 #include "lldb/API/SBStream.h"
26 #include "lldb/API/SBStringList.h"
28 #include "lldb/API/SBTarget.h"
29 #include "lldb/API/SBThread.h"
30 #include "lldb/API/SBTrace.h"
32 #include "lldb/API/SBTypeFilter.h"
33 #include "lldb/API/SBTypeFormat.h"
35 #include "lldb/API/SBTypeSummary.h"
37 
38 #include "lldb/Core/Debugger.h"
41 #include "lldb/Core/Progress.h"
42 #include "lldb/Core/StreamFile.h"
45 #include "lldb/Host/Config.h"
46 #include "lldb/Host/XML.h"
51 #include "lldb/Target/Process.h"
52 #include "lldb/Target/TargetList.h"
53 #include "lldb/Utility/Args.h"
54 #include "lldb/Utility/State.h"
55 #include "lldb/Version/Version.h"
56 
57 #include "llvm/ADT/STLExtras.h"
58 #include "llvm/ADT/StringRef.h"
59 #include "llvm/Support/DynamicLibrary.h"
60 #include "llvm/Support/ManagedStatic.h"
61 #include "llvm/Support/PrettyStackTrace.h"
62 #include "llvm/Support/Signals.h"
63 
64 using namespace lldb;
65 using namespace lldb_private;
66 
67 static llvm::sys::DynamicLibrary LoadPlugin(const lldb::DebuggerSP &debugger_sp,
68  const FileSpec &spec,
69  Status &error) {
70  llvm::sys::DynamicLibrary dynlib =
71  llvm::sys::DynamicLibrary::getPermanentLibrary(spec.GetPath().c_str());
72  if (dynlib.isValid()) {
73  typedef bool (*LLDBCommandPluginInit)(lldb::SBDebugger & debugger);
74 
75  lldb::SBDebugger debugger_sb(debugger_sp);
76  // This calls the bool lldb::PluginInitialize(lldb::SBDebugger debugger)
77  // function.
78  // TODO: mangle this differently for your system - on OSX, the first
79  // underscore needs to be removed and the second one stays
80  LLDBCommandPluginInit init_func =
81  (LLDBCommandPluginInit)(uintptr_t)dynlib.getAddressOfSymbol(
82  "_ZN4lldb16PluginInitializeENS_10SBDebuggerE");
83  if (init_func) {
84  if (init_func(debugger_sb))
85  return dynlib;
86  else
87  error.SetErrorString("plug-in refused to load "
88  "(lldb::PluginInitialize(lldb::SBDebugger) "
89  "returned false)");
90  } else {
91  error.SetErrorString("plug-in is missing the required initialization: "
92  "lldb::PluginInitialize(lldb::SBDebugger)");
93  }
94  } else {
95  if (FileSystem::Instance().Exists(spec))
96  error.SetErrorString("this file does not represent a loadable dylib");
97  else
98  error.SetErrorString("no such file");
99  }
100  return llvm::sys::DynamicLibrary();
101 }
102 
103 static llvm::ManagedStatic<SystemLifetimeManager> g_debugger_lifetime;
104 
106  lldb::SBDebugger &sb_debugger,
107  unsigned long (*callback)(void *, lldb::SBInputReader *,
108  lldb::InputReaderAction, char const *,
109  unsigned long),
110  void *a, lldb::InputReaderGranularity b, char const *c, char const *d,
111  bool e) {
112  LLDB_INSTRUMENT_VA(this, sb_debugger, callback, a, b, c, d, e);
113 
114  return SBError();
115 }
116 
118 
120  LLDB_INSTRUMENT_VA(this);
121 
122  return false;
123 }
124 
126 
127 SBDebugger::SBDebugger(const lldb::DebuggerSP &debugger_sp)
128  : m_opaque_sp(debugger_sp) {
129  LLDB_INSTRUMENT_VA(this, debugger_sp);
130 }
131 
132 SBDebugger::SBDebugger(const SBDebugger &rhs) : m_opaque_sp(rhs.m_opaque_sp) {
133  LLDB_INSTRUMENT_VA(this, rhs);
134 }
135 
136 SBDebugger::~SBDebugger() = default;
137 
139  LLDB_INSTRUMENT_VA(this, rhs);
140 
141  if (this != &rhs) {
142  m_opaque_sp = rhs.m_opaque_sp;
143  }
144  return *this;
145 }
146 
148  LLDB_INSTRUMENT();
149 
151 }
152 
154  uint64_t &progress_id,
155  uint64_t &completed,
156  uint64_t &total,
157  bool &is_debugger_specific) {
158  LLDB_INSTRUMENT_VA(event);
159  const ProgressEventData *progress_data =
161  if (progress_data == nullptr)
162  return nullptr;
163  progress_id = progress_data->GetID();
164  completed = progress_data->GetCompleted();
165  total = progress_data->GetTotal();
166  is_debugger_specific = progress_data->IsDebuggerSpecific();
167  return progress_data->GetMessage().c_str();
168 }
169 
172  LLDB_INSTRUMENT_VA(event);
173 
174  const DiagnosticEventData *diagnostic_data =
176  if (!diagnostic_data)
177  return {};
178 
179  auto dictionary = std::make_unique<StructuredData::Dictionary>();
180  dictionary->AddStringItem("message", diagnostic_data->GetMessage());
181  dictionary->AddStringItem("type", diagnostic_data->GetPrefix());
182  dictionary->AddBooleanItem("debugger_specific",
183  diagnostic_data->IsDebuggerSpecific());
184 
185  SBStructuredData data;
186  data.m_impl_up->SetObjectSP(std::move(dictionary));
187  return data;
188 }
189 
191  LLDB_INSTRUMENT_VA(this);
192  SBBroadcaster broadcaster(&m_opaque_sp->GetBroadcaster(), false);
193  return broadcaster;
194 }
195 
197  LLDB_INSTRUMENT();
199 }
200 
202  LLDB_INSTRUMENT();
203 
204  SBError error;
205  if (auto e = g_debugger_lifetime->Initialize(
206  std::make_unique<SystemInitializerFull>(), LoadPlugin)) {
207  error.SetError(Status(std::move(e)));
208  }
209  return error;
210 }
211 
213  LLDB_INSTRUMENT();
214 
215  llvm::EnablePrettyStackTrace();
216  static std::string executable =
217  llvm::sys::fs::getMainExecutable(nullptr, nullptr);
218  llvm::sys::PrintStackTraceOnErrorSignal(executable);
219 }
220 
222  LLDB_INSTRUMENT();
223 
224  g_debugger_lifetime->Terminate();
225 }
226 
228  LLDB_INSTRUMENT_VA(this);
229 
230  if (m_opaque_sp)
231  m_opaque_sp->ClearIOHandlers();
232 
233  m_opaque_sp.reset();
234 }
235 
237  LLDB_INSTRUMENT();
238 
239  return SBDebugger::Create(false, nullptr, nullptr);
240 }
241 
242 SBDebugger SBDebugger::Create(bool source_init_files) {
243  LLDB_INSTRUMENT_VA(source_init_files);
244 
245  return SBDebugger::Create(source_init_files, nullptr, nullptr);
246 }
247 
248 SBDebugger SBDebugger::Create(bool source_init_files,
249  lldb::LogOutputCallback callback, void *baton)
250 
251 {
252  LLDB_INSTRUMENT_VA(source_init_files, callback, baton);
253 
254  SBDebugger debugger;
255 
256  // Currently we have issues if this function is called simultaneously on two
257  // different threads. The issues mainly revolve around the fact that the
258  // lldb_private::FormatManager uses global collections and having two threads
259  // parsing the .lldbinit files can cause mayhem. So to get around this for
260  // now we need to use a mutex to prevent bad things from happening.
261  static std::recursive_mutex g_mutex;
262  std::lock_guard<std::recursive_mutex> guard(g_mutex);
263 
264  debugger.reset(Debugger::CreateInstance(callback, baton));
265 
266  SBCommandInterpreter interp = debugger.GetCommandInterpreter();
267  if (source_init_files) {
268  interp.get()->SkipLLDBInitFiles(false);
269  interp.get()->SkipAppInitFiles(false);
270  SBCommandReturnObject result;
271  interp.SourceInitFileInGlobalDirectory(result);
272  interp.SourceInitFileInHomeDirectory(result, false);
273  } else {
274  interp.get()->SkipLLDBInitFiles(true);
275  interp.get()->SkipAppInitFiles(true);
276  }
277  return debugger;
278 }
279 
281  LLDB_INSTRUMENT_VA(debugger);
282 
283  Debugger::Destroy(debugger.m_opaque_sp);
284 
285  if (debugger.m_opaque_sp.get() != nullptr)
286  debugger.m_opaque_sp.reset();
287 }
288 
290  LLDB_INSTRUMENT();
291 
292  // Since this function can be call asynchronously, we allow it to be non-
293  // mandatory. We have seen deadlocks with this function when called so we
294  // need to safeguard against this until we can determine what is causing the
295  // deadlocks.
296 
297  const bool mandatory = false;
298 
300 }
301 
302 bool SBDebugger::IsValid() const {
303  LLDB_INSTRUMENT_VA(this);
304  return this->operator bool();
305 }
306 SBDebugger::operator bool() const {
307  LLDB_INSTRUMENT_VA(this);
308 
309  return m_opaque_sp.get() != nullptr;
310 }
311 
312 void SBDebugger::SetAsync(bool b) {
313  LLDB_INSTRUMENT_VA(this, b);
314 
315  if (m_opaque_sp)
316  m_opaque_sp->SetAsyncExecution(b);
317 }
318 
320  LLDB_INSTRUMENT_VA(this);
321 
322  return (m_opaque_sp ? m_opaque_sp->GetAsyncExecution() : false);
323 }
324 
326  LLDB_INSTRUMENT_VA(this, b);
327 
328  if (m_opaque_sp)
329  m_opaque_sp->GetCommandInterpreter().SkipLLDBInitFiles(b);
330 }
331 
333  LLDB_INSTRUMENT_VA(this, b);
334 
335  if (m_opaque_sp)
336  m_opaque_sp->GetCommandInterpreter().SkipAppInitFiles(b);
337 }
338 
339 void SBDebugger::SetInputFileHandle(FILE *fh, bool transfer_ownership) {
340  LLDB_INSTRUMENT_VA(this, fh, transfer_ownership);
341  if (m_opaque_sp)
342  m_opaque_sp->SetInputFile(
343  (FileSP)std::make_shared<NativeFile>(fh, transfer_ownership));
344 }
345 
347  LLDB_INSTRUMENT_VA(this, data);
348  SBError sb_error;
349  if (data == nullptr) {
350  sb_error.SetErrorString("String data is null");
351  return sb_error;
352  }
353 
354  size_t size = strlen(data);
355  if (size == 0) {
356  sb_error.SetErrorString("String data is empty");
357  return sb_error;
358  }
359 
360  if (!m_opaque_sp) {
361  sb_error.SetErrorString("invalid debugger");
362  return sb_error;
363  }
364 
365  sb_error.SetError(m_opaque_sp->SetInputString(data));
366  return sb_error;
367 }
368 
369 // Shouldn't really be settable after initialization as this could cause lots
370 // of problems; don't want users trying to switch modes in the middle of a
371 // debugging session.
373  LLDB_INSTRUMENT_VA(this, file);
374 
375  SBError error;
376  if (!m_opaque_sp) {
377  error.ref().SetErrorString("invalid debugger");
378  return error;
379  }
380  if (!file) {
381  error.ref().SetErrorString("invalid file");
382  return error;
383  }
384  m_opaque_sp->SetInputFile(file.m_opaque_sp);
385  return error;
386 }
387 
389  LLDB_INSTRUMENT_VA(this, file_sp);
390  return SetInputFile(SBFile(file_sp));
391 }
392 
394  LLDB_INSTRUMENT_VA(this, file_sp);
395  return SetOutputFile(SBFile(file_sp));
396 }
397 
398 void SBDebugger::SetOutputFileHandle(FILE *fh, bool transfer_ownership) {
399  LLDB_INSTRUMENT_VA(this, fh, transfer_ownership);
400  SetOutputFile((FileSP)std::make_shared<NativeFile>(fh, transfer_ownership));
401 }
402 
404  LLDB_INSTRUMENT_VA(this, file);
405  SBError error;
406  if (!m_opaque_sp) {
407  error.ref().SetErrorString("invalid debugger");
408  return error;
409  }
410  if (!file) {
411  error.ref().SetErrorString("invalid file");
412  return error;
413  }
414  m_opaque_sp->SetOutputFile(file.m_opaque_sp);
415  return error;
416 }
417 
418 void SBDebugger::SetErrorFileHandle(FILE *fh, bool transfer_ownership) {
419  LLDB_INSTRUMENT_VA(this, fh, transfer_ownership);
420  SetErrorFile((FileSP)std::make_shared<NativeFile>(fh, transfer_ownership));
421 }
422 
424  LLDB_INSTRUMENT_VA(this, file_sp);
425  return SetErrorFile(SBFile(file_sp));
426 }
427 
429  LLDB_INSTRUMENT_VA(this, file);
430  SBError error;
431  if (!m_opaque_sp) {
432  error.ref().SetErrorString("invalid debugger");
433  return error;
434  }
435  if (!file) {
436  error.ref().SetErrorString("invalid file");
437  return error;
438  }
439  m_opaque_sp->SetErrorFile(file.m_opaque_sp);
440  return error;
441 }
442 
444  LLDB_INSTRUMENT_VA(this, setting);
445 
446  SBStructuredData data;
447  if (!m_opaque_sp)
448  return data;
449 
450  StreamString json_strm;
451  ExecutionContext exe_ctx(
452  m_opaque_sp->GetCommandInterpreter().GetExecutionContext());
453  if (setting && strlen(setting) > 0)
454  m_opaque_sp->DumpPropertyValue(&exe_ctx, json_strm, setting,
455  /*dump_mask*/ 0,
456  /*is_json*/ true);
457  else
458  m_opaque_sp->DumpAllPropertyValues(&exe_ctx, json_strm, /*dump_mask*/ 0,
459  /*is_json*/ true);
460 
461  data.m_impl_up->SetObjectSP(
462  StructuredData::ParseJSON(json_strm.GetString().str()));
463  return data;
464 }
465 
467  LLDB_INSTRUMENT_VA(this);
468  if (m_opaque_sp) {
469  File &file_sp = m_opaque_sp->GetInputFile();
470  return file_sp.GetStream();
471  }
472  return nullptr;
473 }
474 
476  LLDB_INSTRUMENT_VA(this);
477  if (m_opaque_sp) {
478  return SBFile(m_opaque_sp->GetInputFileSP());
479  }
480  return SBFile();
481 }
482 
484  LLDB_INSTRUMENT_VA(this);
485  if (m_opaque_sp) {
486  StreamFile &stream_file = m_opaque_sp->GetOutputStream();
487  return stream_file.GetFile().GetStream();
488  }
489  return nullptr;
490 }
491 
493  LLDB_INSTRUMENT_VA(this);
494  if (m_opaque_sp) {
495  SBFile file(m_opaque_sp->GetOutputStream().GetFileSP());
496  return file;
497  }
498  return SBFile();
499 }
500 
502  LLDB_INSTRUMENT_VA(this);
503 
504  if (m_opaque_sp) {
505  StreamFile &stream_file = m_opaque_sp->GetErrorStream();
506  return stream_file.GetFile().GetStream();
507  }
508  return nullptr;
509 }
510 
512  LLDB_INSTRUMENT_VA(this);
513  SBFile file;
514  if (m_opaque_sp) {
515  SBFile file(m_opaque_sp->GetErrorStream().GetFileSP());
516  return file;
517  }
518  return SBFile();
519 }
520 
522  LLDB_INSTRUMENT_VA(this);
523 
524  if (m_opaque_sp)
525  m_opaque_sp->SaveInputTerminalState();
526 }
527 
529  LLDB_INSTRUMENT_VA(this);
530 
531  if (m_opaque_sp)
532  m_opaque_sp->RestoreInputTerminalState();
533 }
535  LLDB_INSTRUMENT_VA(this);
536 
537  SBCommandInterpreter sb_interpreter;
538  if (m_opaque_sp)
539  sb_interpreter.reset(&m_opaque_sp->GetCommandInterpreter());
540 
541  return sb_interpreter;
542 }
543 
544 void SBDebugger::HandleCommand(const char *command) {
545  LLDB_INSTRUMENT_VA(this, command);
546 
547  if (m_opaque_sp) {
548  TargetSP target_sp(m_opaque_sp->GetSelectedTarget());
549  std::unique_lock<std::recursive_mutex> lock;
550  if (target_sp)
551  lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
552 
554  SBCommandReturnObject result;
555 
556  sb_interpreter.HandleCommand(command, result, false);
557 
558  result.PutError(m_opaque_sp->GetErrorStream().GetFileSP());
559  result.PutOutput(m_opaque_sp->GetOutputStream().GetFileSP());
560 
561  if (!m_opaque_sp->GetAsyncExecution()) {
562  SBProcess process(GetCommandInterpreter().GetProcess());
563  ProcessSP process_sp(process.GetSP());
564  if (process_sp) {
565  EventSP event_sp;
566  ListenerSP lldb_listener_sp = m_opaque_sp->GetListener();
567  while (lldb_listener_sp->GetEventForBroadcaster(
568  process_sp.get(), event_sp, std::chrono::seconds(0))) {
569  SBEvent event(event_sp);
570  HandleProcessEvent(process, event, GetOutputFile(), GetErrorFile());
571  }
572  }
573  }
574  }
575 }
576 
578  LLDB_INSTRUMENT_VA(this);
579 
580  SBListener sb_listener;
581  if (m_opaque_sp)
582  sb_listener.reset(m_opaque_sp->GetListener());
583 
584  return sb_listener;
585 }
586 
588  const SBEvent &event, SBFile out,
589  SBFile err) {
590  LLDB_INSTRUMENT_VA(this, process, event, out, err);
591 
592  return HandleProcessEvent(process, event, out.m_opaque_sp, err.m_opaque_sp);
593 }
594 
596  const SBEvent &event, FILE *out,
597  FILE *err) {
598  LLDB_INSTRUMENT_VA(this, process, event, out, err);
599 
600  FileSP outfile = std::make_shared<NativeFile>(out, false);
601  FileSP errfile = std::make_shared<NativeFile>(err, false);
602  return HandleProcessEvent(process, event, outfile, errfile);
603 }
604 
606  const SBEvent &event, FileSP out_sp,
607  FileSP err_sp) {
608 
609  LLDB_INSTRUMENT_VA(this, process, event, out_sp, err_sp);
610 
611  if (!process.IsValid())
612  return;
613 
614  TargetSP target_sp(process.GetTarget().GetSP());
615  if (!target_sp)
616  return;
617 
618  const uint32_t event_type = event.GetType();
619  char stdio_buffer[1024];
620  size_t len;
621 
622  std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
623 
624  if (event_type &
626  // Drain stdout when we stop just in case we have any bytes
627  while ((len = process.GetSTDOUT(stdio_buffer, sizeof(stdio_buffer))) > 0)
628  if (out_sp)
629  out_sp->Write(stdio_buffer, len);
630  }
631 
632  if (event_type &
634  // Drain stderr when we stop just in case we have any bytes
635  while ((len = process.GetSTDERR(stdio_buffer, sizeof(stdio_buffer))) > 0)
636  if (err_sp)
637  err_sp->Write(stdio_buffer, len);
638  }
639 
640  if (event_type & Process::eBroadcastBitStateChanged) {
641  StateType event_state = SBProcess::GetStateFromEvent(event);
642 
643  if (event_state == eStateInvalid)
644  return;
645 
646  bool is_stopped = StateIsStoppedState(event_state);
647  if (!is_stopped)
648  process.ReportEventState(event, out_sp);
649  }
650 }
651 
653  LLDB_INSTRUMENT_VA(this);
654 
655  SBSourceManager sb_source_manager(*this);
656  return sb_source_manager;
657 }
658 
659 bool SBDebugger::GetDefaultArchitecture(char *arch_name, size_t arch_name_len) {
660  LLDB_INSTRUMENT_VA(arch_name, arch_name_len);
661 
662  if (arch_name && arch_name_len) {
663  ArchSpec default_arch = Target::GetDefaultArchitecture();
664 
665  if (default_arch.IsValid()) {
666  const std::string &triple_str = default_arch.GetTriple().str();
667  if (!triple_str.empty())
668  ::snprintf(arch_name, arch_name_len, "%s", triple_str.c_str());
669  else
670  ::snprintf(arch_name, arch_name_len, "%s",
671  default_arch.GetArchitectureName());
672  return true;
673  }
674  }
675  if (arch_name && arch_name_len)
676  arch_name[0] = '\0';
677  return false;
678 }
679 
680 bool SBDebugger::SetDefaultArchitecture(const char *arch_name) {
681  LLDB_INSTRUMENT_VA(arch_name);
682 
683  if (arch_name) {
684  ArchSpec arch(arch_name);
685  if (arch.IsValid()) {
687  return true;
688  }
689  }
690  return false;
691 }
692 
694 SBDebugger::GetScriptingLanguage(const char *script_language_name) {
695  LLDB_INSTRUMENT_VA(this, script_language_name);
696 
697  if (!script_language_name)
698  return eScriptLanguageDefault;
700  llvm::StringRef(script_language_name), eScriptLanguageDefault, nullptr);
701 }
702 
705  LLDB_INSTRUMENT_VA(this, language);
706  SBStructuredData data;
707  if (m_opaque_sp) {
709  m_opaque_sp->GetScriptInterpreter(language);
710  if (interp) {
711  data.m_impl_up->SetObjectSP(interp->GetInterpreterInfo());
712  }
713  }
714  return data;
715 }
716 
718  LLDB_INSTRUMENT();
719 
720  return lldb_private::GetVersion();
721 }
722 
724  LLDB_INSTRUMENT_VA(state);
725 
726  return lldb_private::StateAsCString(state);
727 }
728 
730  llvm::StringRef name, bool value,
731  llvm::StringRef description) {
732  auto entry_up = std::make_unique<StructuredData::Dictionary>();
733  entry_up->AddBooleanItem("value", value);
734  entry_up->AddStringItem("description", description);
735  dict.AddItem(name, std::move(entry_up));
736 }
737 
739  auto array_up = std::make_unique<StructuredData::Array>();
740 #define LLVM_TARGET(target) \
741  array_up->AddItem(std::make_unique<StructuredData::String>(#target));
742 #include "llvm/Config/Targets.def"
743  auto entry_up = std::make_unique<StructuredData::Dictionary>();
744  entry_up->AddItem("value", std::move(array_up));
745  entry_up->AddStringItem("description", "A list of configured LLVM targets.");
746  dict.AddItem("targets", std::move(entry_up));
747 }
748 
750  LLDB_INSTRUMENT();
751 
752  auto config_up = std::make_unique<StructuredData::Dictionary>();
754  *config_up, "xml", XMLDocument::XMLEnabled(),
755  "A boolean value that indicates if XML support is enabled in LLDB");
757  *config_up, "curses", LLDB_ENABLE_CURSES,
758  "A boolean value that indicates if curses support is enabled in LLDB");
760  *config_up, "editline", LLDB_ENABLE_LIBEDIT,
761  "A boolean value that indicates if editline support is enabled in LLDB");
763  *config_up, "lzma", LLDB_ENABLE_LZMA,
764  "A boolean value that indicates if lzma support is enabled in LLDB");
766  *config_up, "python", LLDB_ENABLE_PYTHON,
767  "A boolean value that indicates if python support is enabled in LLDB");
769  *config_up, "lua", LLDB_ENABLE_LUA,
770  "A boolean value that indicates if lua support is enabled in LLDB");
771  AddBoolConfigEntry(*config_up, "fbsdvmcore", LLDB_ENABLE_FBSDVMCORE,
772  "A boolean value that indicates if fbsdvmcore support is "
773  "enabled in LLDB");
774  AddLLVMTargets(*config_up);
775 
776  SBStructuredData data;
777  data.m_impl_up->SetObjectSP(std::move(config_up));
778  return data;
779 }
780 
782  LLDB_INSTRUMENT_VA(state);
783 
784  const bool result = lldb_private::StateIsRunningState(state);
785 
786  return result;
787 }
788 
790  LLDB_INSTRUMENT_VA(state);
791 
792  const bool result = lldb_private::StateIsStoppedState(state, false);
793 
794  return result;
795 }
796 
798  const char *target_triple,
799  const char *platform_name,
800  bool add_dependent_modules,
801  lldb::SBError &sb_error) {
802  LLDB_INSTRUMENT_VA(this, filename, target_triple, platform_name,
803  add_dependent_modules, sb_error);
804 
805  SBTarget sb_target;
806  TargetSP target_sp;
807  if (m_opaque_sp) {
808  sb_error.Clear();
809  OptionGroupPlatform platform_options(false);
810  platform_options.SetPlatformName(platform_name);
811 
812  sb_error.ref() = m_opaque_sp->GetTargetList().CreateTarget(
813  *m_opaque_sp, filename, target_triple,
814  add_dependent_modules ? eLoadDependentsYes : eLoadDependentsNo,
815  &platform_options, target_sp);
816 
817  if (sb_error.Success())
818  sb_target.SetSP(target_sp);
819  } else {
820  sb_error.SetErrorString("invalid debugger");
821  }
822 
823  Log *log = GetLog(LLDBLog::API);
824  LLDB_LOGF(log,
825  "SBDebugger(%p)::CreateTarget (filename=\"%s\", triple=%s, "
826  "platform_name=%s, add_dependent_modules=%u, error=%s) => "
827  "SBTarget(%p)",
828  static_cast<void *>(m_opaque_sp.get()), filename, target_triple,
829  platform_name, add_dependent_modules, sb_error.GetCString(),
830  static_cast<void *>(target_sp.get()));
831 
832  return sb_target;
833 }
834 
835 SBTarget
837  const char *target_triple) {
838  LLDB_INSTRUMENT_VA(this, filename, target_triple);
839 
840  SBTarget sb_target;
841  TargetSP target_sp;
842  if (m_opaque_sp) {
843  const bool add_dependent_modules = true;
844  Status error(m_opaque_sp->GetTargetList().CreateTarget(
845  *m_opaque_sp, filename, target_triple,
846  add_dependent_modules ? eLoadDependentsYes : eLoadDependentsNo, nullptr,
847  target_sp));
848  sb_target.SetSP(target_sp);
849  }
850 
851  Log *log = GetLog(LLDBLog::API);
852  LLDB_LOGF(log,
853  "SBDebugger(%p)::CreateTargetWithFileAndTargetTriple "
854  "(filename=\"%s\", triple=%s) => SBTarget(%p)",
855  static_cast<void *>(m_opaque_sp.get()), filename, target_triple,
856  static_cast<void *>(target_sp.get()));
857 
858  return sb_target;
859 }
860 
862  const char *arch_cstr) {
863  LLDB_INSTRUMENT_VA(this, filename, arch_cstr);
864 
865  Log *log = GetLog(LLDBLog::API);
866 
867  SBTarget sb_target;
868  TargetSP target_sp;
869  if (m_opaque_sp) {
870  Status error;
871  if (arch_cstr == nullptr) {
872  // The version of CreateTarget that takes an ArchSpec won't accept an
873  // empty ArchSpec, so when the arch hasn't been specified, we need to
874  // call the target triple version.
875  error = m_opaque_sp->GetTargetList().CreateTarget(
876  *m_opaque_sp, filename, arch_cstr, eLoadDependentsYes, nullptr,
877  target_sp);
878  } else {
879  PlatformSP platform_sp =
880  m_opaque_sp->GetPlatformList().GetSelectedPlatform();
881  ArchSpec arch =
882  Platform::GetAugmentedArchSpec(platform_sp.get(), arch_cstr);
883  if (arch.IsValid())
884  error = m_opaque_sp->GetTargetList().CreateTarget(
885  *m_opaque_sp, filename, arch, eLoadDependentsYes, platform_sp,
886  target_sp);
887  else
888  error.SetErrorStringWithFormat("invalid arch_cstr: %s", arch_cstr);
889  }
890  if (error.Success())
891  sb_target.SetSP(target_sp);
892  }
893 
894  LLDB_LOGF(log,
895  "SBDebugger(%p)::CreateTargetWithFileAndArch (filename=\"%s\", "
896  "arch=%s) => SBTarget(%p)",
897  static_cast<void *>(m_opaque_sp.get()),
898  filename ? filename : "<unspecified>",
899  arch_cstr ? arch_cstr : "<unspecified>",
900  static_cast<void *>(target_sp.get()));
901 
902  return sb_target;
903 }
904 
905 SBTarget SBDebugger::CreateTarget(const char *filename) {
906  LLDB_INSTRUMENT_VA(this, filename);
907 
908  SBTarget sb_target;
909  TargetSP target_sp;
910  if (m_opaque_sp) {
911  Status error;
912  const bool add_dependent_modules = true;
913  error = m_opaque_sp->GetTargetList().CreateTarget(
914  *m_opaque_sp, filename, "",
915  add_dependent_modules ? eLoadDependentsYes : eLoadDependentsNo, nullptr,
916  target_sp);
917 
918  if (error.Success())
919  sb_target.SetSP(target_sp);
920  }
921  Log *log = GetLog(LLDBLog::API);
922  LLDB_LOGF(log,
923  "SBDebugger(%p)::CreateTarget (filename=\"%s\") => SBTarget(%p)",
924  static_cast<void *>(m_opaque_sp.get()), filename,
925  static_cast<void *>(target_sp.get()));
926  return sb_target;
927 }
928 
930  LLDB_INSTRUMENT_VA(this);
931 
932  SBTarget sb_target;
933  if (m_opaque_sp) {
934  sb_target.SetSP(m_opaque_sp->GetDummyTarget().shared_from_this());
935  }
936  Log *log = GetLog(LLDBLog::API);
937  LLDB_LOGF(log, "SBDebugger(%p)::GetDummyTarget() => SBTarget(%p)",
938  static_cast<void *>(m_opaque_sp.get()),
939  static_cast<void *>(sb_target.GetSP().get()));
940  return sb_target;
941 }
942 
944  LLDB_INSTRUMENT_VA(this, target);
945 
946  bool result = false;
947  if (m_opaque_sp) {
948  TargetSP target_sp(target.GetSP());
949  if (target_sp) {
950  // No need to lock, the target list is thread safe
951  result = m_opaque_sp->GetTargetList().DeleteTarget(target_sp);
952  target_sp->Destroy();
953  target.Clear();
954  }
955  }
956 
957  Log *log = GetLog(LLDBLog::API);
958  LLDB_LOGF(log, "SBDebugger(%p)::DeleteTarget (SBTarget(%p)) => %i",
959  static_cast<void *>(m_opaque_sp.get()),
960  static_cast<void *>(target.m_opaque_sp.get()), result);
961 
962  return result;
963 }
964 
966  LLDB_INSTRUMENT_VA(this, idx);
967 
968  SBTarget sb_target;
969  if (m_opaque_sp) {
970  // No need to lock, the target list is thread safe
971  sb_target.SetSP(m_opaque_sp->GetTargetList().GetTargetAtIndex(idx));
972  }
973  return sb_target;
974 }
975 
977  LLDB_INSTRUMENT_VA(this, target);
978 
979  lldb::TargetSP target_sp = target.GetSP();
980  if (!target_sp)
981  return UINT32_MAX;
982 
983  if (!m_opaque_sp)
984  return UINT32_MAX;
985 
986  return m_opaque_sp->GetTargetList().GetIndexOfTarget(target.GetSP());
987 }
988 
990  LLDB_INSTRUMENT_VA(this, pid);
991 
992  SBTarget sb_target;
993  if (m_opaque_sp) {
994  // No need to lock, the target list is thread safe
995  sb_target.SetSP(m_opaque_sp->GetTargetList().FindTargetWithProcessID(pid));
996  }
997  return sb_target;
998 }
999 
1001  const char *arch_name) {
1002  LLDB_INSTRUMENT_VA(this, filename, arch_name);
1003 
1004  SBTarget sb_target;
1005  if (m_opaque_sp && filename && filename[0]) {
1006  // No need to lock, the target list is thread safe
1008  m_opaque_sp->GetPlatformList().GetSelectedPlatform().get(), arch_name);
1009  TargetSP target_sp(
1010  m_opaque_sp->GetTargetList().FindTargetWithExecutableAndArchitecture(
1011  FileSpec(filename), arch_name ? &arch : nullptr));
1012  sb_target.SetSP(target_sp);
1013  }
1014  return sb_target;
1015 }
1016 
1017 SBTarget SBDebugger::FindTargetWithLLDBProcess(const ProcessSP &process_sp) {
1018  SBTarget sb_target;
1019  if (m_opaque_sp) {
1020  // No need to lock, the target list is thread safe
1021  sb_target.SetSP(
1022  m_opaque_sp->GetTargetList().FindTargetWithProcess(process_sp.get()));
1023  }
1024  return sb_target;
1025 }
1026 
1028  LLDB_INSTRUMENT_VA(this);
1029 
1030  if (m_opaque_sp) {
1031  // No need to lock, the target list is thread safe
1032  return m_opaque_sp->GetTargetList().GetNumTargets();
1033  }
1034  return 0;
1035 }
1036 
1038  LLDB_INSTRUMENT_VA(this);
1039 
1040  Log *log = GetLog(LLDBLog::API);
1041 
1042  SBTarget sb_target;
1043  TargetSP target_sp;
1044  if (m_opaque_sp) {
1045  // No need to lock, the target list is thread safe
1046  target_sp = m_opaque_sp->GetTargetList().GetSelectedTarget();
1047  sb_target.SetSP(target_sp);
1048  }
1049 
1050  if (log) {
1051  SBStream sstr;
1052  sb_target.GetDescription(sstr, eDescriptionLevelBrief);
1053  LLDB_LOGF(log, "SBDebugger(%p)::GetSelectedTarget () => SBTarget(%p): %s",
1054  static_cast<void *>(m_opaque_sp.get()),
1055  static_cast<void *>(target_sp.get()), sstr.GetData());
1056  }
1057 
1058  return sb_target;
1059 }
1060 
1062  LLDB_INSTRUMENT_VA(this, sb_target);
1063 
1064  Log *log = GetLog(LLDBLog::API);
1065 
1066  TargetSP target_sp(sb_target.GetSP());
1067  if (m_opaque_sp) {
1068  m_opaque_sp->GetTargetList().SetSelectedTarget(target_sp);
1069  }
1070  if (log) {
1071  SBStream sstr;
1072  sb_target.GetDescription(sstr, eDescriptionLevelBrief);
1073  LLDB_LOGF(log, "SBDebugger(%p)::SetSelectedTarget () => SBTarget(%p): %s",
1074  static_cast<void *>(m_opaque_sp.get()),
1075  static_cast<void *>(target_sp.get()), sstr.GetData());
1076  }
1077 }
1078 
1080  LLDB_INSTRUMENT_VA(this);
1081 
1082  Log *log = GetLog(LLDBLog::API);
1083 
1084  SBPlatform sb_platform;
1085  DebuggerSP debugger_sp(m_opaque_sp);
1086  if (debugger_sp) {
1087  sb_platform.SetSP(debugger_sp->GetPlatformList().GetSelectedPlatform());
1088  }
1089  LLDB_LOGF(log, "SBDebugger(%p)::GetSelectedPlatform () => SBPlatform(%p): %s",
1090  static_cast<void *>(m_opaque_sp.get()),
1091  static_cast<void *>(sb_platform.GetSP().get()),
1092  sb_platform.GetName());
1093  return sb_platform;
1094 }
1095 
1097  LLDB_INSTRUMENT_VA(this, sb_platform);
1098 
1099  Log *log = GetLog(LLDBLog::API);
1100 
1101  DebuggerSP debugger_sp(m_opaque_sp);
1102  if (debugger_sp) {
1103  debugger_sp->GetPlatformList().SetSelectedPlatform(sb_platform.GetSP());
1104  }
1105 
1106  LLDB_LOGF(log, "SBDebugger(%p)::SetSelectedPlatform (SBPlatform(%p) %s)",
1107  static_cast<void *>(m_opaque_sp.get()),
1108  static_cast<void *>(sb_platform.GetSP().get()),
1109  sb_platform.GetName());
1110 }
1111 
1113  LLDB_INSTRUMENT_VA(this);
1114 
1115  if (m_opaque_sp) {
1116  // No need to lock, the platform list is thread safe
1117  return m_opaque_sp->GetPlatformList().GetSize();
1118  }
1119  return 0;
1120 }
1121 
1123  LLDB_INSTRUMENT_VA(this, idx);
1124 
1125  SBPlatform sb_platform;
1126  if (m_opaque_sp) {
1127  // No need to lock, the platform list is thread safe
1128  sb_platform.SetSP(m_opaque_sp->GetPlatformList().GetAtIndex(idx));
1129  }
1130  return sb_platform;
1131 }
1132 
1134  LLDB_INSTRUMENT_VA(this);
1135 
1136  uint32_t idx = 0;
1137  while (true) {
1139  break;
1140  }
1141  ++idx;
1142  }
1143  // +1 for the host platform, which should always appear first in the list.
1144  return idx + 1;
1145 }
1146 
1148  LLDB_INSTRUMENT_VA(this, idx);
1149 
1150  SBStructuredData data;
1151  auto platform_dict = std::make_unique<StructuredData::Dictionary>();
1152  llvm::StringRef name_str("name"), desc_str("description");
1153 
1154  if (idx == 0) {
1155  PlatformSP host_platform_sp(Platform::GetHostPlatform());
1156  platform_dict->AddStringItem(name_str, host_platform_sp->GetPluginName());
1157  platform_dict->AddStringItem(
1158  desc_str, llvm::StringRef(host_platform_sp->GetDescription()));
1159  } else if (idx > 0) {
1160  llvm::StringRef plugin_name =
1162  if (plugin_name.empty()) {
1163  return data;
1164  }
1165  platform_dict->AddStringItem(name_str, llvm::StringRef(plugin_name));
1166 
1167  llvm::StringRef plugin_desc =
1169  platform_dict->AddStringItem(desc_str, llvm::StringRef(plugin_desc));
1170  }
1171 
1172  data.m_impl_up->SetObjectSP(
1173  StructuredData::ObjectSP(platform_dict.release()));
1174  return data;
1175 }
1176 
1177 void SBDebugger::DispatchInput(void *baton, const void *data, size_t data_len) {
1178  LLDB_INSTRUMENT_VA(this, baton, data, data_len);
1179 
1180  DispatchInput(data, data_len);
1181 }
1182 
1183 void SBDebugger::DispatchInput(const void *data, size_t data_len) {
1184  LLDB_INSTRUMENT_VA(this, data, data_len);
1185 
1186  // Log *log(GetLog (LLDBLog::API));
1187  //
1188  // if (log)
1189  // LLDB_LOGF(log, "SBDebugger(%p)::DispatchInput (data=\"%.*s\",
1190  // size_t=%" PRIu64 ")",
1191  // m_opaque_sp.get(),
1192  // (int) data_len,
1193  // (const char *) data,
1194  // (uint64_t)data_len);
1195  //
1196  // if (m_opaque_sp)
1197  // m_opaque_sp->DispatchInput ((const char *) data, data_len);
1198 }
1199 
1201  LLDB_INSTRUMENT_VA(this);
1202 
1203  if (m_opaque_sp)
1204  m_opaque_sp->DispatchInputInterrupt();
1205 }
1206 
1208  LLDB_INSTRUMENT_VA(this);
1209 
1210  if (m_opaque_sp)
1211  m_opaque_sp->DispatchInputEndOfFile();
1212 }
1213 
1215  LLDB_INSTRUMENT_VA(this, reader);
1216 }
1217 
1218 void SBDebugger::RunCommandInterpreter(bool auto_handle_events,
1219  bool spawn_thread) {
1220  LLDB_INSTRUMENT_VA(this, auto_handle_events, spawn_thread);
1221 
1222  if (m_opaque_sp) {
1224  options.SetAutoHandleEvents(auto_handle_events);
1225  options.SetSpawnThread(spawn_thread);
1226  m_opaque_sp->GetCommandInterpreter().RunCommandInterpreter(options);
1227  }
1228 }
1229 
1230 void SBDebugger::RunCommandInterpreter(bool auto_handle_events,
1231  bool spawn_thread,
1233  int &num_errors, bool &quit_requested,
1234  bool &stopped_for_crash)
1235 
1236 {
1237  LLDB_INSTRUMENT_VA(this, auto_handle_events, spawn_thread, options,
1238  num_errors, quit_requested, stopped_for_crash);
1239 
1240  if (m_opaque_sp) {
1241  options.SetAutoHandleEvents(auto_handle_events);
1242  options.SetSpawnThread(spawn_thread);
1243  CommandInterpreter &interp = m_opaque_sp->GetCommandInterpreter();
1245  interp.RunCommandInterpreter(options.ref());
1246  num_errors = result.GetNumErrors();
1247  quit_requested =
1249  stopped_for_crash =
1251  }
1252 }
1253 
1255  const SBCommandInterpreterRunOptions &options) {
1256  LLDB_INSTRUMENT_VA(this, options);
1257 
1258  if (!m_opaque_sp)
1260 
1261  CommandInterpreter &interp = m_opaque_sp->GetCommandInterpreter();
1263  interp.RunCommandInterpreter(options.ref());
1264 
1265  return SBCommandInterpreterRunResult(result);
1266 }
1267 
1269  const char *repl_options) {
1270  LLDB_INSTRUMENT_VA(this, language, repl_options);
1271 
1272  SBError error;
1273  if (m_opaque_sp)
1274  error.ref() = m_opaque_sp->RunREPL(language, repl_options);
1275  else
1276  error.SetErrorString("invalid debugger");
1277  return error;
1278 }
1279 
1280 void SBDebugger::reset(const DebuggerSP &debugger_sp) {
1281  m_opaque_sp = debugger_sp;
1282 }
1283 
1284 Debugger *SBDebugger::get() const { return m_opaque_sp.get(); }
1285 
1287  assert(m_opaque_sp.get());
1288  return *m_opaque_sp;
1289 }
1290 
1291 const lldb::DebuggerSP &SBDebugger::get_sp() const { return m_opaque_sp; }
1292 
1294  LLDB_INSTRUMENT_VA(id);
1295 
1296  // No need to lock, the debugger list is thread safe
1297  SBDebugger sb_debugger;
1298  DebuggerSP debugger_sp = Debugger::FindDebuggerWithID(id);
1299  if (debugger_sp)
1300  sb_debugger.reset(debugger_sp);
1301  return sb_debugger;
1302 }
1303 
1305  LLDB_INSTRUMENT_VA(this);
1306 
1307  return (m_opaque_sp ? m_opaque_sp->GetInstanceName().AsCString() : nullptr);
1308 }
1309 
1310 SBError SBDebugger::SetInternalVariable(const char *var_name, const char *value,
1311  const char *debugger_instance_name) {
1312  LLDB_INSTRUMENT_VA(var_name, value, debugger_instance_name);
1313 
1314  SBError sb_error;
1315  DebuggerSP debugger_sp(Debugger::FindDebuggerWithInstanceName(
1316  ConstString(debugger_instance_name)));
1317  Status error;
1318  if (debugger_sp) {
1319  ExecutionContext exe_ctx(
1320  debugger_sp->GetCommandInterpreter().GetExecutionContext());
1321  error = debugger_sp->SetPropertyValue(&exe_ctx, eVarSetOperationAssign,
1322  var_name, value);
1323  } else {
1324  error.SetErrorStringWithFormat("invalid debugger instance name '%s'",
1325  debugger_instance_name);
1326  }
1327  if (error.Fail())
1328  sb_error.SetError(error);
1329  return sb_error;
1330 }
1331 
1334  const char *debugger_instance_name) {
1335  LLDB_INSTRUMENT_VA(var_name, debugger_instance_name);
1336 
1337  DebuggerSP debugger_sp(Debugger::FindDebuggerWithInstanceName(
1338  ConstString(debugger_instance_name)));
1339  Status error;
1340  if (debugger_sp) {
1341  ExecutionContext exe_ctx(
1342  debugger_sp->GetCommandInterpreter().GetExecutionContext());
1343  lldb::OptionValueSP value_sp(
1344  debugger_sp->GetPropertyValue(&exe_ctx, var_name, false, error));
1345  if (value_sp) {
1346  StreamString value_strm;
1347  value_sp->DumpValue(&exe_ctx, value_strm, OptionValue::eDumpOptionValue);
1348  const std::string &value_str = std::string(value_strm.GetString());
1349  if (!value_str.empty()) {
1350  StringList string_list;
1351  string_list.SplitIntoLines(value_str);
1352  return SBStringList(&string_list);
1353  }
1354  }
1355  }
1356  return SBStringList();
1357 }
1358 
1360  LLDB_INSTRUMENT_VA(this);
1361 
1362  return (m_opaque_sp ? m_opaque_sp->GetTerminalWidth() : 0);
1363 }
1364 
1366  LLDB_INSTRUMENT_VA(this, term_width);
1367 
1368  if (m_opaque_sp)
1369  m_opaque_sp->SetTerminalWidth(term_width);
1370 }
1371 
1372 const char *SBDebugger::GetPrompt() const {
1373  LLDB_INSTRUMENT_VA(this);
1374 
1375  Log *log = GetLog(LLDBLog::API);
1376 
1377  LLDB_LOGF(log, "SBDebugger(%p)::GetPrompt () => \"%s\"",
1378  static_cast<void *>(m_opaque_sp.get()),
1379  (m_opaque_sp ? m_opaque_sp->GetPrompt().str().c_str() : ""));
1380 
1381  return (m_opaque_sp ? ConstString(m_opaque_sp->GetPrompt()).GetCString()
1382  : nullptr);
1383 }
1384 
1385 void SBDebugger::SetPrompt(const char *prompt) {
1386  LLDB_INSTRUMENT_VA(this, prompt);
1387 
1388  if (m_opaque_sp)
1389  m_opaque_sp->SetPrompt(llvm::StringRef(prompt));
1390 }
1391 
1392 const char *SBDebugger::GetReproducerPath() const {
1393  LLDB_INSTRUMENT_VA(this);
1394 
1395  return "GetReproducerPath has been deprecated";
1396 }
1397 
1399  LLDB_INSTRUMENT_VA(this);
1400 
1401  return (m_opaque_sp ? m_opaque_sp->GetScriptLanguage() : eScriptLanguageNone);
1402 }
1403 
1405  LLDB_INSTRUMENT_VA(this, script_lang);
1406 
1407  if (m_opaque_sp) {
1408  m_opaque_sp->SetScriptLanguage(script_lang);
1409  }
1410 }
1411 
1413  LLDB_INSTRUMENT_VA(this);
1414 
1415  return (m_opaque_sp ? m_opaque_sp->GetREPLLanguage() : eLanguageTypeUnknown);
1416 }
1417 
1419  LLDB_INSTRUMENT_VA(this, repl_lang);
1420 
1421  if (m_opaque_sp) {
1422  m_opaque_sp->SetREPLLanguage(repl_lang);
1423  }
1424 }
1425 
1427  LLDB_INSTRUMENT_VA(this, value);
1428 
1429  return (m_opaque_sp ? m_opaque_sp->SetUseExternalEditor(value) : false);
1430 }
1431 
1433  LLDB_INSTRUMENT_VA(this);
1434 
1435  return (m_opaque_sp ? m_opaque_sp->GetUseExternalEditor() : false);
1436 }
1437 
1438 bool SBDebugger::SetUseColor(bool value) {
1439  LLDB_INSTRUMENT_VA(this, value);
1440 
1441  return (m_opaque_sp ? m_opaque_sp->SetUseColor(value) : false);
1442 }
1443 
1445  LLDB_INSTRUMENT_VA(this);
1446 
1447  return (m_opaque_sp ? m_opaque_sp->GetUseColor() : false);
1448 }
1449 
1451  LLDB_INSTRUMENT_VA(this, value);
1452 
1453  return (m_opaque_sp ? m_opaque_sp->SetUseSourceCache(value) : false);
1454 }
1455 
1457  LLDB_INSTRUMENT_VA(this);
1458 
1459  return (m_opaque_sp ? m_opaque_sp->GetUseSourceCache() : false);
1460 }
1461 
1463  LLDB_INSTRUMENT_VA(this, description);
1464 
1465  Stream &strm = description.ref();
1466 
1467  if (m_opaque_sp) {
1468  const char *name = m_opaque_sp->GetInstanceName().AsCString();
1469  user_id_t id = m_opaque_sp->GetID();
1470  strm.Printf("Debugger (instance: \"%s\", id: %" PRIu64 ")", name, id);
1471  } else
1472  strm.PutCString("No value");
1473 
1474  return true;
1475 }
1476 
1478  LLDB_INSTRUMENT_VA(this);
1479 
1480  return (m_opaque_sp ? m_opaque_sp->GetID() : LLDB_INVALID_UID);
1481 }
1482 
1483 SBError SBDebugger::SetCurrentPlatform(const char *platform_name_cstr) {
1484  LLDB_INSTRUMENT_VA(this, platform_name_cstr);
1485 
1486  SBError sb_error;
1487  if (m_opaque_sp) {
1488  if (platform_name_cstr && platform_name_cstr[0]) {
1489  PlatformList &platforms = m_opaque_sp->GetPlatformList();
1490  if (PlatformSP platform_sp = platforms.GetOrCreate(platform_name_cstr))
1491  platforms.SetSelectedPlatform(platform_sp);
1492  else
1493  sb_error.ref().SetErrorString("platform not found");
1494  } else {
1495  sb_error.ref().SetErrorString("invalid platform name");
1496  }
1497  } else {
1498  sb_error.ref().SetErrorString("invalid debugger");
1499  }
1500  return sb_error;
1501 }
1502 
1503 bool SBDebugger::SetCurrentPlatformSDKRoot(const char *sysroot) {
1504  LLDB_INSTRUMENT_VA(this, sysroot);
1505 
1506  if (SBPlatform platform = GetSelectedPlatform()) {
1507  platform.SetSDKRoot(sysroot);
1508  return true;
1509  }
1510  return false;
1511 }
1512 
1514  LLDB_INSTRUMENT_VA(this);
1515 
1516  return (m_opaque_sp ? m_opaque_sp->GetCloseInputOnEOF() : false);
1517 }
1518 
1520  LLDB_INSTRUMENT_VA(this, b);
1521 
1522  if (m_opaque_sp)
1523  m_opaque_sp->SetCloseInputOnEOF(b);
1524 }
1525 
1526 SBTypeCategory SBDebugger::GetCategory(const char *category_name) {
1527  LLDB_INSTRUMENT_VA(this, category_name);
1528 
1529  if (!category_name || *category_name == 0)
1530  return SBTypeCategory();
1531 
1532  TypeCategoryImplSP category_sp;
1533 
1535  category_sp, false)) {
1536  return SBTypeCategory(category_sp);
1537  } else {
1538  return SBTypeCategory();
1539  }
1540 }
1541 
1543  LLDB_INSTRUMENT_VA(this, lang_type);
1544 
1545  TypeCategoryImplSP category_sp;
1546  if (DataVisualization::Categories::GetCategory(lang_type, category_sp)) {
1547  return SBTypeCategory(category_sp);
1548  } else {
1549  return SBTypeCategory();
1550  }
1551 }
1552 
1553 SBTypeCategory SBDebugger::CreateCategory(const char *category_name) {
1554  LLDB_INSTRUMENT_VA(this, category_name);
1555 
1556  if (!category_name || *category_name == 0)
1557  return SBTypeCategory();
1558 
1559  TypeCategoryImplSP category_sp;
1560 
1562  category_sp, true)) {
1563  return SBTypeCategory(category_sp);
1564  } else {
1565  return SBTypeCategory();
1566  }
1567 }
1568 
1569 bool SBDebugger::DeleteCategory(const char *category_name) {
1570  LLDB_INSTRUMENT_VA(this, category_name);
1571 
1572  if (!category_name || *category_name == 0)
1573  return false;
1574 
1575  return DataVisualization::Categories::Delete(ConstString(category_name));
1576 }
1577 
1579  LLDB_INSTRUMENT_VA(this);
1580 
1582 }
1583 
1585  LLDB_INSTRUMENT_VA(this, index);
1586 
1587  return SBTypeCategory(
1589 }
1590 
1592  LLDB_INSTRUMENT_VA(this);
1593 
1594  return GetCategory("default");
1595 }
1596 
1598  LLDB_INSTRUMENT_VA(this, type_name);
1599 
1600  SBTypeCategory default_category_sb = GetDefaultCategory();
1601  if (default_category_sb.GetEnabled())
1602  return default_category_sb.GetFormatForType(type_name);
1603  return SBTypeFormat();
1604 }
1605 
1607  LLDB_INSTRUMENT_VA(this, type_name);
1608 
1609  if (!type_name.IsValid())
1610  return SBTypeSummary();
1612 }
1613 
1615  LLDB_INSTRUMENT_VA(this, type_name);
1616 
1617  if (!type_name.IsValid())
1618  return SBTypeFilter();
1620 }
1621 
1623  LLDB_INSTRUMENT_VA(this, type_name);
1624 
1625  if (!type_name.IsValid())
1626  return SBTypeSynthetic();
1627  return SBTypeSynthetic(
1629 }
1630 
1631 static llvm::ArrayRef<const char *> GetCategoryArray(const char **categories) {
1632  if (categories == nullptr)
1633  return {};
1634  size_t len = 0;
1635  while (categories[len] != nullptr)
1636  ++len;
1637  return llvm::makeArrayRef(categories, len);
1638 }
1639 
1640 bool SBDebugger::EnableLog(const char *channel, const char **categories) {
1641  LLDB_INSTRUMENT_VA(this, channel, categories);
1642 
1643  if (m_opaque_sp) {
1644  uint32_t log_options =
1647  llvm::raw_string_ostream error_stream(error);
1648  return m_opaque_sp->EnableLog(channel, GetCategoryArray(categories), "",
1649  log_options, /*buffer_size=*/0,
1650  eLogHandlerStream, error_stream);
1651  } else
1652  return false;
1653 }
1654 
1656  void *baton) {
1657  LLDB_INSTRUMENT_VA(this, log_callback, baton);
1658 
1659  if (m_opaque_sp) {
1660  return m_opaque_sp->SetLoggingCallback(log_callback, baton);
1661  }
1662 }
1663 
1664 SBTrace
1666  const SBFileSpec &trace_description_file) {
1667  LLDB_INSTRUMENT_VA(this, error, trace_description_file);
1668  return SBTrace::LoadTraceFromFile(error, *this, trace_description_file);
1669 }
lldb::SBCommandInterpreterRunOptions::SetSpawnThread
void SetSpawnThread(bool)
Definition: SBCommandInterpreterRunOptions.cpp:161
lldb::SBStringList
Definition: SBStringList.h:16
Instrumentation.h
SBTypeSynthetic.h
lldb::SBDebugger::StateAsCString
static const char * StateAsCString(lldb::StateType state)
Definition: SBDebugger.cpp:723
lldb::SBDebugger::HandleCommand
void HandleCommand(const char *command)
Definition: SBDebugger.cpp:544
LLDB_LOG_OPTION_PREPEND_THREAD_NAME
#define LLDB_LOG_OPTION_PREPEND_THREAD_NAME
Definition: Log.h:40
SBCommandInterpreterRunOptions.h
lldb::SBDebugger::ref
lldb_private::Debugger & ref() const
Definition: SBDebugger.cpp:1286
lldb::SBDebugger::GetProgressFromEvent
static const char * GetProgressFromEvent(const lldb::SBEvent &event, uint64_t &progress_id, uint64_t &completed, uint64_t &total, bool &is_debugger_specific)
Get progress data from a SBEvent whose type is eBroadcastBitProgress.
Definition: SBDebugger.cpp:153
SystemLifetimeManager.h
lldb::SBDebugger::GetOutputFile
SBFile GetOutputFile()
Definition: SBDebugger.cpp:492
lldb::SBCommandInterpreterRunResult
Definition: SBCommandInterpreterRunOptions.h:85
lldb::SBDebugger::GetOutputFileHandle
FILE * GetOutputFileHandle()
Definition: SBDebugger.cpp:483
lldb::SBDebugger::GetNumCategories
uint32_t GetNumCategories()
Definition: SBDebugger.cpp:1578
lldb::SBDebugger::SetInputFile
SBError SetInputFile(SBFile file)
Definition: SBDebugger.cpp:372
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb::SBEvent::get
lldb_private::Event * get() const
Definition: SBEvent.cpp:133
lldb::SBDebugger::SetInputFileHandle
void SetInputFileHandle(FILE *f, bool transfer_ownership)
Definition: SBDebugger.cpp:339
lldb::SBTypeNameSpecifier
Definition: SBTypeNameSpecifier.h:17
lldb::SBCommandReturnObject::PutOutput
size_t PutOutput(FILE *fh)
Definition: SBCommandReturnObject.cpp:111
lldb::SBDebugger::DispatchInputEndOfFile
void DispatchInputEndOfFile()
Definition: SBDebugger.cpp:1207
lldb::SBCommandInterpreter::SourceInitFileInHomeDirectory
void SourceInitFileInHomeDirectory(lldb::SBCommandReturnObject &result)
Definition: SBCommandInterpreter.cpp:446
lldb::SBStream::ref
lldb_private::Stream & ref()
Definition: SBStream.cpp:176
lldb_private::DataVisualization::Categories::GetCount
static uint32_t GetCount()
Definition: DataVisualization.cpp:160
lldb::SBDebugger::RunCommandInterpreter
void RunCommandInterpreter(bool auto_handle_events, bool spawn_thread)
Run the command interpreter.
Definition: SBDebugger.cpp:1218
lldb::ScriptLanguage
ScriptLanguage
Script interpreter types.
Definition: lldb-enumerations.h:216
lldb_private::StructuredData::Dictionary
Definition: StructuredData.h:352
lldb::SBProcess::GetStateFromEvent
static lldb::StateType GetStateFromEvent(const lldb::SBEvent &event)
Definition: SBProcess.cpp:713
lldb::SBDebugger::GetDummyTarget
lldb::SBTarget GetDummyTarget()
Definition: SBDebugger.cpp:929
lldb_private::ArchSpec
Definition: ArchSpec.h:32
lldb::SBDebugger::GetBroadcasterClass
static const char * GetBroadcasterClass()
Definition: SBDebugger.cpp:147
lldb::SBFile::m_opaque_sp
FileSP m_opaque_sp
Definition: SBFile.h:45
lldb::SBDebugger::StateIsStoppedState
static bool StateIsStoppedState(lldb::StateType state)
Definition: SBDebugger.cpp:789
lldb::SBTypeFilter
Definition: SBTypeFilter.h:17
lldb::SBCommandInterpreter::get
lldb_private::CommandInterpreter * get()
Definition: SBCommandInterpreter.cpp:418
lldb::SBDebugger::GetInputFile
SBFile GetInputFile()
Definition: SBDebugger.cpp:475
lldb::SBDebugger::GetSourceManager
lldb::SBSourceManager GetSourceManager()
Definition: SBDebugger.cpp:652
lldb::SBDebugger::GetIndexOfTarget
uint32_t GetIndexOfTarget(lldb::SBTarget target)
Definition: SBDebugger.cpp:976
SBTypeSummary.h
lldb::SBDebugger::SkipLLDBInitFiles
void SkipLLDBInitFiles(bool b)
Definition: SBDebugger.cpp:325
lldb_private::CommandInterpreter::SkipAppInitFiles
void SkipAppInitFiles(bool skip_app_init_files)
Definition: CommandInterpreter.h:485
lldb::SBDebugger::SetCurrentPlatform
lldb::SBError SetCurrentPlatform(const char *platform_name)
Definition: SBDebugger.cpp:1483
lldb::SBDebugger::GetUseExternalEditor
bool GetUseExternalEditor()
Definition: SBDebugger.cpp:1432
lldb_private::DiagnosticEventData::IsDebuggerSpecific
bool IsDebuggerSpecific() const
Definition: DebuggerEvents.h:64
lldb::SBError::GetCString
const char * GetCString() const
Get the error string as a NULL terminated UTF8 c-string.
Definition: SBError.cpp:38
lldb::SBDebugger::Clear
void Clear()
Definition: SBDebugger.cpp:227
lldb::SBDebugger::GetTerminalWidth
uint32_t GetTerminalWidth() const
Definition: SBDebugger.cpp:1359
lldb::SBDebugger::GetErrorFileHandle
FILE * GetErrorFileHandle()
Definition: SBDebugger.cpp:501
lldb::SBError
class LLDB_API SBError
Definition: SBDefines.h:52
lldb::SBDebugger::GetUseColor
bool GetUseColor() const
Definition: SBDebugger.cpp:1444
lldb::SBCommandReturnObject
Definition: SBCommandReturnObject.h:24
lldb::LogOutputCallback
void(* LogOutputCallback)(const char *, void *baton)
Definition: lldb-types.h:70
lldb_private::DataVisualization::Categories::GetCategory
static bool GetCategory(ConstString category, lldb::TypeCategoryImplSP &entry, bool allow_create=true)
Definition: DataVisualization.cpp:76
lldb::SBError
Definition: SBError.h:20
lldb::SBDebugger::Create
static lldb::SBDebugger Create()
Definition: SBDebugger.cpp:236
lldb::SBDebugger::SetOutputFile
SBError SetOutputFile(SBFile file)
Definition: SBDebugger.cpp:403
lldb::SBProcess::IsValid
bool IsValid() const
Definition: SBProcess.cpp:112
lldb_private::CommandInterpreterRunOptions::SetSpawnThread
void SetSpawnThread(bool spawn_thread)
Definition: CommandInterpreter.h:179
lldb::SBTypeSynthetic
class LLDB_API SBTypeSynthetic
Definition: SBDefines.h:102
lldb::SBCommandInterpreter
Definition: SBCommandInterpreter.h:19
SBStringList.h
lldb::SBInputReader
Definition: SBDebugger.h:19
LLDB_INVALID_UID
#define LLDB_INVALID_UID
Definition: lldb-defines.h:80
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:344
lldb_private::CommandInterpreterRunResult
Definition: CommandInterpreter.h:34
lldb::SBDebugger::GetSelectedTarget
lldb::SBTarget GetSelectedTarget()
Definition: SBDebugger.cpp:1037
lldb::SBTypeCategory::GetEnabled
bool GetEnabled()
Definition: SBTypeCategory.cpp:52
lldb::SBDebugger::GetListener
lldb::SBListener GetListener()
Definition: SBDebugger.cpp:577
lldb::SBInputReader::Initialize
SBError Initialize(lldb::SBDebugger &sb_debugger, unsigned long(*callback)(void *, lldb::SBInputReader *, lldb::InputReaderAction, char const *, unsigned long), void *a, lldb::InputReaderGranularity b, char const *c, char const *d, bool e)
Definition: SBDebugger.cpp:105
lldb::SBTypeSummary
class LLDB_API SBTypeSummary
Definition: SBDefines.h:100
lldb_private::StateAsCString
const char * StateAsCString(lldb::StateType state)
Converts a StateType to a C string.
Definition: State.cpp:14
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
lldb_private::GetVersion
const char * GetVersion()
Retrieves a string representing the complete LLDB version, which includes the lldb version number,...
Definition: Version.cpp:38
lldb::SBDebugger::GetInstanceName
const char * GetInstanceName()
Definition: SBDebugger.cpp:1304
lldb_private::StateIsRunningState
bool StateIsRunningState(lldb::StateType state)
Check if a state represents a state where the process or thread is running.
Definition: State.cpp:68
OptionArgParser.h
lldb::SBDebugger::MemoryPressureDetected
static void MemoryPressureDetected()
Definition: SBDebugger.cpp:289
lldb_private::ConstString::AsCString
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
Definition: ConstString.h:192
lldb_private::OptionArgParser::ToScriptLanguage
static lldb::ScriptLanguage ToScriptLanguage(llvm::StringRef s, lldb::ScriptLanguage fail_value, bool *success_ptr)
Definition: OptionArgParser.cpp:123
lldb_private::Debugger::CreateInstance
static lldb::DebuggerSP CreateInstance(lldb::LogOutputCallback log_callback=nullptr, void *baton=nullptr)
Definition: Debugger.cpp:652
lldb_private::StringList::SplitIntoLines
size_t SplitIntoLines(const std::string &lines)
Definition: StringList.cpp:152
lldb::SBDebugger::SetErrorFile
SBError SetErrorFile(SBFile file)
Definition: SBDebugger.cpp:428
lldb::SBDebugger::DeleteTarget
bool DeleteTarget(lldb::SBTarget &target)
Definition: SBDebugger.cpp:943
lldb_private::FileSystem::Exists
bool Exists(const FileSpec &file_spec) const
Returns whether the given file exists.
Definition: common/FileSystem.cpp:150
lldb::SBDebugger::GetNumAvailablePlatforms
uint32_t GetNumAvailablePlatforms()
Get the number of available platforms.
Definition: SBDebugger.cpp:1133
lldb::SBEvent
Definition: SBEvent.h:21
LLDB_INSTRUMENT
#define LLDB_INSTRUMENT()
Definition: Instrumentation.h:95
lldb::SBProcess
Definition: SBProcess.h:23
lldb::SBDebugger::GetFilterForType
SBTypeFilter GetFilterForType(SBTypeNameSpecifier)
Definition: SBDebugger.cpp:1614
lldb_private::DiagnosticEventData::GetEventDataFromEvent
static const DiagnosticEventData * GetEventDataFromEvent(const Event *event_ptr)
Definition: DebuggerEvents.cpp:82
lldb::SBProcess::ReportEventState
void ReportEventState(const lldb::SBEvent &event, FILE *out) const
Definition: SBProcess.cpp:305
lldb::SBListener::reset
void reset(lldb::ListenerSP listener_sp)
Definition: SBListener.cpp:292
lldb_private::Stream
Definition: Stream.h:28
lldb_private::ArchSpec::GetTriple
llvm::Triple & GetTriple()
Architecture triple accessor.
Definition: ArchSpec.h:454
lldb::SBDebugger::PrintStackTraceOnError
static void PrintStackTraceOnError()
Definition: SBDebugger.cpp:212
lldb::SBCommandInterpreterRunOptions::SetAutoHandleEvents
void SetAutoHandleEvents(bool)
Definition: SBCommandInterpreterRunOptions.cpp:148
lldb::SBPlatform::GetName
const char * GetName()
Definition: SBPlatform.cpp:337
lldb::SBProcess::GetSTDOUT
size_t GetSTDOUT(char *dst, size_t dst_len) const
Definition: SBProcess.cpp:260
lldb::SBStringList
class LLDB_API SBStringList
Definition: SBDefines.h:81
lldb::SBDebugger::GetDescription
bool GetDescription(lldb::SBStream &description)
Definition: SBDebugger.cpp:1462
lldb::SBCommandInterpreter::HandleCommand
lldb::ReturnStatus HandleCommand(const char *command_line, lldb::SBCommandReturnObject &result, bool add_to_history=false)
Definition: SBCommandInterpreter.cpp:150
lldb_private::DataVisualization::Categories::Delete
static bool Delete(ConstString category)
Definition: DataVisualization.cpp:95
Debugger.h
lldb_private::CommandInterpreterRunOptions
Definition: CommandInterpreter.h:59
lldb::SBTypeSummary
Definition: SBTypeSummary.h:55
SBListener.h
lldb::SBDebugger::SetPrompt
void SetPrompt(const char *prompt)
Definition: SBDebugger.cpp:1385
SBSourceManager.h
lldb_private::StreamString::GetString
llvm::StringRef GetString() const
Definition: StreamString.cpp:51
lldb_private::CommandInterpreter::RunCommandInterpreter
CommandInterpreterRunResult RunCommandInterpreter(CommandInterpreterRunOptions &options)
lldb::SBStructuredData::m_impl_up
StructuredDataImplUP m_impl_up
Definition: SBStructuredData.h:104
lldb_private::OptionGroupPlatform
Definition: OptionGroupPlatform.h:21
lldb::SBDebugger::SetAsync
void SetAsync(bool b)
Definition: SBDebugger.cpp:312
lldb::SBDebugger::CreateCategory
SBTypeCategory CreateCategory(const char *category_name)
Definition: SBDebugger.cpp:1553
lldb::SBDebugger::GetDefaultCategory
SBTypeCategory GetDefaultCategory()
Definition: SBDebugger.cpp:1591
Process.h
lldb_private::LLDBLog::API
@ API
lldb::eScriptLanguageNone
@ eScriptLanguageNone
Definition: lldb-enumerations.h:217
lldb::SBDebugger::GetVersionString
static const char * GetVersionString()
Definition: SBDebugger.cpp:717
lldb::SBDebugger::CreateTargetWithFileAndTargetTriple
lldb::SBTarget CreateTargetWithFileAndTargetTriple(const char *filename, const char *target_triple)
Definition: SBDebugger.cpp:836
lldb::SBDebugger::SetSelectedTarget
void SetSelectedTarget(SBTarget &target)
Definition: SBDebugger.cpp:1061
lldb::SBDebugger::SetErrorFileHandle
void SetErrorFileHandle(FILE *f, bool transfer_ownership)
Definition: SBDebugger.cpp:418
lldb::SBTrace
Definition: SBTrace.h:18
lldb::SBDebugger::SetUseColor
bool SetUseColor(bool use_color)
Definition: SBDebugger.cpp:1438
lldb_private::OptionGroupPlatform::SetPlatformName
void SetPlatformName(const char *platform_name)
Definition: OptionGroupPlatform.h:43
lldb::SBTarget
Definition: SBTarget.h:29
lldb_private::DiagnosticEventData::GetPrefix
llvm::StringRef GetPrefix() const
Definition: DebuggerEvents.cpp:52
lldb::SBDebugger::SetScriptLanguage
void SetScriptLanguage(lldb::ScriptLanguage script_lang)
Definition: SBDebugger.cpp:1404
lldb::SBDebugger::GetCategory
SBTypeCategory GetCategory(const char *category_name)
Definition: SBDebugger.cpp:1526
lldb_private::FileSpec
Definition: FileSpec.h:55
lldb::SBTrace::LoadTraceFromFile
static SBTrace LoadTraceFromFile(SBError &error, SBDebugger &debugger, const SBFileSpec &trace_description_file)
See SBDebugger::LoadTraceFromFile.
Definition: SBTrace.cpp:31
lldb_private::Platform::GetHostPlatform
static lldb::PlatformSP GetHostPlatform()
Get the native host platform plug-in.
Definition: Platform.cpp:136
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
SystemInitializerFull.h
lldb::SBError::Success
bool Success() const
Definition: SBError.cpp:64
SBStream.h
lldb_private::Debugger::GetStaticBroadcasterClass
static ConstString GetStaticBroadcasterClass()
Definition: Debugger.cpp:735
TargetList.h
lldb_private::DataVisualization::GetSyntheticForType
static lldb::ScriptedSyntheticChildrenSP GetSyntheticForType(lldb::TypeNameSpecifierImplSP type_sp)
Definition: DataVisualization.cpp:64
lldb::SBFile
Definition: SBFile.h:16
lldb_private::OptionValue::eDumpOptionValue
@ eDumpOptionValue
Definition: OptionValue.h:54
lldb_private::Process::eBroadcastBitStateChanged
@ eBroadcastBitStateChanged
Definition: Process.h:354
lldb::SBError::Clear
void Clear()
Definition: SBError.cpp:46
lldb::SBDebugger::IsValid
bool IsValid() const
Definition: SBDebugger.cpp:302
bool
lldb::SBDebugger::GetAvailablePlatformInfoAtIndex
lldb::SBStructuredData GetAvailablePlatformInfoAtIndex(uint32_t idx)
Get the name and description of one of the available platforms.
Definition: SBDebugger.cpp:1147
lldb::InputReaderAction
InputReaderAction
Definition: lldb-enumerations.h:385
lldb_private::StateIsStoppedState
bool StateIsStoppedState(lldb::StateType state, bool must_exist)
Check if a state represents a state where the process or thread is stopped.
Definition: State.cpp:89
AddLLVMTargets
static void AddLLVMTargets(StructuredData::Dictionary &dict)
Definition: SBDebugger.cpp:738
lldb::SBCommandInterpreterRunOptions::ref
lldb_private::CommandInterpreterRunOptions & ref() const
Definition: SBCommandInterpreterRunOptions.cpp:173
lldb::SBDebugger::InitializeWithErrorHandling
static lldb::SBError InitializeWithErrorHandling()
Definition: SBDebugger.cpp:201
lldb::SBDebugger
Definition: SBDebugger.h:34
Version.h
SBThread.h
Args.h
lldb::SBDebugger::GetCloseInputOnEOF
bool GetCloseInputOnEOF() const
Definition: SBDebugger.cpp:1513
lldb::SBDebugger::SetInternalVariable
static lldb::SBError SetInternalVariable(const char *var_name, const char *value, const char *debugger_instance_name)
Definition: SBDebugger.cpp:1310
lldb::SBDebugger::GetInputFileHandle
FILE * GetInputFileHandle()
Definition: SBDebugger.cpp:466
lldb_private::eLoadDependentsNo
@ eLoadDependentsNo
Definition: lldb-private-enumerations.h:231
lldb::SBDebugger::SetSelectedPlatform
void SetSelectedPlatform(lldb::SBPlatform &platform)
Definition: SBDebugger.cpp:1096
lldb::SBPlatform::GetSP
lldb::PlatformSP GetSP() const
Definition: SBPlatform.cpp:346
lldb::SBCommandReturnObject::PutError
size_t PutError(FILE *fh)
Definition: SBCommandReturnObject.cpp:135
lldb::SBProcess::GetSTDERR
size_t GetSTDERR(char *dst, size_t dst_len) const
Definition: SBProcess.cpp:273
lldb::SBDebugger::GetREPLLanguage
lldb::LanguageType GetREPLLanguage() const
Definition: SBDebugger.cpp:1412
SBFrame.h
Progress.h
lldb_private::StructuredData::ObjectSP
std::shared_ptr< Object > ObjectSP
Definition: StructuredData.h:59
lldb_private::ProgressEventData::GetID
uint64_t GetID() const
Definition: DebuggerEvents.h:35
lldb_private::ProgressEventData
Definition: DebuggerEvents.h:21
lldb::SBDebugger::GetNumPlatforms
uint32_t GetNumPlatforms()
Get the number of currently active platforms.
Definition: SBDebugger.cpp:1112
lldb::SBDebugger::GetSyntheticForType
SBTypeSynthetic GetSyntheticForType(SBTypeNameSpecifier)
Definition: SBDebugger.cpp:1622
lldb::SBTypeFormat
Definition: SBTypeFormat.h:17
lldb_private::ProgressEventData::GetEventDataFromEvent
static const ProgressEventData * GetEventDataFromEvent(const Event *event_ptr)
Definition: DebuggerEvents.cpp:48
lldb::SBDebugger::GetReproducerPath
const char * GetReproducerPath() const
Definition: SBDebugger.cpp:1392
lldb_private::StringList
Definition: StringList.h:26
SBBroadcaster.h
lldb_private::ConstString
Definition: ConstString.h:39
lldb_private::XMLDocument::XMLEnabled
static bool XMLEnabled()
Definition: XML.cpp:81
lldb::SBDebugger::GetScriptLanguage
lldb::ScriptLanguage GetScriptLanguage() const
Definition: SBDebugger.cpp:1398
lldb_private::StreamString
Definition: StreamString.h:23
lldb::SBError::SetErrorString
void SetErrorString(const char *err_str)
Definition: SBError.cpp:121
lldb::SBDebugger::GetPrompt
const char * GetPrompt() const
Definition: SBDebugger.cpp:1372
lldb::SBDebugger::SetTerminalWidth
void SetTerminalWidth(uint32_t term_width)
Definition: SBDebugger.cpp:1365
lldb::SBDebugger::RestoreInputTerminalState
void RestoreInputTerminalState()
Definition: SBDebugger.cpp:528
lldb::SBDebugger::GetErrorFile
SBFile GetErrorFile()
Definition: SBDebugger.cpp:511
lldb::SBFile
class LLDB_API SBFile
Definition: SBDefines.h:57
lldb::SBDebugger::StateIsRunningState
static bool StateIsRunningState(lldb::StateType state)
Definition: SBDebugger.cpp:781
AddBoolConfigEntry
static void AddBoolConfigEntry(StructuredData::Dictionary &dict, llvm::StringRef name, bool value, llvm::StringRef description)
Definition: SBDebugger.cpp:729
OptionGroupPlatform.h
lldb::SBDebugger::RunREPL
SBError RunREPL(lldb::LanguageType language, const char *repl_options)
Definition: SBDebugger.cpp:1268
lldb_private::ModuleList::RemoveOrphanSharedModules
static size_t RemoveOrphanSharedModules(bool mandatory)
Definition: ModuleList.cpp:781
lldb::SBDebugger::PushInputReader
void PushInputReader(lldb::SBInputReader &reader)
Definition: SBDebugger.cpp:1214
lldb_private::CommandInterpreter
Definition: CommandInterpreter.h:214
lldb::SBDebugger::LoadTraceFromFile
SBTrace LoadTraceFromFile(SBError &error, const SBFileSpec &trace_description_file)
Load a trace from a trace description file and create Targets, Processes and Threads based on the con...
Definition: SBDebugger.cpp:1665
SBDebugger.h
lldb_private::File
Definition: File.h:35
lldb_private::Process::eBroadcastBitSTDERR
@ eBroadcastBitSTDERR
Definition: Process.h:357
lldb::SBDebugger::FindTargetWithLLDBProcess
lldb::SBTarget FindTargetWithLLDBProcess(const lldb::ProcessSP &processSP)
Definition: SBDebugger.cpp:1017
lldb_private::Debugger
Definition: Debugger.h:74
lldb::SBDebugger::EnableLog
bool EnableLog(const char *channel, const char **categories)
Definition: SBDebugger.cpp:1640
lldb::SBDebugger::GetID
lldb::user_id_t GetID()
Definition: SBDebugger.cpp:1477
lldb::SBDebugger::GetSummaryForType
SBTypeSummary GetSummaryForType(SBTypeNameSpecifier)
Definition: SBDebugger.cpp:1606
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb::SBDebugger::GetUseSourceCache
bool GetUseSourceCache() const
Definition: SBDebugger.cpp:1456
lldb_private::PlatformList
Definition: Platform.h:974
lldb::SBDebugger::reset
void reset(const lldb::DebuggerSP &debugger_sp)
Definition: SBDebugger.cpp:1280
lldb::SBTarget::Clear
void Clear()
Definition: SBTarget.cpp:1538
lldb::SBDebugger::GetPlatformAtIndex
lldb::SBPlatform GetPlatformAtIndex(uint32_t idx)
Get one of the currently active platforms.
Definition: SBDebugger.cpp:1122
lldb_private::ArchSpec::IsValid
bool IsValid() const
Tests if this ArchSpec is valid.
Definition: ArchSpec.h:352
lldb::SBDebugger::GetAsync
bool GetAsync()
Definition: SBDebugger.cpp:319
lldb_private::ProgressEventData::IsDebuggerSpecific
bool IsDebuggerSpecific() const
Definition: DebuggerEvents.h:40
lldb::SBError::SetError
void SetError(uint32_t err, lldb::ErrorType type)
Definition: SBError.cpp:95
lldb_private::CommandInterpreterRunResult::IsResult
bool IsResult(lldb::CommandInterpreterResult result)
Definition: CommandInterpreter.h:42
SBTypeNameSpecifier.h
lldb::SBDebugger::SaveInputTerminalState
void SaveInputTerminalState()
Definition: SBDebugger.cpp:521
lldb::SBDebugger::GetNumTargets
uint32_t GetNumTargets()
Definition: SBDebugger.cpp:1027
lldb::SBTypeCategory::GetFormatForType
SBTypeFormat GetFormatForType(SBTypeNameSpecifier)
Definition: SBTypeCategory.cpp:195
lldb::SBDebugger::~SBDebugger
~SBDebugger()
lldb::SBDebugger::Destroy
static void Destroy(lldb::SBDebugger &debugger)
Definition: SBDebugger.cpp:280
lldb::SBDebugger::operator=
lldb::SBDebugger & operator=(const lldb::SBDebugger &rhs)
Definition: SBDebugger.cpp:138
lldb_private::StructuredData::Dictionary::AddItem
void AddItem(llvm::StringRef key, ObjectSP value_sp)
Definition: StructuredData.h:504
lldb::SBDebugger::GetSetting
lldb::SBStructuredData GetSetting(const char *setting=nullptr)
Getting a specific setting value into SBStructuredData format.
Definition: SBDebugger.cpp:443
lldb::SBDebugger::GetTargetAtIndex
lldb::SBTarget GetTargetAtIndex(uint32_t idx)
Definition: SBDebugger.cpp:965
lldb::SBCommandInterpreter::SourceInitFileInGlobalDirectory
void SourceInitFileInGlobalDirectory(lldb::SBCommandReturnObject &result)
Definition: SBCommandInterpreter.cpp:430
LoadPlugin
static llvm::sys::DynamicLibrary LoadPlugin(const lldb::DebuggerSP &debugger_sp, const FileSpec &spec, Status &error)
Definition: SBDebugger.cpp:67
lldb_private::DiagnosticEventData
Definition: DebuggerEvents.h:52
lldb::SBDebugger::GetDefaultArchitecture
static bool GetDefaultArchitecture(char *arch_name, size_t arch_name_len)
Definition: SBDebugger.cpp:659
lldb_private::StreamFile::GetFile
File & GetFile()
Definition: StreamFile.h:37
lldb_private::eLoadDependentsYes
@ eLoadDependentsYes
Definition: lldb-private-enumerations.h:230
LLDB_LOG_OPTION_PREPEND_TIMESTAMP
#define LLDB_LOG_OPTION_PREPEND_TIMESTAMP
Definition: Log.h:38
StreamFile.h
lldb::SBDebugger::FindTargetWithProcessID
lldb::SBTarget FindTargetWithProcessID(pid_t pid)
Definition: SBDebugger.cpp:989
lldb_private::DataVisualization::GetSummaryForType
static lldb::TypeSummaryImplSP GetSummaryForType(lldb::TypeNameSpecifierImplSP type_sp)
Definition: DataVisualization.cpp:48
SBFile.h
lldb_private::eLogHandlerStream
@ eLogHandlerStream
Definition: lldb-private-enumerations.h:221
lldb::eScriptLanguageDefault
@ eScriptLanguageDefault
Definition: lldb-enumerations.h:221
lldb_private::Debugger::FindDebuggerWithInstanceName
static lldb::DebuggerSP FindDebuggerWithInstanceName(ConstString instance_name)
Definition: Debugger.cpp:692
lldb::SBDebugger::GetCategoryAtIndex
SBTypeCategory GetCategoryAtIndex(uint32_t)
Definition: SBDebugger.cpp:1584
lldb::SBInputReader::SetIsDone
void SetIsDone(bool)
Definition: SBDebugger.cpp:117
lldb::SBDebugger::SetCloseInputOnEOF
void SetCloseInputOnEOF(bool b)
Definition: SBDebugger.cpp:1519
lldb_private::PlatformList::SetSelectedPlatform
void SetSelectedPlatform(const lldb::PlatformSP &platform_sp)
Definition: Platform.h:1016
lldb_private::Status
Definition: Status.h:44
GetCategoryArray
static llvm::ArrayRef< const char * > GetCategoryArray(const char **categories)
Definition: SBDebugger.cpp:1631
lldb::SBListener
Definition: SBListener.h:16
DataVisualization.h
lldb::SBDebugger::GetCommandInterpreter
lldb::SBCommandInterpreter GetCommandInterpreter()
Definition: SBDebugger.cpp:534
lldb_private::Target::GetDefaultArchitecture
static ArchSpec GetDefaultArchitecture()
Definition: Target.cpp:2450
lldb_private::ArchSpec::GetArchitectureName
const char * GetArchitectureName() const
Returns a static string representing the current architecture.
Definition: ArchSpec.cpp:535
lldb::eLanguageTypeUnknown
@ eLanguageTypeUnknown
Unknown or invalid language value.
Definition: lldb-enumerations.h:437
lldb_private::DataVisualization::GetFilterForType
static lldb::TypeFilterImplSP GetFilterForType(lldb::TypeNameSpecifierImplSP type_sp)
Definition: DataVisualization.cpp:59
uint32_t
lldb::SBDebugger::HandleProcessEvent
void HandleProcessEvent(const lldb::SBProcess &process, const lldb::SBEvent &event, FILE *out, FILE *err)
Definition: SBDebugger.cpp:595
DebuggerEvents.h
lldb::SBPlatform::SetSP
void SetSP(const lldb::PlatformSP &platform_sp)
Definition: SBPlatform.cpp:348
lldb::SBDebugger::GetSelectedPlatform
lldb::SBPlatform GetSelectedPlatform()
Definition: SBDebugger.cpp:1079
lldb::SBProcess::GetSP
lldb::ProcessSP GetSP() const
Definition: SBProcess.cpp:102
lldb::SBTypeCategory
class LLDB_API SBTypeCategory
Definition: SBDefines.h:93
lldb::SBDebugger::CreateTarget
lldb::SBTarget CreateTarget(const char *filename, const char *target_triple, const char *platform_name, bool add_dependent_modules, lldb::SBError &error)
Definition: SBDebugger.cpp:797
lldb::SBDebugger::SetInputString
SBError SetInputString(const char *data)
Definition: SBDebugger.cpp:346
lldb_private::Platform::GetAugmentedArchSpec
static ArchSpec GetAugmentedArchSpec(Platform *platform, llvm::StringRef triple)
Augments the triple either with information from platform or the host system (if platform is null).
Definition: Platform.cpp:264
lldb::SBTarget::m_opaque_sp
lldb::TargetSP m_opaque_sp
Definition: SBTarget.h:891
lldb::SBStructuredData
Definition: SBStructuredData.h:17
lldb::SBDebugger::FindTargetWithFileAndArch
lldb::SBTarget FindTargetWithFileAndArch(const char *filename, const char *arch)
Definition: SBDebugger.cpp:1000
lldb::pid_t
uint64_t pid_t
Definition: lldb-types.h:85
lldb_private::PluginManager::GetPlatformPluginDescriptionAtIndex
static llvm::StringRef GetPlatformPluginDescriptionAtIndex(uint32_t idx)
Definition: PluginManager.cpp:808
lldb::SBDebugger::SetDefaultArchitecture
static bool SetDefaultArchitecture(const char *arch_name)
Definition: SBDebugger.cpp:680
lldb::SBInputReader::IsActive
bool IsActive() const
Definition: SBDebugger.cpp:119
lldb_private::CommandInterpreterRunResult::GetNumErrors
uint32_t GetNumErrors() const
Definition: CommandInterpreter.h:38
lldb_private::Status::SetErrorString
void SetErrorString(llvm::StringRef err_str)
Set the current error string to err_str.
Definition: Status.cpp:241
lldb_private::Debugger::FindDebuggerWithID
static lldb::DebuggerSP FindDebuggerWithID(lldb::user_id_t id)
Definition: Debugger.cpp:1202
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:19
XML.h
lldb::SBTypeFormat
class LLDB_API SBTypeFormat
Definition: SBDefines.h:97
lldb::SBDebugger::GetBroadcaster
lldb::SBBroadcaster GetBroadcaster()
Definition: SBDebugger.cpp:190
lldb_private::ProgressEventData::GetCompleted
uint64_t GetCompleted() const
Definition: DebuggerEvents.h:37
lldb::SBDebugger::SetCurrentPlatformSDKRoot
bool SetCurrentPlatformSDKRoot(const char *sysroot)
Definition: SBDebugger.cpp:1503
lldb::SBDebugger::GetDiagnosticFromEvent
static lldb::SBStructuredData GetDiagnosticFromEvent(const lldb::SBEvent &event)
Definition: SBDebugger.cpp:171
lldb_private::ProgressEventData::GetMessage
const std::string & GetMessage() const
Definition: DebuggerEvents.h:39
lldb::SBDebugger::Terminate
static void Terminate()
Definition: SBDebugger.cpp:221
g_debugger_lifetime
static llvm::ManagedStatic< SystemLifetimeManager > g_debugger_lifetime
Definition: SBDebugger.cpp:103
PluginManager.h
lldb::SBTypeSynthetic
Definition: SBTypeSynthetic.h:17
SBTypeFilter.h
lldb_private::ConstString::GetCString
const char * GetCString() const
Get the string value as a C string.
Definition: ConstString.h:215
SBStructuredData.h
lldb::eCommandInterpreterResultInferiorCrash
@ eCommandInterpreterResultInferiorCrash
Stopped because the corresponding option was set and the inferior crashed.
Definition: lldb-enumerations.h:1153
lldb_private::ScriptInterpreter
Definition: ScriptInterpreter.h:126
lldb::SBFileSpec
Definition: SBFileSpec.h:16
SBTrace.h
StructuredDataImpl.h
SBEvent.h
lldb_private::Process::eBroadcastBitSTDOUT
@ eBroadcastBitSTDOUT
Definition: Process.h:356
lldb::SBDebugger::GetScriptInterpreterInfo
SBStructuredData GetScriptInterpreterInfo(ScriptLanguage)
Definition: SBDebugger.cpp:704
lldb_private::ScriptInterpreter::GetInterpreterInfo
virtual StructuredData::DictionarySP GetInterpreterInfo()
Definition: ScriptInterpreter.cpp:49
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::SBDebugger::GetScriptingLanguage
lldb::ScriptLanguage GetScriptingLanguage(const char *script_language_name)
Definition: SBDebugger.cpp:694
lldb_private::FileSystem::Instance
static FileSystem & Instance()
Definition: common/FileSystem.cpp:46
lldb::SBTarget::SetSP
void SetSP(const lldb::TargetSP &target_sp)
Definition: SBTarget.cpp:578
lldb::user_id_t
uint64_t user_id_t
Definition: lldb-types.h:84
lldb::SBDebugger::SetREPLLanguage
void SetREPLLanguage(lldb::LanguageType repl_lang)
Definition: SBDebugger.cpp:1418
lldb::SBError::ref
lldb_private::Status & ref()
Definition: SBError.cpp:156
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
SBTypeFormat.h
lldb::SBCommandInterpreterRunResult
class LLDB_API SBCommandInterpreterRunResult
Definition: SBDefines.h:43
SBCommandReturnObject.h
lldb::SBDebugger::SetOutputFileHandle
void SetOutputFileHandle(FILE *f, bool transfer_ownership)
Definition: SBDebugger.cpp:398
lldb_private::CommandInterpreter::SkipLLDBInitFiles
void SkipLLDBInitFiles(bool skip_lldbinit_files)
Definition: CommandInterpreter.h:481
lldb::SBDebugger::SetUseExternalEditor
bool SetUseExternalEditor(bool input)
Definition: SBDebugger.cpp:1426
lldb_private::DataVisualization::Categories::GetCategoryAtIndex
static lldb::TypeCategoryImplSP GetCategoryAtIndex(size_t)
Definition: DataVisualization.cpp:165
lldb::eStateInvalid
@ eStateInvalid
Definition: lldb-enumerations.h:74
lldb::SBDebugger::DispatchInput
void DispatchInput(void *baton, const void *data, size_t data_len)
Definition: SBDebugger.cpp:1177
lldb::SBCommandInterpreter::reset
void reset(lldb_private::CommandInterpreter *)
Definition: SBCommandInterpreter.cpp:425
lldb::SBTarget::GetSP
lldb::TargetSP GetSP() const
Definition: SBTarget.cpp:576
LLDB_INSTRUMENT_VA
#define LLDB_INSTRUMENT_VA(...)
Definition: Instrumentation.h:98
CommandInterpreter.h
lldb::SBBroadcaster
Definition: SBBroadcaster.h:16
State.h
SBProcess.h
lldb::SBTypeNameSpecifier::IsValid
bool IsValid() const
Definition: SBTypeNameSpecifier.cpp:52
lldb_private::File::GetStream
virtual FILE * GetStream()
Get the underlying libc stream for this file, or NULL.
Definition: File.cpp:126
SBCommandInterpreter.h
lldb_private::StreamFile
Definition: StreamFile.h:22
lldb::SBCommandInterpreterRunOptions
Definition: SBCommandInterpreterRunOptions.h:23
lldb::SBTypeFilter
class LLDB_API SBTypeFilter
Definition: SBDefines.h:96
lldb_private::ProgressEventData::GetTotal
uint64_t GetTotal() const
Definition: DebuggerEvents.h:38
lldb::InputReaderGranularity
InputReaderGranularity
Token size/granularities for Input Readers.
Definition: lldb-enumerations.h:329
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
lldb::SBDebugger::SBDebugger
SBDebugger()
Definition: SBDebugger.cpp:125
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::Stream::PutCString
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Definition: Stream.cpp:63
lldb_private::CommandInterpreterRunOptions::SetAutoHandleEvents
void SetAutoHandleEvents(bool auto_handle_events)
Definition: CommandInterpreter.h:173
lldb::SBDebugger::get_sp
const lldb::DebuggerSP & get_sp() const
Definition: SBDebugger.cpp:1291
lldb::SBDebugger::m_opaque_sp
lldb::DebuggerSP m_opaque_sp
Definition: SBDebugger.h:439
lldb::SBStream
Definition: SBStream.h:18
lldb_private::DiagnosticEventData::GetMessage
const std::string & GetMessage() const
Definition: DebuggerEvents.h:63
lldb_private::Target::SetDefaultArchitecture
static void SetDefaultArchitecture(const ArchSpec &arch)
Definition: Target.cpp:2454
lldb::SBTarget::GetDescription
bool GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level)
Definition: SBTarget.cpp:1675
lldb::SBDebugger::GetInternalVariableValue
static lldb::SBStringList GetInternalVariableValue(const char *var_name, const char *debugger_instance_name)
Definition: SBDebugger.cpp:1333
lldb::SBDebugger::FindDebuggerWithID
static SBDebugger FindDebuggerWithID(int id)
Definition: SBDebugger.cpp:1293
lldb::SBDebugger::SetLoggingCallback
void SetLoggingCallback(lldb::LogOutputCallback log_callback, void *baton)
Definition: SBDebugger.cpp:1655
lldb_private::PluginManager::GetPlatformPluginNameAtIndex
static llvm::StringRef GetPlatformPluginNameAtIndex(uint32_t idx)
Definition: PluginManager.cpp:803
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::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
SBTarget.h
lldb::SBDebugger::get
lldb_private::Debugger * get() const
Definition: SBDebugger.cpp:1284
lldb::SBDebugger::DispatchInputInterrupt
void DispatchInputInterrupt()
Definition: SBDebugger.cpp:1200
lldb::SBPlatform
Definition: SBPlatform.h:93
lldb_private::PlatformList::GetOrCreate
lldb::PlatformSP GetOrCreate(llvm::StringRef name)
Definition: Platform.cpp:1955
lldb::SBDebugger::GetFormatForType
SBTypeFormat GetFormatForType(SBTypeNameSpecifier)
Definition: SBDebugger.cpp:1597
lldb::SBTypeCategory
Definition: SBTypeCategory.h:17
lldb::SBDebugger::CreateTargetWithFileAndArch
lldb::SBTarget CreateTargetWithFileAndArch(const char *filename, const char *archname)
Definition: SBDebugger.cpp:861
lldb::SBDebugger::DeleteCategory
bool DeleteCategory(const char *category_name)
Definition: SBDebugger.cpp:1569
lldb
Definition: SBAddress.h:15
lldb::SBDebugger::Initialize
static void Initialize()
Definition: SBDebugger.cpp:196
lldb_private::Debugger::Destroy
static void Destroy(lldb::DebuggerSP &debugger_sp)
Definition: Debugger.cpp:663
lldb::SBProcess::GetTarget
lldb::SBTarget GetTarget() const
Definition: SBProcess.cpp:233
lldb::SBDebugger::SetUseSourceCache
bool SetUseSourceCache(bool use_source_cache)
Definition: SBDebugger.cpp:1450
lldb::SBTypeNameSpecifier::GetSP
lldb::TypeNameSpecifierImplSP GetSP()
Definition: SBTypeNameSpecifier.cpp:149
LLDBLog.h
lldb::SBDebugger::GetBuildConfiguration
static SBStructuredData GetBuildConfiguration()
Definition: SBDebugger.cpp:749
lldb::SBDebugger::SkipAppInitFiles
void SkipAppInitFiles(bool b)
Definition: SBDebugger.cpp:332
SBError.h
lldb::eDescriptionLevelBrief
@ eDescriptionLevelBrief
Definition: lldb-enumerations.h:208
lldb::SBStream::GetData
const char * GetData()
Definition: SBStream.cpp:44
SBTypeCategory.h
lldb::eCommandInterpreterResultQuitRequested
@ eCommandInterpreterResultQuitRequested
Stopped because quit was requested.
Definition: lldb-enumerations.h:1158
lldb_private::eVarSetOperationAssign
@ eVarSetOperationAssign
Definition: lldb-private-enumerations.h:90
lldb::SBSourceManager
Definition: SBSourceManager.h:18