LLDB  mainline
Target.h
Go to the documentation of this file.
1 //===-- Target.h ------------------------------------------------*- 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 #ifndef LLDB_TARGET_TARGET_H
10 #define LLDB_TARGET_TARGET_H
11 
12 #include <list>
13 #include <map>
14 #include <memory>
15 #include <string>
16 #include <vector>
17 
21 #include "lldb/Core/Architecture.h"
22 #include "lldb/Core/Disassembler.h"
23 #include "lldb/Core/ModuleList.h"
27 #include "lldb/Symbol/TypeSystem.h"
31 #include "lldb/Target/ThreadSpec.h"
32 #include "lldb/Utility/ArchSpec.h"
35 #include "lldb/Utility/Timeout.h"
36 #include "lldb/lldb-public.h"
37 
38 namespace lldb_private {
39 
40 OptionEnumValues GetDynamicValueTypes();
41 
46 };
47 
52 };
53 
58 };
59 
64 };
65 
70 };
71 
73 public:
75 };
76 
77 class TargetProperties : public Properties {
78 public:
79  TargetProperties(Target *target);
80 
81  ~TargetProperties() override;
82 
84 
85  void SetDefaultArchitecture(const ArchSpec &arch);
86 
87  bool GetMoveToNearestCode() const;
88 
90 
92 
93  bool GetPreloadSymbols() const;
94 
95  void SetPreloadSymbols(bool b);
96 
97  bool GetDisableASLR() const;
98 
99  void SetDisableASLR(bool b);
100 
101  bool GetInheritTCC() const;
102 
103  void SetInheritTCC(bool b);
104 
105  bool GetDetachOnError() const;
106 
107  void SetDetachOnError(bool b);
108 
109  bool GetDisableSTDIO() const;
110 
111  void SetDisableSTDIO(bool b);
112 
113  const char *GetDisassemblyFlavor() const;
114 
116 
117  llvm::StringRef GetArg0() const;
118 
119  void SetArg0(llvm::StringRef arg);
120 
121  bool GetRunArguments(Args &args) const;
122 
123  void SetRunArguments(const Args &args);
124 
125  // Get the whole environment including the platform inherited environment and
126  // the target specific environment, excluding the unset environment variables.
127  Environment GetEnvironment() const;
128  // Get the platform inherited environment, excluding the unset environment
129  // variables.
131  // Get the target specific environment only, without the platform inherited
132  // environment.
134  // Set the target specific environment.
135  void SetEnvironment(Environment env);
136 
137  bool GetSkipPrologue() const;
138 
140 
141  FileSpecList GetExecutableSearchPaths();
142 
144 
145  FileSpecList GetDebugFileSearchPaths();
146 
147  FileSpecList GetClangModuleSearchPaths();
148 
149  bool GetEnableAutoImportClangModules() const;
150 
152 
153  bool GetEnableAutoApplyFixIts() const;
154 
155  uint64_t GetNumberOfRetriesWithFixits() const;
156 
157  bool GetEnableNotifyAboutFixIts() const;
158 
159  bool GetEnableSaveObjects() const;
160 
161  bool GetEnableSyntheticValue() const;
162 
164 
166 
168 
170 
174 
175  void SetStandardInputPath(llvm::StringRef path);
176  void SetStandardOutputPath(llvm::StringRef path);
177  void SetStandardErrorPath(llvm::StringRef path);
178 
179  void SetStandardInputPath(const char *path) = delete;
180  void SetStandardOutputPath(const char *path) = delete;
181  void SetStandardErrorPath(const char *path) = delete;
182 
184 
186 
187  llvm::StringRef GetExpressionPrefixContents();
188 
189  uint64_t GetExprErrorLimit() const;
190 
191  bool GetUseHexImmediates() const;
192 
193  bool GetUseFastStepping() const;
194 
196 
198 
200 
202 
204 
205  bool GetUserSpecifiedTrapHandlerNames(Args &args) const;
206 
207  void SetUserSpecifiedTrapHandlerNames(const Args &args);
208 
209  bool GetNonStopModeEnabled() const;
210 
211  void SetNonStopModeEnabled(bool b);
212 
213  bool GetDisplayRuntimeSupportValues() const;
214 
215  void SetDisplayRuntimeSupportValues(bool b);
216 
217  bool GetDisplayRecognizedArguments() const;
218 
219  void SetDisplayRecognizedArguments(bool b);
220 
222 
223  void SetProcessLaunchInfo(const ProcessLaunchInfo &launch_info);
224 
225  bool GetInjectLocalVariables(ExecutionContext *exe_ctx) const;
226 
227  void SetInjectLocalVariables(ExecutionContext *exe_ctx, bool b);
228 
229  void SetRequireHardwareBreakpoints(bool b);
230 
231  bool GetRequireHardwareBreakpoints() const;
232 
233  bool GetAutoInstallMainExecutable() const;
234 
236 
237  void SetDebugUtilityExpression(bool debug);
238 
239  bool GetDebugUtilityExpression() const;
240 
241 private:
242  // Callbacks for m_launch_info.
253 
255 
256  // Member variables.
258  std::unique_ptr<TargetExperimentalProperties> m_experimental_properties_up;
260 };
261 
263 public:
264 // MSVC has a bug here that reports C4268: 'const' static/global data
265 // initialized with compiler generated default constructor fills the object
266 // with zeros. Confirmed that MSVC is *not* zero-initializing, it's just a
267 // bogus warning.
268 #if defined(_MSC_VER)
269 #pragma warning(push)
270 #pragma warning(disable : 4268)
271 #endif
272  static constexpr std::chrono::milliseconds default_timeout{500};
273 #if defined(_MSC_VER)
274 #pragma warning(pop)
275 #endif
276 
279 
280  EvaluateExpressionOptions() = default;
281 
283 
285  m_execution_policy = policy;
286  }
287 
289 
290  void SetLanguage(lldb::LanguageType language) { m_language = language; }
291 
292  bool DoesCoerceToId() const { return m_coerce_to_id; }
293 
294  const char *GetPrefix() const {
295  return (m_prefix.empty() ? nullptr : m_prefix.c_str());
296  }
297 
298  void SetPrefix(const char *prefix) {
299  if (prefix && prefix[0])
300  m_prefix = prefix;
301  else
302  m_prefix.clear();
303  }
304 
305  void SetCoerceToId(bool coerce = true) { m_coerce_to_id = coerce; }
306 
307  bool DoesUnwindOnError() const { return m_unwind_on_error; }
308 
309  void SetUnwindOnError(bool unwind = false) { m_unwind_on_error = unwind; }
310 
312 
313  void SetIgnoreBreakpoints(bool ignore = false) {
314  m_ignore_breakpoints = ignore;
315  }
316 
317  bool DoesKeepInMemory() const { return m_keep_in_memory; }
318 
319  void SetKeepInMemory(bool keep = true) { m_keep_in_memory = keep; }
320 
322 
323  void
325  m_use_dynamic = dynamic;
326  }
327 
328  const Timeout<std::micro> &GetTimeout() const { return m_timeout; }
329 
330  void SetTimeout(const Timeout<std::micro> &timeout) { m_timeout = timeout; }
331 
333  return m_one_thread_timeout;
334  }
335 
337  m_one_thread_timeout = timeout;
338  }
339 
340  bool GetTryAllThreads() const { return m_try_others; }
341 
342  void SetTryAllThreads(bool try_others = true) { m_try_others = try_others; }
343 
344  bool GetStopOthers() const { return m_stop_others; }
345 
346  void SetStopOthers(bool stop_others = true) { m_stop_others = stop_others; }
347 
348  bool GetDebug() const { return m_debug; }
349 
350  void SetDebug(bool b) {
351  m_debug = b;
352  if (m_debug)
353  m_generate_debug_info = true;
354  }
355 
357 
359 
360  bool GetColorizeErrors() const { return m_ansi_color_errors; }
361 
363 
364  bool GetTrapExceptions() const { return m_trap_exceptions; }
365 
366  void SetTrapExceptions(bool b) { m_trap_exceptions = b; }
367 
368  bool GetREPLEnabled() const { return m_repl; }
369 
370  void SetREPLEnabled(bool b) { m_repl = b; }
371 
372  void SetCancelCallback(lldb::ExpressionCancelCallback callback, void *baton) {
373  m_cancel_callback_baton = baton;
374  m_cancel_callback = callback;
375  }
376 
378  return ((m_cancel_callback != nullptr)
380  : false);
381  }
382 
383  // Allows the expression contents to be remapped to point to the specified
384  // file and line using #line directives.
385  void SetPoundLine(const char *path, uint32_t line) const {
386  if (path && path[0]) {
387  m_pound_line_file = path;
388  m_pound_line_line = line;
389  } else {
390  m_pound_line_file.clear();
391  m_pound_line_line = 0;
392  }
393  }
394 
395  const char *GetPoundLineFilePath() const {
396  return (m_pound_line_file.empty() ? nullptr : m_pound_line_file.c_str());
397  }
398 
400 
402 
403  bool GetResultIsInternal() const { return m_result_is_internal; }
404 
406 
407  bool GetAutoApplyFixIts() const { return m_auto_apply_fixits; }
408 
409  void SetRetriesWithFixIts(uint64_t number_of_retries) {
410  m_retries_with_fixits = number_of_retries;
411  }
412 
413  uint64_t GetRetriesWithFixIts() const { return m_retries_with_fixits; }
414 
416 
418 
419 private:
423  bool m_coerce_to_id = false;
424  bool m_unwind_on_error = true;
425  bool m_ignore_breakpoints = false;
426  bool m_keep_in_memory = false;
427  bool m_try_others = true;
428  bool m_stop_others = true;
429  bool m_debug = false;
430  bool m_trap_exceptions = true;
431  bool m_repl = false;
432  bool m_generate_debug_info = false;
433  bool m_ansi_color_errors = false;
434  bool m_result_is_internal = false;
435  bool m_auto_apply_fixits = true;
436  uint64_t m_retries_with_fixits = 1;
437  /// True if the executed code should be treated as utility code that is only
438  /// used by LLDB internally.
440 
445  void *m_cancel_callback_baton = nullptr;
446  // If m_pound_line_file is not empty and m_pound_line_line is non-zero, use
447  // #line %u "%s" before the expression content to remap where the source
448  // originates
451 };
452 
453 // Target
454 class Target : public std::enable_shared_from_this<Target>,
455  public TargetProperties,
456  public Broadcaster,
457  public ExecutionContextScope,
458  public ModuleList::Notifier {
459 public:
460  friend class TargetList;
461  friend class Debugger;
462 
463  /// Broadcaster event bits definitions.
464  enum {
470  };
471 
472  // These two functions fill out the Broadcaster interface:
473 
475 
476  ConstString &GetBroadcasterClass() const override {
477  return GetStaticBroadcasterClass();
478  }
479 
480  // This event data class is for use by the TargetList to broadcast new target
481  // notifications.
482  class TargetEventData : public EventData {
483  public:
484  TargetEventData(const lldb::TargetSP &target_sp);
485 
486  TargetEventData(const lldb::TargetSP &target_sp,
487  const ModuleList &module_list);
488 
489  ~TargetEventData() override;
490 
491  static ConstString GetFlavorString();
492 
493  ConstString GetFlavor() const override {
495  }
496 
497  void Dump(Stream *s) const override;
498 
499  static const TargetEventData *GetEventDataFromEvent(const Event *event_ptr);
500 
501  static lldb::TargetSP GetTargetFromEvent(const Event *event_ptr);
502 
503  static ModuleList GetModuleListFromEvent(const Event *event_ptr);
504 
505  const lldb::TargetSP &GetTarget() const { return m_target_sp; }
506 
507  const ModuleList &GetModuleList() const { return m_module_list; }
508 
509  private:
510  lldb::TargetSP m_target_sp;
512 
513  TargetEventData(const TargetEventData &) = delete;
514  const TargetEventData &operator=(const TargetEventData &) = delete;
515  };
516 
517  ~Target() override;
518 
519  static void SettingsInitialize();
520 
521  static void SettingsTerminate();
522 
523  static FileSpecList GetDefaultExecutableSearchPaths();
524 
525  static FileSpecList GetDefaultDebugFileSearchPaths();
526 
528 
529  static void SetDefaultArchitecture(const ArchSpec &arch);
530 
531  bool IsDummyTarget() const { return m_is_dummy_target; }
532 
533  /// Find a binary on the system and return its Module,
534  /// or return an existing Module that is already in the Target.
535  ///
536  /// Given a ModuleSpec, find a binary satisifying that specification,
537  /// or identify a matching Module already present in the Target,
538  /// and return a shared pointer to it.
539  ///
540  /// \param[in] module_spec
541  /// The criteria that must be matched for the binary being loaded.
542  /// e.g. UUID, architecture, file path.
543  ///
544  /// \param[in] notify
545  /// If notify is true, and the Module is new to this Target,
546  /// Target::ModulesDidLoad will be called.
547  /// If notify is false, it is assumed that the caller is adding
548  /// multiple Modules and will call ModulesDidLoad with the
549  /// full list at the end.
550  /// ModulesDidLoad must be called when a Module/Modules have
551  /// been added to the target, one way or the other.
552  ///
553  /// \param[out] error_ptr
554  /// Optional argument, pointing to a Status object to fill in
555  /// with any results / messages while attempting to find/load
556  /// this binary. Many callers will be internal functions that
557  /// will handle / summarize the failures in a custom way and
558  /// don't use these messages.
559  ///
560  /// \return
561  /// An empty ModuleSP will be returned if no matching file
562  /// was found. If error_ptr was non-nullptr, an error message
563  /// will likely be provided.
564  lldb::ModuleSP GetOrCreateModule(const ModuleSpec &module_spec, bool notify,
565  Status *error_ptr = nullptr);
566 
567  // Settings accessors
568 
569  static const lldb::TargetPropertiesSP &GetGlobalProperties();
570 
571  std::recursive_mutex &GetAPIMutex();
572 
573  void DeleteCurrentProcess();
574 
575  void CleanupProcess();
576 
577  /// Dump a description of this object to a Stream.
578  ///
579  /// Dump a description of the contents of this object to the
580  /// supplied stream \a s. The dumped content will be only what has
581  /// been loaded or parsed up to this point at which this function
582  /// is called, so this is a good way to see what has been parsed
583  /// in a target.
584  ///
585  /// \param[in] s
586  /// The stream to which to dump the object description.
587  void Dump(Stream *s, lldb::DescriptionLevel description_level);
588 
589  // If listener_sp is null, the listener of the owning Debugger object will be
590  // used.
591  const lldb::ProcessSP &CreateProcess(lldb::ListenerSP listener_sp,
592  llvm::StringRef plugin_name,
593  const FileSpec *crash_file,
594  bool can_connect);
595 
596  const lldb::ProcessSP &GetProcessSP() const;
597 
598  bool IsValid() { return m_valid; }
599 
600  void Destroy();
601 
602  Status Launch(ProcessLaunchInfo &launch_info,
603  Stream *stream); // Optional stream to receive first stop info
604 
605  Status Attach(ProcessAttachInfo &attach_info,
606  Stream *stream); // Optional stream to receive first stop info
607 
608  // This part handles the breakpoints.
609 
610  BreakpointList &GetBreakpointList(bool internal = false);
611 
612  const BreakpointList &GetBreakpointList(bool internal = false) const;
613 
614  lldb::BreakpointSP GetLastCreatedBreakpoint() {
616  }
617 
618  lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id);
619 
620  // Use this to create a file and line breakpoint to a given module or all
621  // module it is nullptr
622  lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules,
623  const FileSpec &file, uint32_t line_no,
624  uint32_t column, lldb::addr_t offset,
625  LazyBool check_inlines,
626  LazyBool skip_prologue, bool internal,
627  bool request_hardware,
628  LazyBool move_to_nearest_code);
629 
630  // Use this to create breakpoint that matches regex against the source lines
631  // in files given in source_file_list: If function_names is non-empty, also
632  // filter by function after the matches are made.
633  lldb::BreakpointSP CreateSourceRegexBreakpoint(
634  const FileSpecList *containingModules,
635  const FileSpecList *source_file_list,
636  const std::unordered_set<std::string> &function_names,
637  RegularExpression source_regex, bool internal, bool request_hardware,
638  LazyBool move_to_nearest_code);
639 
640  // Use this to create a breakpoint from a load address
641  lldb::BreakpointSP CreateBreakpoint(lldb::addr_t load_addr, bool internal,
642  bool request_hardware);
643 
644  // Use this to create a breakpoint from a load address and a module file spec
645  lldb::BreakpointSP CreateAddressInModuleBreakpoint(lldb::addr_t file_addr,
646  bool internal,
647  const FileSpec *file_spec,
648  bool request_hardware);
649 
650  // Use this to create Address breakpoints:
651  lldb::BreakpointSP CreateBreakpoint(const Address &addr, bool internal,
652  bool request_hardware);
653 
654  // Use this to create a function breakpoint by regexp in
655  // containingModule/containingSourceFiles, or all modules if it is nullptr
656  // When "skip_prologue is set to eLazyBoolCalculate, we use the current
657  // target setting, else we use the values passed in
658  lldb::BreakpointSP CreateFuncRegexBreakpoint(
659  const FileSpecList *containingModules,
660  const FileSpecList *containingSourceFiles, RegularExpression func_regexp,
661  lldb::LanguageType requested_language, LazyBool skip_prologue,
662  bool internal, bool request_hardware);
663 
664  // Use this to create a function breakpoint by name in containingModule, or
665  // all modules if it is nullptr When "skip_prologue is set to
666  // eLazyBoolCalculate, we use the current target setting, else we use the
667  // values passed in. func_name_type_mask is or'ed values from the
668  // FunctionNameType enum.
669  lldb::BreakpointSP CreateBreakpoint(
670  const FileSpecList *containingModules,
671  const FileSpecList *containingSourceFiles, const char *func_name,
672  lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language,
673  lldb::addr_t offset, LazyBool skip_prologue, bool internal,
674  bool request_hardware);
675 
676  lldb::BreakpointSP
677  CreateExceptionBreakpoint(enum lldb::LanguageType language, bool catch_bp,
678  bool throw_bp, bool internal,
679  Args *additional_args = nullptr,
680  Status *additional_args_error = nullptr);
681 
682  lldb::BreakpointSP CreateScriptedBreakpoint(
683  const llvm::StringRef class_name, const FileSpecList *containingModules,
684  const FileSpecList *containingSourceFiles, bool internal,
685  bool request_hardware, StructuredData::ObjectSP extra_args_sp,
686  Status *creation_error = nullptr);
687 
688  // This is the same as the func_name breakpoint except that you can specify a
689  // vector of names. This is cheaper than a regular expression breakpoint in
690  // the case where you just want to set a breakpoint on a set of names you
691  // already know. func_name_type_mask is or'ed values from the
692  // FunctionNameType enum.
693  lldb::BreakpointSP CreateBreakpoint(
694  const FileSpecList *containingModules,
695  const FileSpecList *containingSourceFiles, const char *func_names[],
696  size_t num_names, lldb::FunctionNameType func_name_type_mask,
697  lldb::LanguageType language, lldb::addr_t offset, LazyBool skip_prologue,
698  bool internal, bool request_hardware);
699 
700  lldb::BreakpointSP
701  CreateBreakpoint(const FileSpecList *containingModules,
702  const FileSpecList *containingSourceFiles,
703  const std::vector<std::string> &func_names,
704  lldb::FunctionNameType func_name_type_mask,
705  lldb::LanguageType language, lldb::addr_t m_offset,
706  LazyBool skip_prologue, bool internal,
707  bool request_hardware);
708 
709  // Use this to create a general breakpoint:
710  lldb::BreakpointSP CreateBreakpoint(lldb::SearchFilterSP &filter_sp,
711  lldb::BreakpointResolverSP &resolver_sp,
712  bool internal, bool request_hardware,
713  bool resolve_indirect_symbols);
714 
715  // Use this to create a watchpoint:
716  lldb::WatchpointSP CreateWatchpoint(lldb::addr_t addr, size_t size,
717  const CompilerType *type, uint32_t kind,
718  Status &error);
719 
720  lldb::WatchpointSP GetLastCreatedWatchpoint() {
722  }
723 
725 
726  // Manages breakpoint names:
727  void AddNameToBreakpoint(BreakpointID &id, const char *name, Status &error);
728 
729  void AddNameToBreakpoint(lldb::BreakpointSP &bp_sp, const char *name,
730  Status &error);
731 
732  void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, ConstString name);
733 
734  BreakpointName *FindBreakpointName(ConstString name, bool can_create,
735  Status &error);
736 
738 
740  const BreakpointOptions &options,
741  const BreakpointName::Permissions &permissions);
742  void ApplyNameToBreakpoints(BreakpointName &bp_name);
743 
744  // This takes ownership of the name obj passed in.
745  void AddBreakpointName(BreakpointName *bp_name);
746 
747  void GetBreakpointNames(std::vector<std::string> &names);
748 
749  // This call removes ALL breakpoints regardless of permission.
750  void RemoveAllBreakpoints(bool internal_also = false);
751 
752  // This removes all the breakpoints, but obeys the ePermDelete on them.
754 
755  void DisableAllBreakpoints(bool internal_also = false);
756 
758 
759  void EnableAllBreakpoints(bool internal_also = false);
760 
762 
764 
765  bool EnableBreakpointByID(lldb::break_id_t break_id);
766 
767  bool RemoveBreakpointByID(lldb::break_id_t break_id);
768 
769  // The flag 'end_to_end', default to true, signifies that the operation is
770  // performed end to end, for both the debugger and the debuggee.
771 
772  bool RemoveAllWatchpoints(bool end_to_end = true);
773 
774  bool DisableAllWatchpoints(bool end_to_end = true);
775 
776  bool EnableAllWatchpoints(bool end_to_end = true);
777 
779 
781 
782  bool IgnoreAllWatchpoints(uint32_t ignore_count);
783 
785 
786  bool EnableWatchpointByID(lldb::watch_id_t watch_id);
787 
788  bool RemoveWatchpointByID(lldb::watch_id_t watch_id);
789 
790  bool IgnoreWatchpointByID(lldb::watch_id_t watch_id, uint32_t ignore_count);
791 
793  const BreakpointIDList &bp_ids,
794  bool append);
795 
797  BreakpointIDList &new_bps);
798 
800  std::vector<std::string> &names,
801  BreakpointIDList &new_bps);
802 
803  /// Get \a load_addr as a callable code load address for this target
804  ///
805  /// Take \a load_addr and potentially add any address bits that are
806  /// needed to make the address callable. For ARM this can set bit
807  /// zero (if it already isn't) if \a load_addr is a thumb function.
808  /// If \a addr_class is set to AddressClass::eInvalid, then the address
809  /// adjustment will always happen. If it is set to an address class
810  /// that doesn't have code in it, LLDB_INVALID_ADDRESS will be
811  /// returned.
813  lldb::addr_t load_addr,
814  AddressClass addr_class = AddressClass::eInvalid) const;
815 
816  /// Get \a load_addr as an opcode for this target.
817  ///
818  /// Take \a load_addr and potentially strip any address bits that are
819  /// needed to make the address point to an opcode. For ARM this can
820  /// clear bit zero (if it already isn't) if \a load_addr is a
821  /// thumb function and load_addr is in code.
822  /// If \a addr_class is set to AddressClass::eInvalid, then the address
823  /// adjustment will always happen. If it is set to an address class
824  /// that doesn't have code in it, LLDB_INVALID_ADDRESS will be
825  /// returned.
828  AddressClass addr_class = AddressClass::eInvalid) const;
829 
830  // Get load_addr as breakable load address for this target. Take a addr and
831  // check if for any reason there is a better address than this to put a
832  // breakpoint on. If there is then return that address. For MIPS, if
833  // instruction at addr is a delay slot instruction then this method will find
834  // the address of its previous instruction and return that address.
836 
837  void ModulesDidLoad(ModuleList &module_list);
838 
839  void ModulesDidUnload(ModuleList &module_list, bool delete_locations);
840 
841  void SymbolsDidLoad(ModuleList &module_list);
842 
843  void ClearModules(bool delete_locations);
844 
845  /// Called as the last function in Process::DidExec().
846  ///
847  /// Process::DidExec() will clear a lot of state in the process,
848  /// then try to reload a dynamic loader plugin to discover what
849  /// binaries are currently available and then this function should
850  /// be called to allow the target to do any cleanup after everything
851  /// has been figured out. It can remove breakpoints that no longer
852  /// make sense as the exec might have changed the target
853  /// architecture, and unloaded some modules that might get deleted.
854  void DidExec();
855 
856  /// Gets the module for the main executable.
857  ///
858  /// Each process has a notion of a main executable that is the file
859  /// that will be executed or attached to. Executable files can have
860  /// dependent modules that are discovered from the object files, or
861  /// discovered at runtime as things are dynamically loaded.
862  ///
863  /// \return
864  /// The shared pointer to the executable module which can
865  /// contains a nullptr Module object if no executable has been
866  /// set.
867  ///
868  /// \see DynamicLoader
869  /// \see ObjectFile::GetDependentModules (FileSpecList&)
870  /// \see Process::SetExecutableModule(lldb::ModuleSP&)
871  lldb::ModuleSP GetExecutableModule();
872 
874 
875  /// Set the main executable module.
876  ///
877  /// Each process has a notion of a main executable that is the file
878  /// that will be executed or attached to. Executable files can have
879  /// dependent modules that are discovered from the object files, or
880  /// discovered at runtime as things are dynamically loaded.
881  ///
882  /// Setting the executable causes any of the current dependent
883  /// image information to be cleared and replaced with the static
884  /// dependent image information found by calling
885  /// ObjectFile::GetDependentModules (FileSpecList&) on the main
886  /// executable and any modules on which it depends. Calling
887  /// Process::GetImages() will return the newly found images that
888  /// were obtained from all of the object files.
889  ///
890  /// \param[in] module_sp
891  /// A shared pointer reference to the module that will become
892  /// the main executable for this process.
893  ///
894  /// \param[in] load_dependent_files
895  /// If \b true then ask the object files to track down any
896  /// known dependent files.
897  ///
898  /// \see ObjectFile::GetDependentModules (FileSpecList&)
899  /// \see Process::GetImages()
900  void SetExecutableModule(
901  lldb::ModuleSP &module_sp,
902  LoadDependentFiles load_dependent_files = eLoadDependentsDefault);
903 
904  bool LoadScriptingResources(std::list<Status> &errors,
905  Stream *feedback_stream = nullptr,
906  bool continue_on_error = true) {
908  this, errors, feedback_stream, continue_on_error);
909  }
910 
911  /// Get accessor for the images for this process.
912  ///
913  /// Each process has a notion of a main executable that is the file
914  /// that will be executed or attached to. Executable files can have
915  /// dependent modules that are discovered from the object files, or
916  /// discovered at runtime as things are dynamically loaded. After
917  /// a main executable has been set, the images will contain a list
918  /// of all the files that the executable depends upon as far as the
919  /// object files know. These images will usually contain valid file
920  /// virtual addresses only. When the process is launched or attached
921  /// to, the DynamicLoader plug-in will discover where these images
922  /// were loaded in memory and will resolve the load virtual
923  /// addresses is each image, and also in images that are loaded by
924  /// code.
925  ///
926  /// \return
927  /// A list of Module objects in a module list.
928  const ModuleList &GetImages() const { return m_images; }
929 
931 
932  /// Return whether this FileSpec corresponds to a module that should be
933  /// considered for general searches.
934  ///
935  /// This API will be consulted by the SearchFilterForUnconstrainedSearches
936  /// and any module that returns \b true will not be searched. Note the
937  /// SearchFilterForUnconstrainedSearches is the search filter that
938  /// gets used in the CreateBreakpoint calls when no modules is provided.
939  ///
940  /// The target call at present just consults the Platform's call of the
941  /// same name.
942  ///
943  /// \param[in] module_spec
944  /// Path to the module.
945  ///
946  /// \return \b true if the module should be excluded, \b false otherwise.
947  bool ModuleIsExcludedForUnconstrainedSearches(const FileSpec &module_spec);
948 
949  /// Return whether this module should be considered for general searches.
950  ///
951  /// This API will be consulted by the SearchFilterForUnconstrainedSearches
952  /// and any module that returns \b true will not be searched. Note the
953  /// SearchFilterForUnconstrainedSearches is the search filter that
954  /// gets used in the CreateBreakpoint calls when no modules is provided.
955  ///
956  /// The target call at present just consults the Platform's call of the
957  /// same name.
958  ///
959  /// FIXME: When we get time we should add a way for the user to set modules
960  /// that they
961  /// don't want searched, in addition to or instead of the platform ones.
962  ///
963  /// \param[in] module_sp
964  /// A shared pointer reference to the module that checked.
965  ///
966  /// \return \b true if the module should be excluded, \b false otherwise.
967  bool
968  ModuleIsExcludedForUnconstrainedSearches(const lldb::ModuleSP &module_sp);
969 
970  const ArchSpec &GetArchitecture() const { return m_arch.GetSpec(); }
971 
972  /// Set the architecture for this target.
973  ///
974  /// If the current target has no Images read in, then this just sets the
975  /// architecture, which will be used to select the architecture of the
976  /// ExecutableModule when that is set. If the current target has an
977  /// ExecutableModule, then calling SetArchitecture with a different
978  /// architecture from the currently selected one will reset the
979  /// ExecutableModule to that slice of the file backing the ExecutableModule.
980  /// If the file backing the ExecutableModule does not contain a fork of this
981  /// architecture, then this code will return false, and the architecture
982  /// won't be changed. If the input arch_spec is the same as the already set
983  /// architecture, this is a no-op.
984  ///
985  /// \param[in] arch_spec
986  /// The new architecture.
987  ///
988  /// \param[in] set_platform
989  /// If \b true, then the platform will be adjusted if the currently
990  /// selected platform is not compatible with the architecture being set.
991  /// If \b false, then just the architecture will be set even if the
992  /// currently selected platform isn't compatible (in case it might be
993  /// manually set following this function call).
994  ///
995  /// \return
996  /// \b true if the architecture was successfully set, \bfalse otherwise.
997  bool SetArchitecture(const ArchSpec &arch_spec, bool set_platform = false);
998 
999  bool MergeArchitecture(const ArchSpec &arch_spec);
1000 
1002 
1004 
1005  size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len,
1006  Status &error);
1007 
1008  // Reading memory through the target allows us to skip going to the process
1009  // for reading memory if possible and it allows us to try and read from any
1010  // constant sections in our object files on disk. If you always want live
1011  // program memory, read straight from the process. If you possibly want to
1012  // read from const sections in object files, read from the target. This
1013  // version of ReadMemory will try and read memory from the process if the
1014  // process is alive. The order is:
1015  // 1 - if (force_live_memory == false) and the address falls in a read-only
1016  // section, then read from the file cache
1017  // 2 - if there is a process, then read from memory
1018  // 3 - if there is no process, then read from the file cache
1019  size_t ReadMemory(const Address &addr, void *dst, size_t dst_len,
1020  Status &error, bool force_live_memory = false,
1021  lldb::addr_t *load_addr_ptr = nullptr);
1022 
1023  size_t ReadCStringFromMemory(const Address &addr, std::string &out_str,
1024  Status &error);
1025 
1026  size_t ReadCStringFromMemory(const Address &addr, char *dst,
1027  size_t dst_max_len, Status &result_error);
1028 
1029  size_t ReadScalarIntegerFromMemory(const Address &addr, uint32_t byte_size,
1030  bool is_signed, Scalar &scalar,
1031  Status &error,
1032  bool force_live_memory = false);
1033 
1034  uint64_t ReadUnsignedIntegerFromMemory(const Address &addr,
1035  size_t integer_byte_size,
1036  uint64_t fail_value, Status &error,
1037  bool force_live_memory = false);
1038 
1039  bool ReadPointerFromMemory(const Address &addr, Status &error,
1040  Address &pointer_addr,
1041  bool force_live_memory = false);
1042 
1045  }
1046 
1047  static Target *GetTargetFromContexts(const ExecutionContext *exe_ctx_ptr,
1048  const SymbolContext *sc_ptr);
1049 
1050  // lldb::ExecutionContextScope pure virtual functions
1051  lldb::TargetSP CalculateTarget() override;
1052 
1053  lldb::ProcessSP CalculateProcess() override;
1054 
1055  lldb::ThreadSP CalculateThread() override;
1056 
1057  lldb::StackFrameSP CalculateStackFrame() override;
1058 
1059  void CalculateExecutionContext(ExecutionContext &exe_ctx) override;
1060 
1062 
1063  llvm::Expected<TypeSystem &>
1065  bool create_on_demand = true);
1066 
1067  std::vector<TypeSystem *> GetScratchTypeSystems(bool create_on_demand = true);
1068 
1071 
1072  // Creates a UserExpression for the given language, the rest of the
1073  // parameters have the same meaning as for the UserExpression constructor.
1074  // Returns a new-ed object which the caller owns.
1075 
1076  UserExpression *
1077  GetUserExpressionForLanguage(llvm::StringRef expr, llvm::StringRef prefix,
1078  lldb::LanguageType language,
1079  Expression::ResultType desired_type,
1080  const EvaluateExpressionOptions &options,
1081  ValueObject *ctx_obj, Status &error);
1082 
1083  // Creates a FunctionCaller for the given language, the rest of the
1084  // parameters have the same meaning as for the FunctionCaller constructor.
1085  // Since a FunctionCaller can't be
1086  // IR Interpreted, it makes no sense to call this with an
1087  // ExecutionContextScope that lacks
1088  // a Process.
1089  // Returns a new-ed object which the caller owns.
1090 
1092  const CompilerType &return_type,
1093  const Address &function_address,
1094  const ValueList &arg_value_list,
1095  const char *name, Status &error);
1096 
1097  /// Creates and installs a UtilityFunction for the given language.
1098  llvm::Expected<std::unique_ptr<UtilityFunction>>
1100  lldb::LanguageType language, ExecutionContext &exe_ctx);
1101 
1102  // Install any files through the platform that need be to installed prior to
1103  // launching or attaching.
1104  Status Install(ProcessLaunchInfo *launch_info);
1105 
1106  bool ResolveFileAddress(lldb::addr_t load_addr, Address &so_addr);
1107 
1108  bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr,
1110 
1111  bool SetSectionLoadAddress(const lldb::SectionSP &section,
1112  lldb::addr_t load_addr,
1113  bool warn_multiple = false);
1114 
1115  size_t UnloadModuleSections(const lldb::ModuleSP &module_sp);
1116 
1117  size_t UnloadModuleSections(const ModuleList &module_list);
1118 
1119  bool SetSectionUnloaded(const lldb::SectionSP &section_sp);
1120 
1121  bool SetSectionUnloaded(const lldb::SectionSP &section_sp,
1122  lldb::addr_t load_addr);
1123 
1124  void ClearAllLoadedSections();
1125 
1126  /// Set the \a Trace object containing processor trace information of this
1127  /// target.
1128  ///
1129  /// \param[in] trace_sp
1130  /// The trace object.
1131  void SetTrace(const lldb::TraceSP &trace_sp);
1132 
1133  /// Get the \a Trace object containing processor trace information of this
1134  /// target.
1135  ///
1136  /// \return
1137  /// The trace object. It might be undefined.
1138  lldb::TraceSP GetTrace();
1139 
1140  /// Create a \a Trace object for the current target using the using the
1141  /// default supported tracing technology for this process.
1142  ///
1143  /// \return
1144  /// The new \a Trace or an \a llvm::Error if a \a Trace already exists or
1145  /// the trace couldn't be created.
1146  llvm::Expected<lldb::TraceSP> CreateTrace();
1147 
1148  /// If a \a Trace object is present, this returns it, otherwise a new Trace is
1149  /// created with \a Trace::CreateTrace.
1150  llvm::Expected<lldb::TraceSP> GetTraceOrCreate();
1151 
1152  // Since expressions results can persist beyond the lifetime of a process,
1153  // and the const expression results are available after a process is gone, we
1154  // provide a way for expressions to be evaluated from the Target itself. If
1155  // an expression is going to be run, then it should have a frame filled in in
1156  // the execution context.
1158  llvm::StringRef expression, ExecutionContextScope *exe_scope,
1159  lldb::ValueObjectSP &result_valobj_sp,
1161  std::string *fixed_expression = nullptr, ValueObject *ctx_obj = nullptr);
1162 
1163  lldb::ExpressionVariableSP GetPersistentVariable(ConstString name);
1164 
1166 
1167  /// This method will return the address of the starting function for
1168  /// this binary, e.g. main() or its equivalent. This can be used as
1169  /// an address of a function that is not called once a binary has
1170  /// started running - e.g. as a return address for inferior function
1171  /// calls that are unambiguous completion of the function call, not
1172  /// called during the course of the inferior function code running.
1173  ///
1174  /// If no entry point can be found, an invalid address is returned.
1175  ///
1176  /// \param [out] err
1177  /// This object will be set to failure if no entry address could
1178  /// be found, and may contain a helpful error message.
1179  //
1180  /// \return
1181  /// Returns the entry address for this program, or an error
1182  /// if none can be found.
1183  llvm::Expected<lldb_private::Address> GetEntryPointAddress();
1184 
1185  // Target Stop Hooks
1186  class StopHook : public UserID {
1187  public:
1188  StopHook(const StopHook &rhs);
1189  virtual ~StopHook() = default;
1190 
1192  enum class StopHookResult : uint32_t {
1193  KeepStopped = 0,
1196  };
1197 
1198  lldb::TargetSP &GetTarget() { return m_target_sp; }
1199 
1200  // Set the specifier. The stop hook will own the specifier, and is
1201  // responsible for deleting it when we're done.
1202  void SetSpecifier(SymbolContextSpecifier *specifier);
1203 
1205 
1206  bool ExecutionContextPasses(const ExecutionContext &exe_ctx);
1207 
1208  // Called on stop, this gets passed the ExecutionContext for each "stop
1209  // with a reason" thread. It should add to the stream whatever text it
1210  // wants to show the user, and return False to indicate it wants the target
1211  // not to stop.
1212  virtual StopHookResult HandleStop(ExecutionContext &exe_ctx,
1213  lldb::StreamSP output) = 0;
1214 
1215  // Set the Thread Specifier. The stop hook will own the thread specifier,
1216  // and is responsible for deleting it when we're done.
1217  void SetThreadSpecifier(ThreadSpec *specifier);
1218 
1220 
1221  bool IsActive() { return m_active; }
1222 
1223  void SetIsActive(bool is_active) { m_active = is_active; }
1224 
1225  void SetAutoContinue(bool auto_continue) {
1226  m_auto_continue = auto_continue;
1227  }
1228 
1229  bool GetAutoContinue() const { return m_auto_continue; }
1230 
1231  void GetDescription(Stream *s, lldb::DescriptionLevel level) const;
1232  virtual void GetSubclassDescription(Stream *s,
1233  lldb::DescriptionLevel level) const = 0;
1234 
1235  protected:
1236  lldb::TargetSP m_target_sp;
1237  lldb::SymbolContextSpecifierSP m_specifier_sp;
1238  std::unique_ptr<ThreadSpec> m_thread_spec_up;
1239  bool m_active = true;
1240  bool m_auto_continue = false;
1241 
1242  StopHook(lldb::TargetSP target_sp, lldb::user_id_t uid);
1243  };
1244 
1246  public:
1247  virtual ~StopHookCommandLine() = default;
1248 
1250  void SetActionFromString(const std::string &strings);
1251  void SetActionFromStrings(const std::vector<std::string> &strings);
1252 
1254  lldb::StreamSP output_sp) override;
1256  lldb::DescriptionLevel level) const override;
1257 
1258  private:
1260  // Use CreateStopHook to make a new empty stop hook. The GetCommandPointer
1261  // and fill it with commands, and SetSpecifier to set the specifier shared
1262  // pointer (can be null, that will match anything.)
1263  StopHookCommandLine(lldb::TargetSP target_sp, lldb::user_id_t uid)
1264  : StopHook(target_sp, uid) {}
1265  friend class Target;
1266  };
1267 
1268  class StopHookScripted : public StopHook {
1269  public:
1270  virtual ~StopHookScripted() = default;
1272  lldb::StreamSP output) override;
1273 
1275  StructuredData::ObjectSP extra_args_sp);
1276 
1278  lldb::DescriptionLevel level) const override;
1279 
1280  private:
1282  /// This holds the dictionary of keys & values that can be used to
1283  /// parametrize any given callback's behavior.
1284  StructuredDataImpl *m_extra_args; // We own this structured data,
1285  // but the SD itself manages the UP.
1286  /// This holds the python callback object.
1288 
1289  /// Use CreateStopHook to make a new empty stop hook. The GetCommandPointer
1290  /// and fill it with commands, and SetSpecifier to set the specifier shared
1291  /// pointer (can be null, that will match anything.)
1292  StopHookScripted(lldb::TargetSP target_sp, lldb::user_id_t uid)
1293  : StopHook(target_sp, uid) {}
1294  friend class Target;
1295  };
1296 
1297  typedef std::shared_ptr<StopHook> StopHookSP;
1298 
1299  /// Add an empty stop hook to the Target's stop hook list, and returns a
1300  /// shared pointer to it in new_hook. Returns the id of the new hook.
1302 
1303  /// If you tried to create a stop hook, and that failed, call this to
1304  /// remove the stop hook, as it will also reset the stop hook counter.
1306 
1307  // Runs the stop hooks that have been registered for this target.
1308  // Returns true if the stop hooks cause the target to resume.
1309  bool RunStopHooks();
1310 
1311  size_t GetStopHookSize();
1312 
1313  bool SetSuppresStopHooks(bool suppress) {
1314  bool old_value = m_suppress_stop_hooks;
1315  m_suppress_stop_hooks = suppress;
1316  return old_value;
1317  }
1318 
1320 
1322 
1323  void RemoveAllStopHooks();
1324 
1326 
1327  bool SetStopHookActiveStateByID(lldb::user_id_t uid, bool active_state);
1328 
1329  void SetAllStopHooksActiveState(bool active_state);
1330 
1331  size_t GetNumStopHooks() const { return m_stop_hooks.size(); }
1332 
1334  if (index >= GetNumStopHooks())
1335  return StopHookSP();
1336  StopHookCollection::iterator pos = m_stop_hooks.begin();
1337 
1338  while (index > 0) {
1339  pos++;
1340  index--;
1341  }
1342  return (*pos).second;
1343  }
1344 
1345  lldb::PlatformSP GetPlatform() { return m_platform_sp; }
1346 
1347  void SetPlatform(const lldb::PlatformSP &platform_sp) {
1348  m_platform_sp = platform_sp;
1349  }
1350 
1352 
1353  // Methods.
1354  lldb::SearchFilterSP
1355  GetSearchFilterForModule(const FileSpec *containingModule);
1356 
1357  lldb::SearchFilterSP
1358  GetSearchFilterForModuleList(const FileSpecList *containingModuleList);
1359 
1360  lldb::SearchFilterSP
1361  GetSearchFilterForModuleAndCUList(const FileSpecList *containingModules,
1362  const FileSpecList *containingSourceFiles);
1363 
1364  lldb::REPLSP GetREPL(Status &err, lldb::LanguageType language,
1365  const char *repl_options, bool can_create);
1366 
1367  void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp);
1368 
1371  }
1372 
1373 protected:
1374  /// Implementing of ModuleList::Notifier.
1375 
1376  void NotifyModuleAdded(const ModuleList &module_list,
1377  const lldb::ModuleSP &module_sp) override;
1378 
1379  void NotifyModuleRemoved(const ModuleList &module_list,
1380  const lldb::ModuleSP &module_sp) override;
1381 
1382  void NotifyModuleUpdated(const ModuleList &module_list,
1383  const lldb::ModuleSP &old_module_sp,
1384  const lldb::ModuleSP &new_module_sp) override;
1385 
1386  void NotifyWillClearList(const ModuleList &module_list) override;
1387 
1388  void NotifyModulesRemoved(lldb_private::ModuleList &module_list) override;
1389 
1390  class Arch {
1391  public:
1392  explicit Arch(const ArchSpec &spec);
1393  const Arch &operator=(const ArchSpec &spec);
1394 
1395  const ArchSpec &GetSpec() const { return m_spec; }
1396  Architecture *GetPlugin() const { return m_plugin_up.get(); }
1397 
1398  private:
1400  std::unique_ptr<Architecture> m_plugin_up;
1401  };
1402  // Member variables.
1404  lldb::PlatformSP m_platform_sp; ///< The platform for this target.
1405  std::recursive_mutex m_mutex; ///< An API mutex that is used by the lldb::SB*
1406  /// classes make the SB interface thread safe
1407  /// When the private state thread calls SB API's - usually because it is
1408  /// running OS plugin or Python ThreadPlan code - it should not block on the
1409  /// API mutex that is held by the code that kicked off the sequence of events
1410  /// that led us to run the code. We hand out this mutex instead when we
1411  /// detect that code is running on the private state thread.
1412  std::recursive_mutex m_private_mutex;
1414  ModuleList m_images; ///< The list of images for this process (shared
1415  /// libraries and anything dynamically loaded).
1419  using BreakpointNameList = std::map<ConstString, BreakpointName *>;
1421 
1422  lldb::BreakpointSP m_last_created_breakpoint;
1424  lldb::WatchpointSP m_last_created_watchpoint;
1425  // We want to tightly control the process destruction process so we can
1426  // correctly tear down everything that we need to, so the only class that
1427  // knows about the process lifespan is this target class.
1428  lldb::ProcessSP m_process_sp;
1429  lldb::SearchFilterSP m_search_filter_sp;
1432 
1433  typedef std::map<lldb::LanguageType, lldb::REPLSP> REPLMap;
1435 
1436  lldb::SourceManagerUP m_source_manager_up;
1437 
1438  typedef std::map<lldb::user_id_t, StopHookSP> StopHookCollection;
1441  uint32_t m_latest_stop_hook_id; /// This records the last natural stop at
1442  /// which we ran a stop-hook.
1443  bool m_valid;
1444  bool m_suppress_stop_hooks; /// Used to not run stop hooks for expressions
1447  /// An optional \a lldb_private::Trace object containing processor trace
1448  /// information of this target.
1449  lldb::TraceSP m_trace_sp;
1450  /// Stores the frame recognizers of this target.
1451  lldb::StackFrameRecognizerManagerUP m_frame_recognizer_manager_up;
1452 
1453  static void ImageSearchPathsChanged(const PathMappingList &path_list,
1454  void *baton);
1455 
1456  // Utilities for `statistics` command.
1457 private:
1458  std::vector<uint32_t> m_stats_storage;
1459  bool m_collecting_stats = false;
1460 
1461 public:
1463 
1465 
1467  if (!GetCollectingStats())
1468  return;
1470  "invalid statistics!");
1471  m_stats_storage[key] += 1;
1472  }
1473 
1474  std::vector<uint32_t> GetStatistics() { return m_stats_storage; }
1475 
1476 private:
1477  /// Construct with optional file and arch.
1478  ///
1479  /// This member is private. Clients must use
1480  /// TargetList::CreateTarget(const FileSpec*, const ArchSpec*)
1481  /// so all targets can be tracked from the central target list.
1482  ///
1483  /// \see TargetList::CreateTarget(const FileSpec*, const ArchSpec*)
1484  Target(Debugger &debugger, const ArchSpec &target_arch,
1485  const lldb::PlatformSP &platform_sp, bool is_dummy_target);
1486 
1487  // Helper function.
1488  bool ProcessIsValid();
1489 
1490  // Copy breakpoints, stop hooks and so forth from the dummy target:
1491  void PrimeFromDummyTarget(Target &target);
1492 
1493  void AddBreakpoint(lldb::BreakpointSP breakpoint_sp, bool internal);
1494 
1496 
1497  Target(const Target &) = delete;
1498  const Target &operator=(const Target &) = delete;
1499 };
1500 
1501 } // namespace lldb_private
1502 
1503 #endif // LLDB_TARGET_TARGET_H
lldb_private::EvaluateExpressionOptions::DoesKeepInMemory
bool DoesKeepInMemory() const
Definition: Target.h:317
lldb_private::TargetProperties::GetStandardInputPath
FileSpec GetStandardInputPath() const
Definition: Target.cpp:4150
lldb_private::TargetProperties::SetNonStopModeEnabled
void SetNonStopModeEnabled(bool b)
Definition: Target.cpp:4296
lldb_private::Target::PrimeFromDummyTarget
void PrimeFromDummyTarget(Target &target)
Definition: Target.cpp:132
lldb_private::Target::GetFrameRecognizerManager
StackFrameRecognizerManager & GetFrameRecognizerManager()
Definition: Target.h:1369
lldb_private::Target::TargetEventData::GetTarget
const lldb::TargetSP & GetTarget() const
Definition: Target.h:505
lldb_private::ModuleList::LoadScriptingResourcesInTarget
bool LoadScriptingResourcesInTarget(Target *target, std::list< Status > &errors, Stream *feedback_stream=nullptr, bool continue_on_error=true)
Definition: ModuleList.cpp:996
lldb_private::TargetProperties::DisableSTDIOValueChangedCallback
void DisableSTDIOValueChangedCallback()
Definition: Target.cpp:4400
lldb_private::Target::ConfigureBreakpointName
void ConfigureBreakpointName(BreakpointName &bp_name, const BreakpointOptions &options, const BreakpointName::Permissions &permissions)
Definition: Target.cpp:737
lldb_private::Target::StopHookScripted::~StopHookScripted
virtual ~StopHookScripted()=default
lldb_private::EvaluateExpressionOptions::m_cancel_callback
lldb::ExpressionCancelCallback m_cancel_callback
Definition: Target.h:444
lldb_private::EvaluateExpressionOptions::GetColorizeErrors
bool GetColorizeErrors() const
Definition: Target.h:360
BreakpointName.h
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::Target::StopHookCommandLine::StopHookCommandLine
StopHookCommandLine(lldb::TargetSP target_sp, lldb::user_id_t uid)
Definition: Target.h:1263
lldb_private::EvaluateExpressionOptions::GetTimeout
const Timeout< std::micro > & GetTimeout() const
Definition: Target.h:328
lldb-public.h
lldb_private::Target::Destroy
void Destroy()
Definition: Target.cpp:269
lldb_private::Target::StopHook::StopHook
StopHook(const StopHook &rhs)
Definition: Target.cpp:3288
lldb_private::TargetProperties::ComputeEnvironment
Environment ComputeEnvironment() const
Definition: Target.cpp:3955
lldb_private::MemoryModuleLoadLevel
MemoryModuleLoadLevel
Definition: lldb-private-enumerations.h:169
lldb_private::Target::NotifyWillClearList
void NotifyWillClearList(const ModuleList &module_list) override
Definition: Target.cpp:1575
lldb_private::BreakpointList
General Outline: Allows adding and removing breakpoints and find by ID and index.
Definition: BreakpointList.h:25
lldb_private::Architecture
Definition: Architecture.h:17
lldb_private::TargetProperties::GetDisplayExpressionsInCrashlogs
bool GetDisplayExpressionsInCrashlogs() const
Definition: Target.cpp:4228
lldb_private::ArchSpec
Definition: ArchSpec.h:33
lldb_private::Target::RemoveNameFromBreakpoint
void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, ConstString name)
Definition: Target.cpp:732
lldb_private::RegularExpression
Definition: RegularExpression.h:18
lldb_private::Target::m_latest_stop_hook_id
uint32_t m_latest_stop_hook_id
Definition: Target.h:1441
lldb_private::Target::m_last_created_breakpoint
lldb::BreakpointSP m_last_created_breakpoint
Definition: Target.h:1422
lldb_private::TargetProperties::SetArg0
void SetArg0(llvm::StringRef arg)
Definition: Target.cpp:3938
lldb_private::TargetProperties::GetRequireHardwareBreakpoints
bool GetRequireHardwareBreakpoints() const
Definition: Target.cpp:4333
lldb_private::Target::GetGlobalProperties
static const lldb::TargetPropertiesSP & GetGlobalProperties()
Definition: Target.cpp:2771
lldb_private::Target::DeleteBreakpointName
void DeleteBreakpointName(ConstString name)
Definition: Target.cpp:721
lldb_private::TargetProperties::GetInheritTCC
bool GetInheritTCC() const
Definition: Target.cpp:3882
lldb_private::TargetProperties::SetRequireHardwareBreakpoints
void SetRequireHardwareBreakpoints(bool b)
Definition: Target.cpp:4339
lldb_private::Event
Definition: Event.h:180
lldb_private::Target::GetEntryPointAddress
llvm::Expected< lldb_private::Address > GetEntryPointAddress()
This method will return the address of the starting function for this binary, e.g.
Definition: Target.cpp:2483
lldb_private::TargetProperties::GetTargetEnvironment
Environment GetTargetEnvironment() const
Definition: Target.cpp:4016
lldb_private::Target::ModuleIsExcludedForUnconstrainedSearches
bool ModuleIsExcludedForUnconstrainedSearches(const FileSpec &module_spec)
Return whether this FileSpec corresponds to a module that should be considered for general searches.
Definition: Target.cpp:1656
lldb_private::TargetProperties::OutputPathValueChangedCallback
void OutputPathValueChangedCallback()
Definition: Target.cpp:4369
lldb_private::Target::ClearModules
void ClearModules(bool delete_locations)
Definition: Target.cpp:1384
lldb_private::EvaluateExpressionOptions::SetTimeout
void SetTimeout(const Timeout< std::micro > &timeout)
Definition: Target.h:330
lldb_private::EvaluateExpressionOptions::SetREPLEnabled
void SetREPLEnabled(bool b)
Definition: Target.h:370
lldb_private::EvaluateExpressionOptions::SetLanguage
void SetLanguage(lldb::LanguageType language)
Definition: Target.h:290
lldb_private::Target::m_repl_map
REPLMap m_repl_map
Definition: Target.h:1434
lldb_private::Target::SymbolsDidLoad
void SymbolsDidLoad(ModuleList &module_list)
Definition: Target.cpp:1630
lldb_private::TargetProperties::GetExprErrorLimit
uint64_t GetExprErrorLimit() const
Definition: Target.cpp:4204
lldb_private::ExecutionPolicy
ExecutionPolicy
Expression execution policies.
Definition: lldb-private-enumerations.h:144
lldb_private::Target::StopHookCommandLine::HandleStop
StopHookResult HandleStop(ExecutionContext &exc_ctx, lldb::StreamSP output_sp) override
Definition: Target.cpp:3392
lldb_private::Target::StopHook::m_target_sp
lldb::TargetSP m_target_sp
Definition: Target.h:1236
lldb_private::Target::m_suppress_stop_hooks
bool m_suppress_stop_hooks
Definition: Target.h:1444
lldb_private::AddressClass
AddressClass
Definition: lldb-private-enumerations.h:48
lldb_private::Target::DisableBreakpointByID
bool DisableBreakpointByID(lldb::break_id_t break_id)
Definition: Target.cpp:954
lldb_private::StructuredData::GenericSP
std::shared_ptr< Generic > GenericSP
Definition: StructuredData.h:68
lldb::eNoDynamicValues
@ eNoDynamicValues
Definition: lldb-enumerations.h:495
lldb_private::Target::StopHook::StopHookKind::ScriptBased
@ ScriptBased
lldb_private::Target::StopHookCommandLine::SetActionFromStrings
void SetActionFromStrings(const std::vector< std::string > &strings)
Definition: Target.cpp:3385
lldb_private::TargetProperties::GetNonStopModeEnabled
bool GetNonStopModeEnabled() const
Definition: Target.cpp:4291
lldb_private::TargetProperties::SetStandardInputPath
void SetStandardInputPath(llvm::StringRef path)
Definition: Target.cpp:4155
lldb_private::Target::eBroadcastBitModulesUnloaded
@ eBroadcastBitModulesUnloaded
Definition: Target.h:467
lldb_private::TargetProperties::SetDisplayRuntimeSupportValues
void SetDisplayRuntimeSupportValues(bool b)
Definition: Target.cpp:4276
lldb_private::TargetProperties::SetDisplayRecognizedArguments
void SetDisplayRecognizedArguments(bool b)
Definition: Target.cpp:4286
lldb_private::Target::StopHook::m_thread_spec_up
std::unique_ptr< ThreadSpec > m_thread_spec_up
Definition: Target.h:1238
lldb_private::TargetProperties::GetPreloadSymbols
bool GetPreloadSymbols() const
Definition: Target.cpp:3860
lldb_private::Target::GetOrCreateModule
lldb::ModuleSP GetOrCreateModule(const ModuleSpec &module_spec, bool notify, Status *error_ptr=nullptr)
Find a binary on the system and return its Module, or return an existing Module that is already in th...
Definition: Target.cpp:1979
lldb::ExpressionCancelCallback
bool(* ExpressionCancelCallback)(ExpressionEvaluationPhase phase, void *baton)
Definition: lldb-types.h:74
lldb::ExpressionResults
ExpressionResults
The results of expression evaluation.
Definition: lldb-enumerations.h:270
lldb_private::Target::StopHook::SetAutoContinue
void SetAutoContinue(bool auto_continue)
Definition: Target.h:1225
lldb_private::Target::GetBreakpointNames
void GetBreakpointNames(std::vector< std::string > &names)
Definition: Target.cpp:760
lldb_private::Target::operator=
const Target & operator=(const Target &)=delete
ProcessLaunchInfo.h
lldb_private::Target::StopHook::m_auto_continue
bool m_auto_continue
Definition: Target.h:1240
lldb_private::UserID
Definition: UserID.h:31
lldb_private::Target::UnloadModuleSections
size_t UnloadModuleSections(const lldb::ModuleSP &module_sp)
Definition: Target.cpp:2867
lldb_private::LoadDependentFiles
LoadDependentFiles
Definition: Target.h:60
lldb_private::TargetProperties::GetMaximumSizeOfStringSummary
uint32_t GetMaximumSizeOfStringSummary() const
Definition: Target.cpp:4138
lldb_private::eImportStdModuleTrue
@ eImportStdModuleTrue
Definition: Target.h:69
lldb_private::Target::CalculateThread
lldb::ThreadSP CalculateThread() override
Definition: Target.cpp:2180
lldb_private::Scalar
Definition: Scalar.h:34
lldb_private::eImportStdModuleFallback
@ eImportStdModuleFallback
Definition: Target.h:68
lldb_private::EvaluateExpressionOptions::DoesCoerceToId
bool DoesCoerceToId() const
Definition: Target.h:292
lldb_private::Target::GetExecutableModulePointer
Module * GetExecutableModulePointer()
Definition: Target.cpp:1362
Architecture.h
lldb_private::Target::StopHook::HandleStop
virtual StopHookResult HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP output)=0
lldb_private::TargetProperties::GetEnableSyntheticValue
bool GetEnableSyntheticValue() const
Definition: Target.cpp:4120
lldb_private::Target::CalculateProcess
lldb::ProcessSP CalculateProcess() override
Definition: Target.cpp:2178
lldb_private::Target::DisableAllBreakpoints
void DisableAllBreakpoints(bool internal_also=false)
Definition: Target.cpp:900
lldb_private::eLoadScriptFromSymFileFalse
@ eLoadScriptFromSymFileFalse
Definition: Target.h:50
lldb_private::Target::REPLMap
std::map< lldb::LanguageType, lldb::REPLSP > REPLMap
Definition: Target.h:1433
lldb_private::EventData
Definition: Event.h:36
lldb_private::Target::GetExecutableModule
lldb::ModuleSP GetExecutableModule()
Gets the module for the main executable.
Definition: Target.cpp:1348
lldb_private::EvaluateExpressionOptions::SetExecutionPolicy
void SetExecutionPolicy(ExecutionPolicy policy=eExecutionPolicyAlways)
Definition: Target.h:284
lldb_private::Target::BreakpointNameList
std::map< ConstString, BreakpointName * > BreakpointNameList
Definition: Target.h:1419
lldb_private::TargetProperties::GetMemoryModuleLoadLevel
MemoryModuleLoadLevel GetMemoryModuleLoadLevel() const
Definition: Target.cpp:4254
lldb_private::EvaluateExpressionOptions::GetPrefix
const char * GetPrefix() const
Definition: Target.h:294
lldb_private::Target::AddBreakpoint
void AddBreakpoint(lldb::BreakpointSP breakpoint_sp, bool internal)
Definition: Target.cpp:646
lldb_private::EvaluateExpressionOptions::SetIsForUtilityExpr
void SetIsForUtilityExpr(bool b)
Definition: Target.h:417
lldb_private::TargetProperties::~TargetProperties
~TargetProperties() override
lldb_private::Target::ClearAllWatchpointHistoricValues
bool ClearAllWatchpointHistoricValues()
Definition: Target.cpp:1246
lldb_private::Target::StopHookCommandLine::m_commands
StringList m_commands
Definition: Target.h:1259
lldb_private::TargetProperties::SetDisableASLR
void SetDisableASLR(bool b)
Definition: Target.cpp:3877
lldb_private::Target::Arch::operator=
const Arch & operator=(const ArchSpec &spec)
Definition: Target.cpp:76
lldb_private::EvaluateExpressionOptions::DoesIgnoreBreakpoints
bool DoesIgnoreBreakpoints() const
Definition: Target.h:311
lldb_private::EvaluateExpressionOptions::SetTrapExceptions
void SetTrapExceptions(bool b)
Definition: Target.h:366
lldb_private::EvaluateExpressionOptions
Definition: Target.h:262
lldb_private::TargetProperties::GetLoadScriptFromSymbolFile
LoadScriptFromSymFile GetLoadScriptFromSymbolFile() const
Definition: Target.cpp:4234
lldb_private::Target::m_valid
bool m_valid
This records the last natural stop at which we ran a stop-hook.
Definition: Target.h:1443
lldb_private::TargetProperties::m_experimental_properties_up
std::unique_ptr< TargetExperimentalProperties > m_experimental_properties_up
Definition: Target.h:258
lldb_private::TargetProperties::GetInjectLocalVariables
bool GetInjectLocalVariables(ExecutionContext *exe_ctx) const
Definition: Target.cpp:3803
lldb_private::EvaluateExpressionOptions::SetPoundLine
void SetPoundLine(const char *path, uint32_t line) const
Definition: Target.h:385
lldb_private::Target::GetCollectingStats
bool GetCollectingStats()
Definition: Target.h:1464
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
lldb_private::EvaluateExpressionOptions::m_repl
bool m_repl
Definition: Target.h:431
lldb_private::Target::StopHookScripted
Definition: Target.h:1268
lldb_private::TargetList
Definition: TargetList.h:21
lldb_private::Target::StopHook::GetAutoContinue
bool GetAutoContinue() const
Definition: Target.h:1229
lldb_private::eLoadDependentsDefault
@ eLoadDependentsDefault
Definition: Target.h:61
lldb_private::EvaluateExpressionOptions::SetCancelCallback
void SetCancelCallback(lldb::ExpressionCancelCallback callback, void *baton)
Definition: Target.h:372
lldb_private::Target::m_watchpoint_list
WatchpointList m_watchpoint_list
Definition: Target.h:1423
lldb_private::Target::StopHook::GetTarget
lldb::TargetSP & GetTarget()
Definition: Target.h:1198
lldb_private::Module
Definition: Module.h:84
lldb_private::Target::GetScratchTypeSystemForLanguage
llvm::Expected< TypeSystem & > GetScratchTypeSystemForLanguage(lldb::LanguageType language, bool create_on_demand=true)
Definition: Target.cpp:2202
lldb_private::Target::GetImageSearchPathList
PathMappingList & GetImageSearchPathList()
Definition: Target.cpp:2189
lldb_private::Target::StopHookCommandLine::SetActionFromString
void SetActionFromString(const std::string &strings)
Definition: Target.cpp:3381
lldb_private::Target::TargetEventData::GetEventDataFromEvent
static const TargetEventData * GetEventDataFromEvent(const Event *event_ptr)
Definition: Target.cpp:4444
lldb_private::ValueList
Definition: Value.h:157
lldb_private::Target::m_platform_sp
lldb::PlatformSP m_platform_sp
The platform for this target.
Definition: Target.h:1404
lldb_private::BreakpointName
Definition: BreakpointName.h:30
lldb_private::Target::CreateExceptionBreakpoint
lldb::BreakpointSP CreateExceptionBreakpoint(enum lldb::LanguageType language, bool catch_bp, bool throw_bp, bool internal, Args *additional_args=nullptr, Status *additional_args_error=nullptr)
Definition: Target.cpp:580
Disassembler.h
lldb_private::TargetProperties::SetDebugUtilityExpression
void SetDebugUtilityExpression(bool debug)
Definition: Target.cpp:4413
lldb_private::UserExpression
Definition: UserExpression.h:35
lldb_private::TargetProperties::InputPathValueChangedCallback
void InputPathValueChangedCallback()
Definition: Target.cpp:4364
lldb_private::Target::GetTargetFromContexts
static Target * GetTargetFromContexts(const ExecutionContext *exe_ctx_ptr, const SymbolContext *sc_ptr)
Definition: Target.cpp:2379
lldb_private::Target::m_scratch_type_system_map
TypeSystemMap m_scratch_type_system_map
Definition: Target.h:1431
lldb_private::eLoadScriptFromSymFileTrue
@ eLoadScriptFromSymFileTrue
Definition: Target.h:49
lldb_private::Target::ReadMemoryFromFileCache
size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len, Status &error)
Definition: Target.cpp:1688
lldb_private::Stream
Definition: Stream.h:28
lldb_private::Target::GetWatchpointList
WatchpointList & GetWatchpointList()
Definition: Target.h:724
lldb_private::Args
Definition: Args.h:33
lldb_private::Target::CreateBreakpoint
lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpec &file, uint32_t line_no, uint32_t column, lldb::addr_t offset, LazyBool check_inlines, LazyBool skip_prologue, bool internal, bool request_hardware, LazyBool move_to_nearest_code)
Definition: Target.cpp:331
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::EvaluateExpressionOptions::m_one_thread_timeout
Timeout< std::micro > m_one_thread_timeout
Definition: Target.h:443
lldb_private::EvaluateExpressionOptions::m_generate_debug_info
bool m_generate_debug_info
Definition: Target.h:432
lldb_private::StackFrameRecognizerManager
Class that provides a registry of known stack frame recognizers.
Definition: StackFrameRecognizer.h:101
lldb_private::LazyBool
LazyBool
Definition: lldb-private-enumerations.h:115
lldb_private::Target::GetBreakpointList
BreakpointList & GetBreakpointList(bool internal=false)
Definition: Target.cpp:289
lldb_private::eExecutionPolicyAlways
@ eExecutionPolicyAlways
Definition: lldb-private-enumerations.h:147
lldb_private::EvaluateExpressionOptions::GetAutoApplyFixIts
bool GetAutoApplyFixIts() const
Definition: Target.h:407
lldb_private::Target::SerializeBreakpointsToFile
Status SerializeBreakpointsToFile(const FileSpec &file, const BreakpointIDList &bp_ids, bool append)
Definition: Target.cpp:991
lldb_private::Target::GetDebugger
Debugger & GetDebugger()
Definition: Target.h:1003
lldb_private::Target::FinalizeFileActions
void FinalizeFileActions(ProcessLaunchInfo &info)
Definition: Target.cpp:3203
lldb_private::Target::DidExec
void DidExec()
Called as the last function in Process::DidExec().
Definition: Target.cpp:1391
lldb_private::Target::m_source_manager_up
lldb::SourceManagerUP m_source_manager_up
Definition: Target.h:1436
lldb_private::EvaluateExpressionOptions::m_stop_others
bool m_stop_others
Definition: Target.h:428
lldb_private::Target::ResolveLoadAddress
bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr, uint32_t stop_id=SectionLoadHistory::eStopIDNow)
Definition: Target.cpp:2827
lldb_private::SymbolContext
Definition: SymbolContext.h:33
lldb_private::Target
Definition: Target.h:454
lldb_private::Target::StopHook::m_active
bool m_active
Definition: Target.h:1239
lldb_private::TargetProperties::GetMaximumNumberOfChildrenToDisplay
uint32_t GetMaximumNumberOfChildrenToDisplay() const
Definition: Target.cpp:4132
lldb_private::EvaluateExpressionOptions::SetRetriesWithFixIts
void SetRetriesWithFixIts(uint64_t number_of_retries)
Definition: Target.h:409
lldb_private::EvaluateExpressionOptions::GetREPLEnabled
bool GetREPLEnabled() const
Definition: Target.h:368
lldb_private::Target::GetFunctionCallerForLanguage
FunctionCaller * GetFunctionCallerForLanguage(lldb::LanguageType language, const CompilerType &return_type, const Address &function_address, const ValueList &arg_value_list, const char *name, Status &error)
Definition: Target.cpp:2295
lldb_private::TargetProperties::GetStandardErrorPath
FileSpec GetStandardErrorPath() const
Definition: Target.cpp:4170
lldb_private::Target::m_debugger
Debugger & m_debugger
Definition: Target.h:1403
lldb_private::Target::StopHookCommandLine::GetSubclassDescription
void GetSubclassDescription(Stream *s, lldb::DescriptionLevel level) const override
Definition: Target.cpp:3362
lldb_private::Target::CreateProcess
const lldb::ProcessSP & CreateProcess(lldb::ListenerSP listener_sp, llvm::StringRef plugin_name, const FileSpec *crash_file, bool can_connect)
Definition: Target.cpp:202
lldb_private::EvaluateExpressionOptions::SetResultIsInternal
void SetResultIsInternal(bool b)
Definition: Target.h:401
lldb_private::Target::GetImages
const ModuleList & GetImages() const
Get accessor for the images for this process.
Definition: Target.h:928
lldb_private::AddressClass::eInvalid
@ eInvalid
lldb_private::Target::m_private_mutex
std::recursive_mutex m_private_mutex
When the private state thread calls SB API's - usually because it is running OS plugin or Python Thre...
Definition: Target.h:1412
lldb_private::Target::StopHook::StopHookResult::RequestContinue
@ RequestContinue
lldb_private::Target::GetPersistentVariable
lldb::ExpressionVariableSP GetPersistentVariable(ConstString name)
Definition: Target.cpp:2451
lldb_private::TargetProperties::SetDisableSTDIO
void SetDisableSTDIO(bool b)
Definition: Target.cpp:3910
lldb_private::EvaluateExpressionOptions::default_timeout
static constexpr std::chrono::milliseconds default_timeout
Definition: Target.h:272
lldb_private::EvaluateExpressionOptions::GetGenerateDebugInfo
bool GetGenerateDebugInfo() const
Definition: Target.h:356
Broadcaster.h
lldb_private::EvaluateExpressionOptions::EvaluateExpressionOptions
EvaluateExpressionOptions()=default
lldb_private::Target::StopHook::m_specifier_sp
lldb::SymbolContextSpecifierSP m_specifier_sp
Definition: Target.h:1237
lldb_private::eLoadScriptFromSymFileWarn
@ eLoadScriptFromSymFileWarn
Definition: Target.h:51
lldb_private::Target::TargetEventData::GetFlavorString
static ConstString GetFlavorString()
Definition: Target.cpp:4429
lldb_private::Expression::ResultType
ResultType
Definition: Expression.h:35
lldb_private::TargetProperties::GetDisableSTDIO
bool GetDisableSTDIO() const
Definition: Target.cpp:3904
lldb_private::Target::GetSuppressStopHooks
bool GetSuppressStopHooks()
Definition: Target.h:1319
lldb_private::Target::IgnoreWatchpointByID
bool IgnoreWatchpointByID(lldb::watch_id_t watch_id, uint32_t ignore_count)
Definition: Target.cpp:1332
lldb_private::EvaluateExpressionOptions::m_result_is_internal
bool m_result_is_internal
Definition: Target.h:434
lldb_private::Target::Arch::Arch
Arch(const ArchSpec &spec)
Definition: Target.cpp:72
lldb_private::Properties
Definition: UserSettingsController.h:33
lldb_private::Target::GetStopHookByID
StopHookSP GetStopHookByID(lldb::user_id_t uid)
Definition: Target.cpp:2574
lldb_private::Target::StopHook::GetSubclassDescription
virtual void GetSubclassDescription(Stream *s, lldb::DescriptionLevel level) const =0
lldb_private::Target::GetPlatform
lldb::PlatformSP GetPlatform()
Definition: Target.h:1345
lldb_private::EvaluateExpressionOptions::GetUseDynamic
lldb::DynamicValueType GetUseDynamic() const
Definition: Target.h:321
BreakpointList.h
lldb_private::Target::m_next_persistent_variable_index
unsigned m_next_persistent_variable_index
Definition: Target.h:1446
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private::Target::GetLastCreatedBreakpoint
lldb::BreakpointSP GetLastCreatedBreakpoint()
Definition: Target.h:614
lldb_private::TargetProperties::SetPreferDynamicValue
bool SetPreferDynamicValue(lldb::DynamicValueType d)
Definition: Target.cpp:3855
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::EvaluateExpressionOptions::m_execution_policy
ExecutionPolicy m_execution_policy
Definition: Target.h:420
lldb_private::Target::GetSearchFilterForModule
lldb::SearchFilterSP GetSearchFilterForModule(const FileSpec *containingModule)
Definition: Target.cpp:508
lldb_private::TargetProperties::DisableASLRValueChangedCallback
void DisableASLRValueChangedCallback()
Definition: Target.cpp:4386
lldb_private::TargetProperties::GetPreferDynamicValue
lldb::DynamicValueType GetPreferDynamicValue() const
Definition: Target.cpp:3848
lldb_private::TargetProperties::GetArg0
llvm::StringRef GetArg0() const
Definition: Target.cpp:3932
lldb_private::Target::GetStopHookAtIndex
StopHookSP GetStopHookAtIndex(size_t index)
Definition: Target.h:1333
lldb_private::TargetExperimentalProperties
Definition: Target.h:72
lldb_private::Target::ReadUnsignedIntegerFromMemory
uint64_t ReadUnsignedIntegerFromMemory(const Address &addr, size_t integer_byte_size, uint64_t fail_value, Status &error, bool force_live_memory=false)
Definition: Target.cpp:1938
lldb_private::TargetProperties::GetDisplayRecognizedArguments
bool GetDisplayRecognizedArguments() const
Definition: Target.cpp:4281
lldb_private::eInlineBreakpointsNever
@ eInlineBreakpointsNever
Definition: Target.h:43
lldb_private::eImportStdModuleFalse
@ eImportStdModuleFalse
Definition: Target.h:67
ModuleList.h
LLDBAssert.h
lldb_private::TargetProperties
Definition: Target.h:77
lldb_private::Target::m_arch
Arch m_arch
Definition: Target.h:1413
lldb_private::Target::m_images
ModuleList m_images
The list of images for this process (shared libraries and anything dynamically loaded).
Definition: Target.h:1414
lldb_private::TargetProperties::GetSkipPrologue
bool GetSkipPrologue() const
Definition: Target.cpp:4033
lldb_private::Target::CreateSourceRegexBreakpoint
lldb::BreakpointSP CreateSourceRegexBreakpoint(const FileSpecList *containingModules, const FileSpecList *source_file_list, const std::unordered_set< std::string > &function_names, RegularExpression source_regex, bool internal, bool request_hardware, LazyBool move_to_nearest_code)
Definition: Target.cpp:314
lldb_private::ProcessLaunchInfo
Definition: ProcessLaunchInfo.h:31
lldb_private::ModuleList
Definition: ModuleList.h:72
lldb_private::TargetProperties::DetachOnErrorValueChangedCallback
void DetachOnErrorValueChangedCallback()
Definition: Target.cpp:4379
lldb_private::EvaluateExpressionOptions::default_execution_policy
static constexpr ExecutionPolicy default_execution_policy
Definition: Target.h:277
lldb_private::SymbolContextSpecifier
Definition: SymbolContext.h:328
lldb_private::Target::CreateBreakpointsFromFile
Status CreateBreakpointsFromFile(const FileSpec &file, BreakpointIDList &new_bps)
Definition: Target.cpp:1083
lldb_private::ExecutionContextScope
Definition: ExecutionContextScope.h:32
lldb_private::Target::RemoveAllStopHooks
void RemoveAllStopHooks()
Definition: Target.cpp:2572
lldb_private::Target::GetBroadcasterClass
ConstString & GetBroadcasterClass() const override
This needs to be filled in if you are going to register the broadcaster with the broadcaster manager ...
Definition: Target.h:476
lldb_private::Target::GetAPIMutex
std::recursive_mutex & GetAPIMutex()
Definition: Target.cpp:4471
lldb_private::TargetProperties::GetDetachOnError
bool GetDetachOnError() const
Definition: Target.cpp:3893
lldb_private::Target::GetLastCreatedWatchpoint
lldb::WatchpointSP GetLastCreatedWatchpoint()
Definition: Target.h:720
lldb_private::eLoadDependentsNo
@ eLoadDependentsNo
Definition: Target.h:63
lldb_private::TargetProperties::SetRunArguments
void SetRunArguments(const Args &args)
Definition: Target.cpp:3949
lldb_private::Target::SetSectionLoadAddress
bool SetSectionLoadAddress(const lldb::SectionSP &section, lldb::addr_t load_addr, bool warn_multiple=false)
Definition: Target.cpp:2837
ThreadSpec.h
lldb_private::Target::EnableAllBreakpoints
void EnableAllBreakpoints(bool internal_also=false)
Definition: Target.cpp:917
lldb_private::TargetProperties::GetInlineStrategy
InlineStrategy GetInlineStrategy() const
Definition: Target.cpp:3926
lldb_private::Target::StopHook::GetThreadSpecifier
ThreadSpec * GetThreadSpecifier()
Definition: Target.h:1219
lldb_private::Target::Arch::GetPlugin
Architecture * GetPlugin() const
Definition: Target.h:1396
lldb_private::EvaluateExpressionOptions::m_cancel_callback_baton
void * m_cancel_callback_baton
Definition: Target.h:445
lldb_private::Target::StopHookCommandLine::~StopHookCommandLine
virtual ~StopHookCommandLine()=default
lldb_private::Target::eBroadcastBitSymbolsLoaded
@ eBroadcastBitSymbolsLoaded
Definition: Target.h:469
lldb_private::StructuredData::ObjectSP
std::shared_ptr< Object > ObjectSP
Definition: StructuredData.h:59
lldb_private::Target::m_stats_storage
std::vector< uint32_t > m_stats_storage
Definition: Target.h:1458
lldb_private::Target::StopHookCommandLine
Definition: Target.h:1245
lldb_private::Target::m_image_search_paths
PathMappingList m_image_search_paths
Definition: Target.h:1430
lldb_private::TargetProperties::RunArgsValueChangedCallback
void RunArgsValueChangedCallback()
Definition: Target.cpp:4354
lldb_private::TargetProperties::UpdateLaunchInfoFromProperties
void UpdateLaunchInfoFromProperties()
Definition: Target.cpp:3790
lldb_private::Target::ClearAllLoadedSections
void ClearAllLoadedSections()
Definition: Target.cpp:2908
lldb_private::Target::EnableAllowedBreakpoints
void EnableAllowedBreakpoints()
Definition: Target.cpp:927
lldb_private::EvaluateExpressionOptions::m_try_others
bool m_try_others
Definition: Target.h:427
lldb_private::EvaluateExpressionOptions::m_retries_with_fixits
uint64_t m_retries_with_fixits
Definition: Target.h:436
lldb_private::TypeSystemMap
Definition: TypeSystem.h:501
lldb_private::Target::GetBreakableLoadAddress
lldb::addr_t GetBreakableLoadAddress(lldb::addr_t addr)
Definition: Target.cpp:2534
lldb_private::EvaluateExpressionOptions::m_coerce_to_id
bool m_coerce_to_id
Definition: Target.h:423
lldb_private::Target::ResolveFileAddress
bool ResolveFileAddress(lldb::addr_t load_addr, Address &so_addr)
Definition: Target.cpp:2832
lldb_private::TargetProperties::SetStandardOutputPath
void SetStandardOutputPath(llvm::StringRef path)
Definition: Target.cpp:4165
lldb_private::Target::CleanupProcess
void CleanupProcess()
Definition: Target.cpp:173
lldb_private::Target::TargetEventData::~TargetEventData
~TargetEventData() override
lldb::break_id_t
int32_t break_id_t
Definition: lldb-types.h:88
lldb_private::Target::CreateUtilityFunction
llvm::Expected< std::unique_ptr< UtilityFunction > > CreateUtilityFunction(std::string expression, std::string name, lldb::LanguageType language, ExecutionContext &exe_ctx)
Creates and installs a UtilityFunction for the given language.
Definition: Target.cpp:2319
lldb_private::Target::SetSuppresStopHooks
bool SetSuppresStopHooks(bool suppress)
Definition: Target.h:1313
lldb_private::BreakpointName::Permissions
Definition: BreakpointName.h:32
lldb_private::Target::m_process_sp
lldb::ProcessSP m_process_sp
Definition: Target.h:1428
lldb_private::Target::RunStopHooks
bool RunStopHooks()
Definition: Target.cpp:2602
lldb_private::StringList
Definition: StringList.h:25
lldb_private::Target::DeleteCurrentProcess
void DeleteCurrentProcess()
Definition: Target.cpp:188
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::Target::StopHook::StopHookKind::CommandBased
@ CommandBased
lldb_private::Target::StopHook::StopHookResult::AlreadyContinued
@ AlreadyContinued
lldb_private::TargetProperties::SetStandardErrorPath
void SetStandardErrorPath(llvm::StringRef path)
Definition: Target.cpp:4175
lldb_private::Target::CreateAddressInModuleBreakpoint
lldb::BreakpointSP CreateAddressInModuleBreakpoint(lldb::addr_t file_addr, bool internal, const FileSpec *file_spec, bool request_hardware)
Definition: Target.cpp:417
lldb_private::BreakpointOptions
Definition: BreakpointOptions.h:27
lldb_private::Target::GetCallableLoadAddress
lldb::addr_t GetCallableLoadAddress(lldb::addr_t load_addr, AddressClass addr_class=AddressClass::eInvalid) const
Get load_addr as a callable code load address for this target.
Definition: Target.cpp:2519
lldb_private::Target::DisableAllWatchpoints
bool DisableAllWatchpoints(bool end_to_end=true)
Definition: Target.cpp:1179
lldb_private::Target::GetImages
ModuleList & GetImages()
Definition: Target.h:930
lldb_private::EvaluateExpressionOptions::SetColorizeErrors
void SetColorizeErrors(bool b)
Definition: Target.h:362
lldb_private::EvaluateExpressionOptions::m_ansi_color_errors
bool m_ansi_color_errors
Definition: Target.h:433
lldb_private::Target::m_is_dummy_target
bool m_is_dummy_target
Used to not run stop hooks for expressions.
Definition: Target.h:1445
lldb_private::Target::AddNameToBreakpoint
void AddNameToBreakpoint(BreakpointID &id, const char *name, Status &error)
Definition: Target.cpp:669
lldb_private::Target::NotifyModuleUpdated
void NotifyModuleUpdated(const ModuleList &module_list, const lldb::ModuleSP &old_module_sp, const lldb::ModuleSP &new_module_sp) override
Definition: Target.cpp:1597
lldb_private::Target::Dump
void Dump(Stream *s, lldb::DescriptionLevel description_level)
Dump a description of this object to a Stream.
Definition: Target.cpp:154
lldb_private::EvaluateExpressionOptions::SetTryAllThreads
void SetTryAllThreads(bool try_others=true)
Definition: Target.h:342
lldb_private::EvaluateExpressionOptions::m_keep_in_memory
bool m_keep_in_memory
Definition: Target.h:426
lldb_private::StructuredDataImpl
Definition: StructuredDataImpl.h:26
lldb_private::TargetProperties::GetRunArguments
bool GetRunArguments(Args &args) const
Definition: Target.cpp:3944
lldb_private::Target::m_last_created_watchpoint
lldb::WatchpointSP m_last_created_watchpoint
Definition: Target.h:1424
lldb_private::Target::m_internal_breakpoint_list
BreakpointList m_internal_breakpoint_list
Definition: Target.h:1418
lldb_private::Target::StopHookSP
std::shared_ptr< StopHook > StopHookSP
Definition: Target.h:1297
lldb_private::Target::NotifyModuleAdded
void NotifyModuleAdded(const ModuleList &module_list, const lldb::ModuleSP &module_sp) override
Implementing of ModuleList::Notifier.
Definition: Target.cpp:1577
lldb_private::Target::ApplyNameToBreakpoints
void ApplyNameToBreakpoints(BreakpointName &bp_name)
Definition: Target.cpp:745
lldb::ExpressionEvaluationPhase
ExpressionEvaluationPhase
Expression Evaluation Stages.
Definition: lldb-enumerations.h:955
lldb_private::TargetProperties::Arg0ValueChangedCallback
void Arg0ValueChangedCallback()
Definition: Target.cpp:4350
lldb_private::StatisticKind
StatisticKind
Definition: lldb-private-enumerations.h:217
lldb_private::Target::StopHook::StopHookResult::KeepStopped
@ KeepStopped
lldb_private::Target::SetArchitecture
bool SetArchitecture(const ArchSpec &arch_spec, bool set_platform=false)
Set the architecture for this target.
Definition: Target.cpp:1462
lldb_private::Target::StopHookCollection
std::map< lldb::user_id_t, StopHookSP > StopHookCollection
Definition: Target.h:1438
lldb_private::TargetProperties::GetMoveToNearestCode
bool GetMoveToNearestCode() const
Definition: Target.cpp:3842
lldb::DynamicValueType
DynamicValueType
Definition: lldb-enumerations.h:494
lldb_private::TargetProperties::GetExpressionPrefixContents
llvm::StringRef GetExpressionPrefixContents()
Definition: Target.cpp:4189
lldb_private::Debugger
Definition: Debugger.h:70
lldb_private::eLoadCWDlldbinitWarn
@ eLoadCWDlldbinitWarn
Definition: Target.h:57
lldb_private::SectionLoadList
Definition: SectionLoadList.h:22
lldb_private::Target::eBroadcastBitModulesLoaded
@ eBroadcastBitModulesLoaded
Definition: Target.h:466
lldb_private::TargetProperties::InheritTCCValueChangedCallback
void InheritTCCValueChangedCallback()
Definition: Target.cpp:4393
lldb_private::Target::DisableAllowedBreakpoints
void DisableAllowedBreakpoints()
Definition: Target.cpp:910
lldb_private::Target::CreateTrace
llvm::Expected< lldb::TraceSP > CreateTrace()
Create a Trace object for the current target using the using the default supported tracing technology...
Definition: Target.cpp:3090
lldb_private::Target::GetPersistentExpressionStateForLanguage
PersistentExpressionState * GetPersistentExpressionStateForLanguage(lldb::LanguageType language)
Definition: Target.cpp:2257
lldb_private::Target::ProcessIsValid
bool ProcessIsValid()
Definition: Target.cpp:768
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb::watch_id_t
int32_t watch_id_t
Definition: lldb-types.h:89
lldb_private::eLoadCWDlldbinitTrue
@ eLoadCWDlldbinitTrue
Definition: Target.h:55
lldb_private::TargetProperties::EnvVarsValueChangedCallback
void EnvVarsValueChangedCallback()
Definition: Target.cpp:4360
lldb_private::EvaluateExpressionOptions::SetUnwindOnError
void SetUnwindOnError(bool unwind=false)
Definition: Target.h:309
lldb_private::EvaluateExpressionOptions::SetKeepInMemory
void SetKeepInMemory(bool keep=true)
Definition: Target.h:319
lldb_private::Target::CreateWatchpoint
lldb::WatchpointSP CreateWatchpoint(lldb::addr_t addr, size_t size, const CompilerType *type, uint32_t kind, Status &error)
Definition: Target.cpp:793
TypeSystem.h
lldb_private::Target::m_breakpoint_names
BreakpointNameList m_breakpoint_names
Definition: Target.h:1420
lldb_private::Target::SetTrace
void SetTrace(const lldb::TraceSP &trace_sp)
Set the Trace object containing processor trace information of this target.
Definition: Target.cpp:3086
lldb_private::EvaluateExpressionOptions::IsForUtilityExpr
bool IsForUtilityExpr() const
Definition: Target.h:415
lldb_private::TargetProperties::SetInjectLocalVariables
void SetInjectLocalVariables(ExecutionContext *exe_ctx, bool b)
Definition: Target.cpp:3816
lldb_private::Target::GetOpcodeLoadAddress
lldb::addr_t GetOpcodeLoadAddress(lldb::addr_t load_addr, AddressClass addr_class=AddressClass::eInvalid) const
Get load_addr as an opcode for this target.
Definition: Target.cpp:2527
lldb_private::TargetProperties::ErrorPathValueChangedCallback
void ErrorPathValueChangedCallback()
Definition: Target.cpp:4374
lldb_private::TargetProperties::GetDisplayRuntimeSupportValues
bool GetDisplayRuntimeSupportValues() const
Definition: Target.cpp:4271
lldb_private::ThreadSpec
Definition: ThreadSpec.h:33
lldb_private::TargetProperties::SetProcessLaunchInfo
void SetProcessLaunchInfo(const ProcessLaunchInfo &launch_info)
Definition: Target.cpp:4305
lldb_private::Target::m_mutex
std::recursive_mutex m_mutex
An API mutex that is used by the lldb::SB* classes make the SB interface thread safe.
Definition: Target.h:1405
lldb_private::EvaluateExpressionOptions::m_running_utility_expression
bool m_running_utility_expression
True if the executed code should be treated as utility code that is only used by LLDB internally.
Definition: Target.h:439
lldb_private::TargetProperties::GetEnableAutoApplyFixIts
bool GetEnableAutoApplyFixIts() const
Definition: Target.cpp:4096
lldb_private::SectionLoadHistory
Definition: SectionLoadHistory.h:19
lldb_private::ProcessAttachInfo
Definition: Process.h:115
lldb_private::Target::m_breakpoint_list
BreakpointList m_breakpoint_list
Definition: Target.h:1417
lldb_private::Target::SetExecutableModule
void SetExecutableModule(lldb::ModuleSP &module_sp, LoadDependentFiles load_dependent_files=eLoadDependentsDefault)
Set the main executable module.
Definition: Target.cpp:1397
lldb_private::TargetProperties::GetProcessLaunchInfo
const ProcessLaunchInfo & GetProcessLaunchInfo() const
Definition: Target.cpp:4301
lldb_private::Target::TargetEventData::m_module_list
ModuleList m_module_list
Definition: Target.h:511
lldb_private::eLoadDependentsYes
@ eLoadDependentsYes
Definition: Target.h:62
lldb_private::TargetProperties::GetDebugFileSearchPaths
FileSpecList GetDebugFileSearchPaths()
Definition: Target.cpp:4066
lldb_private::EvaluateExpressionOptions::SetIgnoreBreakpoints
void SetIgnoreBreakpoints(bool ignore=false)
Definition: Target.h:313
lldb_private::TargetExperimentalProperties::TargetExperimentalProperties
TargetExperimentalProperties()
Definition: Target.cpp:3723
lldb_private::Target::GetStaticBroadcasterClass
static ConstString & GetStaticBroadcasterClass()
Definition: Target.cpp:82
lldb_private::Target::Attach
Status Attach(ProcessAttachInfo &attach_info, Stream *stream)
Definition: Target.cpp:3121
lldb_private::Target::SettingsTerminate
static void SettingsTerminate()
Definition: Target.cpp:2345
lldb_private::Target::GetProcessSP
const lldb::ProcessSP & GetProcessSP() const
Definition: Target.cpp:214
lldbassert
#define lldbassert(x)
Definition: LLDBAssert.h:15
lldb_private::TargetProperties::GetDebugUtilityExpression
bool GetDebugUtilityExpression() const
Definition: Target.cpp:4407
lldb_private::Target::DisableWatchpointByID
bool DisableWatchpointByID(lldb::watch_id_t watch_id)
Definition: Target.cpp:1278
lldb_private::Target::Launch
Status Launch(ProcessLaunchInfo &launch_info, Stream *stream)
Definition: Target.cpp:2910
lldb_private::Target::GetTraceOrCreate
llvm::Expected< lldb::TraceSP > GetTraceOrCreate()
If a Trace object is present, this returns it, otherwise a new Trace is created with Trace::CreateTra...
Definition: Target.cpp:3115
lldb_private::Target::GetArchitecturePlugin
Architecture * GetArchitecturePlugin() const
Definition: Target.h:1001
lldb_private::Target::m_collecting_stats
bool m_collecting_stats
Definition: Target.h:1459
lldb_private::Target::GetDefaultExecutableSearchPaths
static FileSpecList GetDefaultExecutableSearchPaths()
Definition: Target.cpp:2347
lldb_private::SectionLoadHistory::GetCurrentSectionLoadList
SectionLoadList & GetCurrentSectionLoadList()
Definition: SectionLoadHistory.cpp:95
lldb_private::Target::StopHook::SetSpecifier
void SetSpecifier(SymbolContextSpecifier *specifier)
Definition: Target.cpp:3296
lldb_private::ModuleSpec
Definition: ModuleSpec.h:26
lldb_private::Target::GetArchitecture
const ArchSpec & GetArchitecture() const
Definition: Target.h:970
lldb_private::Target::SetSectionUnloaded
bool SetSectionUnloaded(const lldb::SectionSP &section_sp)
Definition: Target.cpp:2886
lldb_private::EvaluateExpressionOptions::SetOneThreadTimeout
void SetOneThreadTimeout(const Timeout< std::micro > &timeout)
Definition: Target.h:336
lldb_private::Target::GetStopHookSize
size_t GetStopHookSize()
lldb_private::Status
Definition: Status.h:44
lldb_private::EvaluateExpressionOptions::m_trap_exceptions
bool m_trap_exceptions
Definition: Target.h:430
lldb_private::WatchpointList
Definition: WatchpointList.h:27
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
lldb_private::TargetProperties::GetEnvironment
Environment GetEnvironment() const
Definition: Target.cpp:3984
lldb_private::EvaluateExpressionOptions::GetLanguage
lldb::LanguageType GetLanguage() const
Definition: Target.h:288
lldb_private::Target::CreateStopHook
StopHookSP CreateStopHook(StopHook::StopHookKind kind)
Add an empty stop hook to the Target's stop hook list, and returns a shared pointer to it in new_hook...
Definition: Target.cpp:2545
lldb_private::Timeout< std::micro >
lldb_private::TargetProperties::GetLoadCWDlldbinitFile
LoadCWDlldbinitFile GetLoadCWDlldbinitFile() const
Definition: Target.cpp:4241
lldb_private::Target::GetDefaultArchitecture
static ArchSpec GetDefaultArchitecture()
Definition: Target.cpp:2361
lldb_private::Target::ReadMemory
size_t ReadMemory(const Address &addr, void *dst, size_t dst_len, Status &error, bool force_live_memory=false, lldb::addr_t *load_addr_ptr=nullptr)
Definition: Target.cpp:1721
lldb_private::Target::Install
Status Install(ProcessLaunchInfo *launch_info)
Definition: Target.cpp:2779
lldb_private::Target::IsValid
bool IsValid()
Definition: Target.h:598
lldb_private::Target::AddBreakpointName
void AddBreakpointName(BreakpointName *bp_name)
Definition: Target.cpp:695
lldb_private::EvaluateExpressionOptions::m_pound_line_line
uint32_t m_pound_line_line
Definition: Target.h:450
lldb_private::EvaluateExpressionOptions::m_use_dynamic
lldb::DynamicValueType m_use_dynamic
Definition: Target.h:441
lldb::eLanguageTypeUnknown
@ eLanguageTypeUnknown
Unknown or invalid language value.
Definition: lldb-enumerations.h:437
lldb_private::TargetProperties::GetEnableAutoImportClangModules
bool GetEnableAutoImportClangModules() const
Definition: Target.cpp:4084
lldb_private::Target::SetREPL
void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp)
Definition: Target.cpp:263
lldb_private::Target::GetREPL
lldb::REPLSP GetREPL(Status &err, lldb::LanguageType language, const char *repl_options, bool can_create)
Definition: Target.cpp:216
uint32_t
lldb_private::Target::ImageSearchPathsChanged
static void ImageSearchPathsChanged(const PathMappingList &path_list, void *baton)
Definition: Target.cpp:2193
lldb_private::Target::CalculateExecutionContext
void CalculateExecutionContext(ExecutionContext &exe_ctx) override
Reconstruct the object's execution context into sc.
Definition: Target.cpp:2184
lldb_private::EvaluateExpressionOptions::GetStopOthers
bool GetStopOthers() const
Definition: Target.h:344
lldb_private::EvaluateExpressionOptions::SetUseDynamic
void SetUseDynamic(lldb::DynamicValueType dynamic=lldb::eDynamicCanRunTarget)
Definition: Target.h:324
lldb_private::PathMappingList
Definition: PathMappingList.h:19
UserSettingsController.h
lldb_private::EvaluateExpressionOptions::SetCoerceToId
void SetCoerceToId(bool coerce=true)
Definition: Target.h:305
lldb_private::StatisticMax
@ StatisticMax
Definition: lldb-private-enumerations.h:222
lldb_private::Target::RemoveAllBreakpoints
void RemoveAllBreakpoints(bool internal_also=false)
Definition: Target.cpp:888
lldb_private::TargetProperties::m_target
Target * m_target
Definition: Target.h:259
lldb_private::Address
Definition: Address.h:59
lldb_private::Target::GetPersistentSymbol
lldb::addr_t GetPersistentSymbol(ConstString name)
Definition: Target.cpp:2467
lldb_private::Target::ModulesDidLoad
void ModulesDidLoad(ModuleList &module_list)
Definition: Target.cpp:1613
lldb_private::eInlineBreakpointsAlways
@ eInlineBreakpointsAlways
Definition: Target.h:45
lldb_private::TargetProperties::AppendExecutableSearchPaths
void AppendExecutableSearchPaths(const FileSpec &)
Definition: Target.cpp:4048
lldb_private::Target::EvaluateExpression
lldb::ExpressionResults EvaluateExpression(llvm::StringRef expression, ExecutionContextScope *exe_scope, lldb::ValueObjectSP &result_valobj_sp, const EvaluateExpressionOptions &options=EvaluateExpressionOptions(), std::string *fixed_expression=nullptr, ValueObject *ctx_obj=nullptr)
Definition: Target.cpp:2393
lldb_private::Target::StopHook
Definition: Target.h:1186
lldb_private::EvaluateExpressionOptions::m_prefix
std::string m_prefix
Definition: Target.h:422
lldb_private::TargetProperties::GetImportStdModule
ImportStdModule GetImportStdModule() const
Definition: Target.cpp:4090
lldb_private::BreakpointID
Definition: BreakpointID.h:22
lldb_private::TargetProperties::GetHexImmediateStyle
Disassembler::HexImmediateStyle GetHexImmediateStyle() const
Definition: Target.cpp:4247
lldb_private::TargetProperties::m_launch_info
ProcessLaunchInfo m_launch_info
Definition: Target.h:257
lldb_private::SectionLoadHistory::eStopIDNow
@ eStopIDNow
Definition: SectionLoadHistory.h:24
lldb_private::Target::GetStatistics
std::vector< uint32_t > GetStatistics()
Definition: Target.h:1474
lldb_private::EvaluateExpressionOptions::m_debug
bool m_debug
Definition: Target.h:429
lldb_private::Target::GetSearchFilterForModuleAndCUList
lldb::SearchFilterSP GetSearchFilterForModuleAndCUList(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles)
Definition: Target.cpp:543
lldb_private::Target::m_stop_hooks
StopHookCollection m_stop_hooks
Definition: Target.h:1439
lldb_private::Disassembler::HexImmediateStyle
HexImmediateStyle
Definition: Disassembler.h:381
lldb_private::Target::eBroadcastBitBreakpointChanged
@ eBroadcastBitBreakpointChanged
Definition: Target.h:465
ExecutionContextScope.h
lldb_private::EvaluateExpressionOptions::m_language
lldb::LanguageType m_language
Definition: Target.h:421
lldb_private::Target::TargetEventData::operator=
const TargetEventData & operator=(const TargetEventData &)=delete
lldb_private::Target::StopHook::IsActive
bool IsActive()
Definition: Target.h:1221
lldb_private::Target::StopHookScripted::StopHookScripted
StopHookScripted(lldb::TargetSP target_sp, lldb::user_id_t uid)
Use CreateStopHook to make a new empty stop hook.
Definition: Target.h:1292
lldb_private::Target::GetSearchFilterForModuleList
lldb::SearchFilterSP GetSearchFilterForModuleList(const FileSpecList *containingModuleList)
Definition: Target.cpp:526
lldb_private::Target::TargetEventData::GetModuleList
const ModuleList & GetModuleList() const
Definition: Target.h:507
ArchSpec.h
lldb_private::Target::IsDummyTarget
bool IsDummyTarget() const
Definition: Target.h:531
lldb_private::Target::ClearAllWatchpointHitCounts
bool ClearAllWatchpointHitCounts()
Definition: Target.cpp:1232
lldb_private::TargetProperties::GetBreakpointsConsultPlatformAvoidList
bool GetBreakpointsConsultPlatformAvoidList()
Definition: Target.cpp:4210
lldb_private::Environment
Definition: Environment.h:18
lldb_private::EvaluateExpressionOptions::GetTryAllThreads
bool GetTryAllThreads() const
Definition: Target.h:340
Timeout.h
lldb_private::eLoadCWDlldbinitFalse
@ eLoadCWDlldbinitFalse
Definition: Target.h:56
lldb_private::EvaluateExpressionOptions::SetGenerateDebugInfo
void SetGenerateDebugInfo(bool b)
Definition: Target.h:358
lldb_private::Target::StopHookScripted::m_implementation_sp
StructuredData::GenericSP m_implementation_sp
This holds the python callback object.
Definition: Target.h:1287
lldb_private::Target::StopHook::ExecutionContextPasses
bool ExecutionContextPasses(const ExecutionContext &exe_ctx)
Definition: Target.cpp:3304
lldb_private::Target::m_stop_hook_next_id
lldb::user_id_t m_stop_hook_next_id
Definition: Target.h:1440
lldb_private::Target::GetScratchTypeSystems
std::vector< TypeSystem * > GetScratchTypeSystems(bool create_on_demand=true)
Definition: Target.cpp:2230
lldb_private::TargetProperties::GetUseFastStepping
bool GetUseFastStepping() const
Definition: Target.cpp:4222
lldb_private::EvaluateExpressionOptions::DoesUnwindOnError
bool DoesUnwindOnError() const
Definition: Target.h:307
lldb_private::Target::SetAllStopHooksActiveState
void SetAllStopHooksActiveState(bool active_state)
Definition: Target.cpp:2595
SectionLoadHistory.h
lldb_private::TargetProperties::GetUserSpecifiedTrapHandlerNames
bool GetUserSpecifiedTrapHandlerNames(Args &args) const
Definition: Target.cpp:4261
lldb_private::TargetProperties::GetStandardOutputPath
FileSpec GetStandardOutputPath() const
Definition: Target.cpp:4160
lldb_private::Target::StopHookScripted::HandleStop
StopHookResult HandleStop(ExecutionContext &exc_ctx, lldb::StreamSP output) override
Definition: Target.cpp:3451
lldb_private::Target::RemoveBreakpointByID
bool RemoveBreakpointByID(lldb::break_id_t break_id)
Definition: Target.cpp:934
lldb_private::Target::TargetEventData::Dump
void Dump(Stream *s) const override
Definition: Target.cpp:4434
lldb_private::Target::GetSectionLoadList
SectionLoadList & GetSectionLoadList()
Definition: Target.h:1043
lldb_private::Target::SetCollectingStats
void SetCollectingStats(bool v)
Definition: Target.h:1462
lldb_private::Target::UndoCreateStopHook
void UndoCreateStopHook(lldb::user_id_t uid)
If you tried to create a stop hook, and that failed, call this to remove the stop hook,...
Definition: Target.cpp:2560
lldb_private::Target::Arch::m_plugin_up
std::unique_ptr< Architecture > m_plugin_up
Definition: Target.h:1400
lldb_private::eExecutionPolicyOnlyWhenNeeded
@ eExecutionPolicyOnlyWhenNeeded
Definition: lldb-private-enumerations.h:145
lldb_private::TargetProperties::GetUseHexImmediates
bool GetUseHexImmediates() const
Definition: Target.cpp:4216
lldb_private::TargetProperties::SetInheritTCC
void SetInheritTCC(bool b)
Definition: Target.cpp:3888
lldb_private::eInlineBreakpointsHeaders
@ eInlineBreakpointsHeaders
Definition: Target.h:44
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
lldb_private::Target::StopHook::~StopHook
virtual ~StopHook()=default
lldb_private::EvaluateExpressionOptions::m_ignore_breakpoints
bool m_ignore_breakpoints
Definition: Target.h:425
lldb_private::Target::GetUserExpressionForLanguage
UserExpression * GetUserExpressionForLanguage(llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options, ValueObject *ctx_obj, Status &error)
Definition: Target.cpp:2271
lldb_private::Target::RemoveWatchpointByID
bool RemoveWatchpointByID(lldb::watch_id_t watch_id)
Definition: Target.cpp:1316
lldb_private::TargetProperties::SetUserSpecifiedTrapHandlerNames
void SetUserSpecifiedTrapHandlerNames(const Args &args)
Definition: Target.cpp:4266
lldb_private::TargetProperties::GetNumberOfRetriesWithFixits
uint64_t GetNumberOfRetriesWithFixits() const
Definition: Target.cpp:4102
lldb::user_id_t
uint64_t user_id_t
Definition: lldb-types.h:84
lldb_private::PersistentExpressionState
Definition: ExpressionVariable.h:203
lldb_private::Target::TargetEventData::TargetEventData
TargetEventData(const lldb::TargetSP &target_sp)
Definition: Target.cpp:4420
lldb_private::Target::TargetEventData::GetFlavor
ConstString GetFlavor() const override
Definition: Target.h:493
lldb_private::Target::StopHook::StopHookResult
StopHookResult
Definition: Target.h:1192
lldb_private::Target::CalculateTarget
lldb::TargetSP CalculateTarget() override
Definition: Target.cpp:2176
lldb_private::EvaluateExpressionOptions::GetExecutionPolicy
ExecutionPolicy GetExecutionPolicy() const
Definition: Target.h:282
lldb_private::Target::ReadCStringFromMemory
size_t ReadCStringFromMemory(const Address &addr, std::string &out_str, Status &error)
Definition: Target.cpp:1834
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::EvaluateExpressionOptions::GetTrapExceptions
bool GetTrapExceptions() const
Definition: Target.h:364
lldb_private::TargetProperties::GetLanguage
lldb::LanguageType GetLanguage() const
Definition: Target.cpp:4180
lldb_private::Target::NotifyModuleRemoved
void NotifyModuleRemoved(const ModuleList &module_list, const lldb::ModuleSP &module_sp) override
Definition: Target.cpp:1587
lldb_private::TargetProperties::GetMaxZeroPaddingInFloatFormat
uint32_t GetMaxZeroPaddingInFloatFormat() const
Definition: Target.cpp:4126
lldb_private::EvaluateExpressionOptions::GetResultIsInternal
bool GetResultIsInternal() const
Definition: Target.h:403
lldb_private::Target::Arch::GetSpec
const ArchSpec & GetSpec() const
Definition: Target.h:1395
lldb_private::Target::ReadScalarIntegerFromMemory
size_t ReadScalarIntegerFromMemory(const Address &addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Status &error, bool force_live_memory=false)
Definition: Target.cpp:1909
lldb_private::TargetProperties::GetMaximumMemReadSize
uint32_t GetMaximumMemReadSize() const
Definition: Target.cpp:4144
lldb::eDynamicCanRunTarget
@ eDynamicCanRunTarget
Definition: lldb-enumerations.h:496
lldb_private::TargetProperties::GetEnableNotifyAboutFixIts
bool GetEnableNotifyAboutFixIts() const
Definition: Target.cpp:4108
lldb_private::Target::StopHookCommandLine::GetCommands
StringList & GetCommands()
Definition: Target.h:1249
lldb_private::Target::Arch
Definition: Target.h:1390
lldb_private::Target::eBroadcastBitWatchpointChanged
@ eBroadcastBitWatchpointChanged
Definition: Target.h:468
lldb_private::Target::GetTrace
lldb::TraceSP GetTrace()
Get the Trace object containing processor trace information of this target.
Definition: Target.cpp:3088
lldb_private::Target::m_search_filter_sp
lldb::SearchFilterSP m_search_filter_sp
Definition: Target.h:1429
lldb_private::EvaluateExpressionOptions::InvokeCancelCallback
bool InvokeCancelCallback(lldb::ExpressionEvaluationPhase phase) const
Definition: Target.h:377
lldb_private::EvaluateExpressionOptions::SetDebug
void SetDebug(bool b)
Definition: Target.h:350
lldb_private::Target::LoadScriptingResources
bool LoadScriptingResources(std::list< Status > &errors, Stream *feedback_stream=nullptr, bool continue_on_error=true)
Definition: Target.h:904
lldb_private::Target::TargetEventData::m_target_sp
lldb::TargetSP m_target_sp
Definition: Target.h:510
lldb_private::Target::StopHook::GetSpecifier
SymbolContextSpecifier * GetSpecifier()
Definition: Target.h:1204
lldb_private::Target::TargetEventData::GetModuleListFromEvent
static ModuleList GetModuleListFromEvent(const Event *event_ptr)
Definition: Target.cpp:4463
lldb_private::Target::NotifyModulesRemoved
void NotifyModulesRemoved(lldb_private::ModuleList &module_list) override
Definition: Target.cpp:1609
lldb_private::Target::IgnoreAllWatchpoints
bool IgnoreAllWatchpoints(uint32_t ignore_count)
Definition: Target.cpp:1261
lldb_private::Target::~Target
~Target() override
Definition: Target.cpp:126
lldb_private::TargetProperties::GetSourcePathMap
PathMappingList & GetSourcePathMap() const
Definition: Target.cpp:4039
lldb_private::TargetProperties::SetDefaultArchitecture
void SetDefaultArchitecture(const ArchSpec &arch)
Definition: Target.cpp:3835
lldb_private::Target::StopHook::SetIsActive
void SetIsActive(bool is_active)
Definition: Target.h:1223
lldb_private::TargetProperties::GetDisableASLR
bool GetDisableASLR() const
Definition: Target.cpp:3871
lldb_private::Target::StopHookScripted::m_extra_args
StructuredDataImpl * m_extra_args
This holds the dictionary of keys & values that can be used to parametrize any given callback's behav...
Definition: Target.h:1284
lldb_private::Target::CreateScriptedBreakpoint
lldb::BreakpointSP CreateScriptedBreakpoint(const llvm::StringRef class_name, const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, bool internal, bool request_hardware, StructuredData::ObjectSP extra_args_sp, Status *creation_error=nullptr)
Definition: Target.cpp:597
lldb_private::Target::GetDefaultDebugFileSearchPaths
static FileSpecList GetDefaultDebugFileSearchPaths()
Definition: Target.cpp:2354
lldb_private::Target::RemoveStopHookByID
bool RemoveStopHookByID(lldb::user_id_t uid)
Definition: Target.cpp:2567
lldb_private::EvaluateExpressionOptions::m_auto_apply_fixits
bool m_auto_apply_fixits
Definition: Target.h:435
lldb_private::EvaluateExpressionOptions::SetStopOthers
void SetStopOthers(bool stop_others=true)
Definition: Target.h:346
lldb_private::Target::GetBreakpointByID
lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id)
Definition: Target.cpp:303
lldb_private::Target::GetSourceManager
SourceManager & GetSourceManager()
Definition: Target.cpp:2539
lldb_private::Target::StopHook::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level) const
Definition: Target.cpp:3320
lldb_private::Target::ModulesDidUnload
void ModulesDidUnload(ModuleList &module_list, bool delete_locations)
Definition: Target.cpp:1645
lldb_private::Target::SetPlatform
void SetPlatform(const lldb::PlatformSP &platform_sp)
Definition: Target.h:1347
lldb_private::Target::EnableAllWatchpoints
bool EnableAllWatchpoints(bool end_to_end=true)
Definition: Target.cpp:1206
lldb_private::EvaluateExpressionOptions::m_timeout
Timeout< std::micro > m_timeout
Definition: Target.h:442
lldb_private::Target::SetDefaultArchitecture
static void SetDefaultArchitecture(const ArchSpec &arch)
Definition: Target.cpp:2368
lldb_private::TargetProperties::SetPreloadSymbols
void SetPreloadSymbols(bool b)
Definition: Target.cpp:3866
lldb_private::TargetProperties::TargetProperties
TargetProperties(Target *target)
Definition: Target.cpp:3730
lldb_private::Target::EnableBreakpointByID
bool EnableBreakpointByID(lldb::break_id_t break_id)
Definition: Target.cpp:972
lldb_private::Target::StopHookScripted::GetSubclassDescription
void GetSubclassDescription(Stream *s, lldb::DescriptionLevel level) const override
Definition: Target.cpp:3468
lldb_private::Target::TargetEventData
Definition: Target.h:482
Expression.h
lldb_private::EvaluateExpressionOptions::GetRetriesWithFixIts
uint64_t GetRetriesWithFixIts() const
Definition: Target.h:413
lldb_private::Target::CreateFuncRegexBreakpoint
lldb::BreakpointSP CreateFuncRegexBreakpoint(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, RegularExpression func_regexp, lldb::LanguageType requested_language, LazyBool skip_prologue, bool internal, bool request_hardware)
Definition: Target.cpp:563
lldb_private::GetDynamicValueTypes
OptionEnumValues GetDynamicValueTypes()
Definition: Target.cpp:3529
WatchpointList.h
lldb_private::Broadcaster
Definition: Broadcaster.h:242
lldb_private::LoadCWDlldbinitFile
LoadCWDlldbinitFile
Definition: Target.h:54
PathMappingList.h
lldb_private::ImportStdModule
ImportStdModule
Definition: Target.h:66
lldb_private::Target::StopHook::SetThreadSpecifier
void SetThreadSpecifier(ThreadSpec *specifier)
Definition: Target.cpp:3300
lldb_private::TargetProperties::GetDisassemblyFlavor
const char * GetDisassemblyFlavor() const
Definition: Target.cpp:3915
lldb_private::TargetProperties::GetDefaultArchitecture
ArchSpec GetDefaultArchitecture() const
Definition: Target.cpp:3827
lldb_private::Target::EnableWatchpointByID
bool EnableWatchpointByID(lldb::watch_id_t watch_id)
Definition: Target.cpp:1297
lldb_private::Target::SettingsInitialize
static void SettingsInitialize()
Definition: Target.cpp:2343
lldb_private::TargetProperties::GetClangModuleSearchPaths
FileSpecList GetClangModuleSearchPaths()
Definition: Target.cpp:4075
lldb_private::EvaluateExpressionOptions::SetPrefix
void SetPrefix(const char *prefix)
Definition: Target.h:298
lldb_private::TargetProperties::GetEnableSaveObjects
bool GetEnableSaveObjects() const
Definition: Target.cpp:4114
lldb_private::Target::Target
Target(Debugger &debugger, const ArchSpec &target_arch, const lldb::PlatformSP &platform_sp, bool is_dummy_target)
Construct with optional file and arch.
Definition: Target.cpp:87
lldb_private::Target::StopHookScripted::SetScriptCallback
Status SetScriptCallback(std::string class_name, StructuredData::ObjectSP extra_args_sp)
Definition: Target.cpp:3426
lldb_private::Target::FindBreakpointName
BreakpointName * FindBreakpointName(ConstString name, bool can_create, Status &error)
Definition: Target.cpp:699
lldb_private::Target::m_frame_recognizer_manager_up
lldb::StackFrameRecognizerManagerUP m_frame_recognizer_manager_up
Stores the frame recognizers of this target.
Definition: Target.h:1451
lldb_private::TargetProperties::GetAutoInstallMainExecutable
bool GetAutoInstallMainExecutable() const
Definition: Target.cpp:4344
lldb_private::Target::StopHookScripted::m_class_name
std::string m_class_name
Definition: Target.h:1281
lldb_private::EvaluateExpressionOptions::GetDebug
bool GetDebug() const
Definition: Target.h:348
lldb_private::Target::CalculateStackFrame
lldb::StackFrameSP CalculateStackFrame() override
Definition: Target.cpp:2182
lldb_private::Target::TargetEventData::GetTargetFromEvent
static lldb::TargetSP GetTargetFromEvent(const Event *event_ptr)
Definition: Target.cpp:4454
lldb_private::EvaluateExpressionOptions::GetPoundLineFilePath
const char * GetPoundLineFilePath() const
Definition: Target.h:395
lldb_private::Target::GetNumStopHooks
size_t GetNumStopHooks() const
Definition: Target.h:1331
lldb_private::BreakpointIDList
Definition: BreakpointIDList.h:25
lldb_private::EvaluateExpressionOptions::GetPoundLineLine
uint32_t GetPoundLineLine() const
Definition: Target.h:399
lldb_private::Target::m_section_load_history
SectionLoadHistory m_section_load_history
Definition: Target.h:1416
lldb_private::TargetProperties::GetInheritedEnvironment
Environment GetInheritedEnvironment() const
Definition: Target.cpp:3988
lldb_private::TargetProperties::GetExecutableSearchPaths
FileSpecList GetExecutableSearchPaths()
Definition: Target.cpp:4057
lldb_private::Target::IncrementStats
void IncrementStats(lldb_private::StatisticKind key)
Definition: Target.h:1466
lldb_private::TargetProperties::SetEnvironment
void SetEnvironment(Environment env)
Definition: Target.cpp:4027
lldb_private::TargetProperties::SetDetachOnError
void SetDetachOnError(bool b)
Definition: Target.cpp:3899
lldb_private::ModuleList::Notifier
Definition: ModuleList.h:74
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:207
lldb_private::Target::Arch::m_spec
ArchSpec m_spec
Definition: Target.h:1399
lldb_private::SourceManager
Definition: SourceManager.h:31
lldb_private::EvaluateExpressionOptions::GetOneThreadTimeout
const Timeout< std::micro > & GetOneThreadTimeout() const
Definition: Target.h:332
lldb_private::Target::RemoveAllWatchpoints
bool RemoveAllWatchpoints(bool end_to_end=true)
Definition: Target.cpp:1150
lldb_private::EvaluateExpressionOptions::m_pound_line_file
std::string m_pound_line_file
Definition: Target.h:449
lldb_private::EvaluateExpressionOptions::m_unwind_on_error
bool m_unwind_on_error
Definition: Target.h:424
lldb_private::InlineStrategy
InlineStrategy
Definition: Target.h:42
lldb_private::Target::RemoveAllowedBreakpoints
void RemoveAllowedBreakpoints()
Definition: Target.cpp:879
lldb_private::Target::StopHook::StopHookKind
StopHookKind
Definition: Target.h:1191
lldb_private::Target::MergeArchitecture
bool MergeArchitecture(const ArchSpec &arch_spec)
Definition: Target.cpp:1550
lldb_private::FunctionCaller
Definition: FunctionCaller.h:56
lldb_private::LoadScriptFromSymFile
LoadScriptFromSymFile
Definition: Target.h:48
lldb_private::Target::SetStopHookActiveStateByID
bool SetStopHookActiveStateByID(lldb::user_id_t uid, bool active_state)
Definition: Target.cpp:2584
lldb_private::Target::m_trace_sp
lldb::TraceSP m_trace_sp
An optional lldb_private::Trace object containing processor trace information of this target.
Definition: Target.h:1449
lldb_private::EvaluateExpressionOptions::SetAutoApplyFixIts
void SetAutoApplyFixIts(bool b)
Definition: Target.h:405
lldb_private::Target::ReadPointerFromMemory
bool ReadPointerFromMemory(const Address &addr, Status &error, Address &pointer_addr, bool force_live_memory=false)
Definition: Target.cpp:1949