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/Address.h"
42#include "lldb/Utility/Stream.h"
45#include "lldb/lldb-public.h"
46#include "llvm/ADT/MapVector.h"
47#include "llvm/ADT/StringRef.h"
48
49namespace lldb_private {
50
52
58
65
71
77
84
89
91public:
92 TargetProperties(Target *target);
93
95
97
98 void SetDefaultArchitecture(const ArchSpec &arch);
99
100 bool GetMoveToNearestCode() const;
101
103
105
106 bool GetPreloadSymbols() const;
107
108 void SetPreloadSymbols(bool b);
109
110 bool GetDisableASLR() const;
111
112 void SetDisableASLR(bool b);
113
114 bool GetInheritTCC() const;
115
116 void SetInheritTCC(bool b);
117
118 bool GetDetachOnError() const;
119
120 void SetDetachOnError(bool b);
121
122 bool GetDisableSTDIO() const;
123
124 void SetDisableSTDIO(bool b);
125
126 llvm::StringRef GetLaunchWorkingDirectory() const;
127
128 bool GetParallelModuleLoad() const;
129
130 const char *GetDisassemblyFlavor() const;
131
132 const char *GetDisassemblyCPU() const;
133
134 const char *GetDisassemblyFeatures() const;
135
137
139
140 llvm::StringRef GetArg0() const;
141
142 void SetArg0(llvm::StringRef arg);
143
144 bool GetRunArguments(Args &args) const;
145
146 void SetRunArguments(const Args &args);
147
148 // Get the whole environment including the platform inherited environment and
149 // the target specific environment, excluding the unset environment variables.
151 // Get the platform inherited environment, excluding the unset environment
152 // variables.
154 // Get the target specific environment only, without the platform inherited
155 // environment.
157 // Set the target specific environment.
158 void SetEnvironment(Environment env);
159
160 bool GetSkipPrologue() const;
161
163
165
166 bool GetAutoSourceMapRelative() const;
167
169
171
173
175
177
179
181
182 bool GetEnableAutoApplyFixIts() const;
183
184 uint64_t GetNumberOfRetriesWithFixits() const;
185
186 bool GetEnableNotifyAboutFixIts() const;
187
189
190 bool GetEnableSyntheticValue() const;
191
193
194 uint32_t GetMaxZeroPaddingInFloatFormat() const;
195
197
198 /// Get the max depth value, augmented with a bool to indicate whether the
199 /// depth is the default.
200 ///
201 /// When the user has customized the max depth, the bool will be false.
202 ///
203 /// \returns the max depth, and true if the max depth is the system default,
204 /// otherwise false.
205 std::pair<uint32_t, bool> GetMaximumDepthOfChildrenToDisplay() const;
206
207 uint32_t GetMaximumSizeOfStringSummary() const;
208
209 uint32_t GetMaximumMemReadSize() const;
210
214
215 void SetStandardInputPath(llvm::StringRef path);
216 void SetStandardOutputPath(llvm::StringRef path);
217 void SetStandardErrorPath(llvm::StringRef path);
218
219 void SetStandardInputPath(const char *path) = delete;
220 void SetStandardOutputPath(const char *path) = delete;
221 void SetStandardErrorPath(const char *path) = delete;
222
224
226
227 llvm::StringRef GetExpressionPrefixContents();
228
229 uint64_t GetExprErrorLimit() const;
230
231 uint64_t GetExprAllocAddress() const;
232
233 uint64_t GetExprAllocSize() const;
234
235 uint64_t GetExprAllocAlign() const;
236
237 bool GetUseHexImmediates() const;
238
239 bool GetUseFastStepping() const;
240
242
244
245 /// Set the target-wide target.load-script-from-symbol-file setting.
246 /// See \c SetAutoLoadScriptsForModule for overriding this setting
247 /// per-module.
249
251
253
255
256 bool GetUserSpecifiedTrapHandlerNames(Args &args) const;
257
258 void SetUserSpecifiedTrapHandlerNames(const Args &args);
259
261
263
265
267
269
270 void SetProcessLaunchInfo(const ProcessLaunchInfo &launch_info);
271
272 bool GetInjectLocalVariables(ExecutionContext *exe_ctx) const;
273
274 bool GetUseDIL(ExecutionContext *exe_ctx) const;
275
276 void SetUseDIL(ExecutionContext *exe_ctx, bool b);
277
279
281
282 bool GetAutoInstallMainExecutable() const;
283
285
286 void SetDebugUtilityExpression(bool debug);
287
288 bool GetDebugUtilityExpression() const;
289
290 void SetCheckValueObjectOwnership(bool check);
291
292 bool GetCheckValueObjectOwnership() const;
293
294 std::optional<LoadScriptFromSymFile>
295 GetAutoLoadScriptsForModule(llvm::StringRef module_name) const;
296
297 /// Set the \c LoadScriptFromSymFile for a module called \c module_name
298 /// (excluding file extension). LLDB will prefer this over the target-wide
299 /// target.load-script-from-symbol-file setting
300 /// (see \c SetLoadScriptFromSymbolFile).
301 void SetAutoLoadScriptsForModule(llvm::StringRef module_name,
302 LoadScriptFromSymFile load_style);
303
304private:
305 std::optional<bool>
306 GetExperimentalPropertyValue(size_t prop_idx,
307 ExecutionContext *exe_ctx = nullptr) const;
308
309 // Callbacks for m_launch_info.
320
321 // Settings checker for target.jit-save-objects-dir:
322 void CheckJITObjectsDir();
323
325
326 // Member variables.
328 std::unique_ptr<TargetExperimentalProperties> m_experimental_properties_up;
330};
331
333public:
335
336// MSVC has a bug here that reports C4268: 'const' static/global data
337// initialized with compiler generated default constructor fills the object
338// with zeros. Confirmed that MSVC is *not* zero-initializing, it's just a
339// bogus warning.
340#if defined(_MSC_VER)
341#pragma warning(push)
342#pragma warning(disable : 4268)
343#endif
344 static constexpr std::chrono::milliseconds default_timeout{500};
345#if defined(_MSC_VER)
346#pragma warning(pop)
347#endif
348
351
353
357
359
360 void SetLanguage(lldb::LanguageType language_type) {
361 m_language = SourceLanguage(language_type);
362 }
363
365 m_preferred_lookup_contexts = std::move(contexts);
366 }
367
371
372 /// Set the language using a pair of language code and version as
373 /// defined by the DWARF 6 specification.
374 /// WARNING: These codes may change until DWARF 6 is finalized.
375 void SetLanguage(uint16_t name, uint32_t version) {
376 m_language = SourceLanguage(name, version);
377 }
378
379 bool DoesCoerceToId() const { return m_coerce_to_id; }
380
381 const char *GetPrefix() const {
382 return (m_prefix.empty() ? nullptr : m_prefix.c_str());
383 }
384
385 void SetPrefix(const char *prefix) {
386 if (prefix && prefix[0])
387 m_prefix = prefix;
388 else
389 m_prefix.clear();
390 }
391
392 void SetCoerceToId(bool coerce = true) { m_coerce_to_id = coerce; }
393
394 bool DoesUnwindOnError() const { return m_unwind_on_error; }
395
396 void SetUnwindOnError(bool unwind = false) { m_unwind_on_error = unwind; }
397
399
400 void SetIgnoreBreakpoints(bool ignore = false) {
401 m_ignore_breakpoints = ignore;
402 }
403
404 bool DoesKeepInMemory() const { return m_keep_in_memory; }
405
406 void SetKeepInMemory(bool keep = true) { m_keep_in_memory = keep; }
407
409
410 void
414
415 const Timeout<std::micro> &GetTimeout() const { return m_timeout; }
416
417 void SetTimeout(const Timeout<std::micro> &timeout) { m_timeout = timeout; }
418
422
424 m_one_thread_timeout = timeout;
425 }
426
427 bool GetTryAllThreads() const { return m_try_others; }
428
429 void SetTryAllThreads(bool try_others = true) { m_try_others = try_others; }
430
431 bool GetStopOthers() const { return m_stop_others; }
432
433 void SetStopOthers(bool stop_others = true) { m_stop_others = stop_others; }
434
435 bool GetDebug() const { return m_debug; }
436
437 void SetDebug(bool b) {
438 m_debug = b;
439 if (m_debug)
441 }
442
444
446
447 bool GetColorizeErrors() const { return m_ansi_color_errors; }
448
450
451 bool GetTrapExceptions() const { return m_trap_exceptions; }
452
454
455 bool GetStopOnFork() const { return m_stop_on_fork; }
456
457 void SetStopOnFork(bool b) { m_stop_on_fork = b; }
458
459 bool GetREPLEnabled() const { return m_repl; }
460
461 void SetREPLEnabled(bool b) { m_repl = b; }
462
465 m_cancel_callback = callback;
466 }
467
469 return ((m_cancel_callback != nullptr)
471 : false);
472 }
473
474 // Allows the expression contents to be remapped to point to the specified
475 // file and line using #line directives.
476 void SetPoundLine(const char *path, uint32_t line) const {
477 if (path && path[0]) {
478 m_pound_line_file = path;
479 m_pound_line_line = line;
480 } else {
481 m_pound_line_file.clear();
483 }
484 }
485
486 const char *GetPoundLineFilePath() const {
487 return (m_pound_line_file.empty() ? nullptr : m_pound_line_file.c_str());
488 }
489
490 uint32_t GetPoundLineLine() const { return m_pound_line_line; }
491
493
497
499
501
502 void SetRetriesWithFixIts(uint64_t number_of_retries) {
503 m_retries_with_fixits = number_of_retries;
504 }
505
506 uint64_t GetRetriesWithFixIts() const { return m_retries_with_fixits; }
507
509
511
512 /// Set language-plugin specific option called \c option_name to
513 /// the specified boolean \c value.
514 llvm::Error SetBooleanLanguageOption(llvm::StringRef option_name, bool value);
515
516 /// Get the language-plugin specific boolean option called \c option_name.
517 ///
518 /// If the option doesn't exist or is not a boolean option, returns false.
519 /// Otherwise returns the boolean value of the option.
520 llvm::Expected<bool>
521 GetBooleanLanguageOption(llvm::StringRef option_name) const;
522
523 void SetCppIgnoreContextQualifiers(bool value);
524
526
527private:
529
531
534 std::string m_prefix;
535 bool m_coerce_to_id = false;
536 bool m_unwind_on_error = true;
538 bool m_keep_in_memory = false;
539 bool m_try_others = true;
540 bool m_stop_others = true;
541 bool m_debug = false;
542 bool m_trap_exceptions = true;
543 bool m_stop_on_fork = false;
544 bool m_repl = false;
550 /// True if the executed code should be treated as utility code that is only
551 /// used by LLDB internally.
553
558 void *m_cancel_callback_baton = nullptr;
559 // If m_pound_line_file is not empty and m_pound_line_line is non-zero, use
560 // #line %u "%s" before the expression content to remap where the source
561 // originates
562 mutable std::string m_pound_line_file;
563 mutable uint32_t m_pound_line_line = 0;
564
565 /// Dictionary mapping names of language-plugin specific options
566 /// to values.
568
569 /// During expression evaluation, any SymbolContext in this list will be
570 /// used for symbol/function lookup before any other context (except for
571 /// the module corresponding to the current frame).
573};
574
575// Target
576class Target : public std::enable_shared_from_this<Target>,
577 public TargetProperties,
578 public Broadcaster,
580 public ModuleList::Notifier {
581public:
582 friend class TargetList;
583 friend class Debugger;
584
585 /// Broadcaster event bits definitions.
586 enum {
594 };
595
596 // These two functions fill out the Broadcaster interface:
597
598 static llvm::StringRef GetStaticBroadcasterClass();
599
600 llvm::StringRef GetBroadcasterClass() const override {
602 }
603
604 // This event data class is for use by the TargetList to broadcast new target
605 // notifications.
606 class TargetEventData : public EventData {
607 public:
608 TargetEventData(const lldb::TargetSP &target_sp);
609
610 TargetEventData(const lldb::TargetSP &target_sp,
611 const ModuleList &module_list);
612
613 // Constructor for eBroadcastBitNewTargetCreated events. For this event
614 // type:
615 // - target_sp is the parent target (the subject/broadcaster of the event)
616 // - created_target_sp is the newly created target
617 TargetEventData(const lldb::TargetSP &target_sp,
618 const lldb::TargetSP &created_target_sp);
619
621
622 static llvm::StringRef GetFlavorString();
623
624 llvm::StringRef GetFlavor() const override {
626 }
627
628 void Dump(Stream *s) const override;
629
630 static const TargetEventData *GetEventDataFromEvent(const Event *event_ptr);
631
632 static lldb::TargetSP GetTargetFromEvent(const Event *event_ptr);
633
634 // For eBroadcastBitNewTargetCreated events, returns the newly created
635 // target. For other event types, returns an invalid target.
636 static lldb::TargetSP GetCreatedTargetFromEvent(const Event *event_ptr);
637
638 static ModuleList GetModuleListFromEvent(const Event *event_ptr);
639
640 const lldb::TargetSP &GetTarget() const { return m_target_sp; }
641
643 return m_created_target_sp;
644 }
645
646 const ModuleList &GetModuleList() const { return m_module_list; }
647
648 private:
652
654 const TargetEventData &operator=(const TargetEventData &) = delete;
655 };
656
657 ~Target() override;
658
659 static void SettingsInitialize();
660
661 static void SettingsTerminate();
662
664
666
668
669 static void SetDefaultArchitecture(const ArchSpec &arch);
670
671 bool IsDummyTarget() const { return m_is_dummy_target; }
672
673 /// Get the globally unique ID for this target.
674 ///
675 /// This ID is unique across all debugger instances and all targets,
676 /// within the same lldb process. The ID is assigned
677 /// during target construction and remains constant for the target's lifetime.
678 /// The first target created (typically the dummy target) gets ID 1.
679 ///
680 /// \return
681 /// The globally unique ID for this target.
683
684 const std::string &GetLabel() const { return m_label; }
685
686 /// Set a label for a target.
687 ///
688 /// The label cannot be used by another target or be only integral.
689 ///
690 /// \return
691 /// The label for this target or an error if the label didn't match the
692 /// requirements.
693 llvm::Error SetLabel(llvm::StringRef label);
694
695 /// Get the target session name for this target.
696 ///
697 /// Provides a meaningful name for IDEs or tools to display for dynamically
698 /// created targets. Defaults to "Session {ID}" based on the globally unique
699 /// ID.
700 ///
701 /// \return
702 /// The target session name for this target.
703 llvm::StringRef GetTargetSessionName() { return m_target_session_name; }
704
705 /// Set the target session name for this target.
706 ///
707 /// This should typically be set along with the event
708 /// eBroadcastBitNewTargetCreated. Useful for scripts or triggers that
709 /// automatically create targets and want to provide meaningful names that
710 /// IDEs or other tools can display to help users identify the origin and
711 /// purpose of each target.
712 ///
713 /// \param[in] target_session_name
714 /// The target session name to set for this target.
715 void SetTargetSessionName(llvm::StringRef target_session_name) {
716 m_target_session_name = target_session_name.str();
717 }
718
719 /// Find a binary on the system and return its Module,
720 /// or return an existing Module that is already in the Target.
721 ///
722 /// Given a ModuleSpec, find a binary satisifying that specification,
723 /// or identify a matching Module already present in the Target,
724 /// and return a shared pointer to it.
725 ///
726 /// Note that this function previously also preloaded the module's symbols
727 /// depending on a setting. This function no longer does any module
728 /// preloading because that can potentially cause deadlocks when called in
729 /// parallel with this function.
730 ///
731 /// \param[in] module_spec
732 /// The criteria that must be matched for the binary being loaded.
733 /// e.g. UUID, architecture, file path.
734 ///
735 /// \param[in] notify
736 /// If notify is true, and the Module is new to this Target,
737 /// Target::ModulesDidLoad will be called. See note in
738 /// Target::ModulesDidLoad about thread-safety with
739 /// Target::GetOrCreateModule.
740 /// If notify is false, it is assumed that the caller is adding
741 /// multiple Modules and will call ModulesDidLoad with the
742 /// full list at the end.
743 /// ModulesDidLoad must be called when a Module/Modules have
744 /// been added to the target, one way or the other.
745 ///
746 /// \param[out] error_ptr
747 /// Optional argument, pointing to a Status object to fill in
748 /// with any results / messages while attempting to find/load
749 /// this binary. Many callers will be internal functions that
750 /// will handle / summarize the failures in a custom way and
751 /// don't use these messages.
752 ///
753 /// \return
754 /// An empty ModuleSP will be returned if no matching file
755 /// was found. If error_ptr was non-nullptr, an error message
756 /// will likely be provided.
757 lldb::ModuleSP GetOrCreateModule(const ModuleSpec &module_spec, bool notify,
758 Status *error_ptr = nullptr);
759
760 // Settings accessors
761
763
764 std::recursive_mutex &GetAPIMutex();
765
767
768 void CleanupProcess();
769
770 /// Dump a description of this object to a Stream.
771 ///
772 /// Dump a description of the contents of this object to the
773 /// supplied stream \a s. The dumped content will be only what has
774 /// been loaded or parsed up to this point at which this function
775 /// is called, so this is a good way to see what has been parsed
776 /// in a target.
777 ///
778 /// \param[in] s
779 /// The stream to which to dump the object description.
780 void Dump(Stream *s, lldb::DescriptionLevel description_level);
781
782 // If listener_sp is null, the listener of the owning Debugger object will be
783 // used.
785 llvm::StringRef plugin_name,
786 const FileSpec *crash_file,
787 bool can_connect);
788
789 const lldb::ProcessSP &GetProcessSP() const;
790
791 bool IsValid() { return m_valid; }
792
793 void Destroy();
794
795 Status Launch(ProcessLaunchInfo &launch_info,
796 Stream *stream); // Optional stream to receive first stop info
797
798 Status Attach(ProcessAttachInfo &attach_info,
799 Stream *stream); // Optional stream to receive first stop info
800
801 /// Add or update a scripted frame provider descriptor for this target.
802 /// All new threads in this target will check if they match any descriptors
803 /// to create their frame providers.
804 ///
805 /// \param[in] descriptor
806 /// The descriptor to add or update.
807 ///
808 /// \return
809 /// The descriptor identifier if the registration succeeded, otherwise an
810 /// llvm::Error.
811 llvm::Expected<uint32_t> AddScriptedFrameProviderDescriptor(
812 const ScriptedFrameProviderDescriptor &descriptor);
813
814 /// Remove a scripted frame provider descriptor by id.
815 ///
816 /// \param[in] id
817 /// The id of the descriptor to remove.
818 ///
819 /// \return
820 /// True if a descriptor was removed, false if no descriptor with that
821 /// id existed.
823
824 /// Clear all scripted frame provider descriptors for this target.
826
827 /// Get all scripted frame provider descriptors for this target.
828 const llvm::MapVector<uint32_t, ScriptedFrameProviderDescriptor> &
830
831protected:
832 /// Invalidate all potentially cached frame providers for all threads
833 /// and trigger a stack changed event for all threads.
835
836public:
837 // This part handles the breakpoints.
838
839 BreakpointList &GetBreakpointList(bool internal = false);
840
841 const BreakpointList &GetBreakpointList(bool internal = false) const;
842
846
848
850
851 // Use this to create a file and line breakpoint to a given module or all
852 // module it is nullptr
853 lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules,
854 const FileSpec &file, uint32_t line_no,
855 uint32_t column, lldb::addr_t offset,
856 LazyBool check_inlines,
857 LazyBool skip_prologue, bool internal,
858 bool request_hardware,
859 LazyBool move_to_nearest_code);
860
861 // Use this to create breakpoint that matches regex against the source lines
862 // in files given in source_file_list: If function_names is non-empty, also
863 // filter by function after the matches are made.
865 const FileSpecList *containingModules,
866 const FileSpecList *source_file_list,
867 const std::unordered_set<std::string> &function_names,
868 RegularExpression source_regex, bool internal, bool request_hardware,
869 LazyBool move_to_nearest_code);
870
871 // Use this to create a breakpoint from a load address
872 lldb::BreakpointSP CreateBreakpoint(lldb::addr_t load_addr, bool internal,
873 bool request_hardware);
874
875 // Use this to create a breakpoint from a file address and a module file spec
877 bool internal,
878 const FileSpec &file_spec,
879 bool request_hardware);
880
881 // Use this to create Address breakpoints:
882 lldb::BreakpointSP CreateBreakpoint(const Address &addr, bool internal,
883 bool request_hardware);
884
885 // Use this to create a function breakpoint by regexp in
886 // containingModule/containingSourceFiles, or all modules if it is nullptr
887 // When "skip_prologue is set to eLazyBoolCalculate, we use the current
888 // target setting, else we use the values passed in
890 const FileSpecList *containingModules,
891 const FileSpecList *containingSourceFiles, RegularExpression func_regexp,
892 lldb::LanguageType requested_language, LazyBool skip_prologue,
893 bool internal, bool request_hardware);
894
895 // Use this to create a function breakpoint by name in containingModule, or
896 // all modules if it is nullptr When "skip_prologue is set to
897 // eLazyBoolCalculate, we use the current target setting, else we use the
898 // values passed in. func_name_type_mask is or'ed values from the
899 // FunctionNameType enum.
901 const FileSpecList *containingModules,
902 const FileSpecList *containingSourceFiles, const char *func_name,
903 lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language,
904 lldb::addr_t offset, bool offset_is_insn_count, LazyBool skip_prologue,
905 bool internal, bool request_hardware);
906
908 CreateExceptionBreakpoint(enum lldb::LanguageType language, bool catch_bp,
909 bool throw_bp, bool internal,
910 Args *additional_args = nullptr,
911 Status *additional_args_error = nullptr);
912
914 const llvm::StringRef class_name, const FileSpecList *containingModules,
915 const FileSpecList *containingSourceFiles, bool internal,
916 bool request_hardware, StructuredData::ObjectSP extra_args_sp,
917 Status *creation_error = nullptr);
918
919 // This is the same as the func_name breakpoint except that you can specify a
920 // vector of names. This is cheaper than a regular expression breakpoint in
921 // the case where you just want to set a breakpoint on a set of names you
922 // already know. func_name_type_mask is or'ed values from the
923 // FunctionNameType enum.
925 const FileSpecList *containingModules,
926 const FileSpecList *containingSourceFiles, const char *func_names[],
927 size_t num_names, lldb::FunctionNameType func_name_type_mask,
928 lldb::LanguageType language, lldb::addr_t offset, LazyBool skip_prologue,
929 bool internal, bool request_hardware);
930
932 CreateBreakpoint(const FileSpecList *containingModules,
933 const FileSpecList *containingSourceFiles,
934 const std::vector<std::string> &func_names,
935 lldb::FunctionNameType func_name_type_mask,
936 lldb::LanguageType language, lldb::addr_t m_offset,
937 LazyBool skip_prologue, bool internal,
938 bool request_hardware);
939
940 // Use this to create a general breakpoint:
942 lldb::BreakpointResolverSP &resolver_sp,
943 bool internal, bool request_hardware,
944 bool resolve_indirect_symbols);
945
946 // Use this to create a watchpoint:
948 const CompilerType *type, uint32_t kind,
949 Status &error);
950
954
956
957 // Manages breakpoint names:
958 void AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name,
959 Status &error);
960
961 void AddNameToBreakpoint(lldb::BreakpointSP &bp_sp, llvm::StringRef name,
962 Status &error);
963
965 llvm::StringRef name);
966
967 BreakpointName *FindBreakpointName(llvm::StringRef name, bool can_create,
968 Status &error);
969
970 void DeleteBreakpointName(llvm::StringRef name);
971
973 const BreakpointOptions &options,
974 const BreakpointName::Permissions &permissions);
976
977 void AddBreakpointName(std::unique_ptr<BreakpointName> bp_name);
978
979 void GetBreakpointNames(std::vector<std::string> &names);
980
981 // This call removes ALL breakpoints regardless of permission.
982 void RemoveAllBreakpoints(bool internal_also = false);
983
984 // This removes all the breakpoints, but obeys the ePermDelete on them.
986
987 void DisableAllBreakpoints(bool internal_also = false);
988
990
991 void EnableAllBreakpoints(bool internal_also = false);
992
994
996
998
1000
1001 /// Resets the hit count of all breakpoints.
1003
1004 // This callout implements the "Resolver Override". When we have determined
1005 // the Resolver for a given breakpoint, we pass each of the registered
1006 // overrides the "natural" resolver, and then we will use whatever resolver
1007 // we get back from it if it is non-null.
1008 // We keep a list of overrides ordered by ID - and we search through the list
1009 // by ID order, and the first override that returns a non-null Resolver will
1010 // be the one we use. If no overrides return an override resolver, we'll use
1011 // the original one.
1012
1013 /// This is the abstract version of the override. Particular implementations,
1014 /// e.g. the scripted override resolver, instantiate actual versions of the
1015 /// class. The constructor takes the target this resolver is registered in, a
1016 /// description for the override and a mask of the resolver types this
1017 /// overrides, made of elements of the BreakpointResolverType enum.
1018 class BreakpointResolverOverride;
1020 std::unique_ptr<BreakpointResolverOverride>;
1021
1023 public:
1024 BreakpointResolverOverride(Target &target, const std::string &description,
1025 uint64_t type_mask)
1026 : m_target(target), m_desc(description), m_type_mask(type_mask) {}
1027
1029
1033 // Return whether constructing this resolver was successful.
1034 virtual llvm::Error Validate() = 0;
1035 const std::string &GetDescription() { return m_desc; }
1036 uint64_t GetTypeMask() { return m_type_mask; }
1037 std::string DescribeTypeMask();
1038
1039 protected:
1041 std::string m_desc;
1042 uint64_t m_type_mask = 0;
1043 };
1044
1045 /// Add a breakpoint override resolver. This version can't fail.
1049 m_breakpoint_overrides.emplace(m_override_id, std::move(override_up));
1050 m_override_id++;
1051 return id_used;
1052 }
1053
1054 /// Add a breakpoint override resolver. Return the ID or an error:
1055 llvm::Expected<lldb::user_id_t>
1056 AddBreakpointResolverOverride(llvm::StringRef class_name, uint64_t type_mask,
1057 StructuredData::DictionarySP args_data_sp,
1058 llvm::StringRef description);
1059
1061 size_t removed = m_breakpoint_overrides.erase(override_id);
1062 return removed == 1;
1063 }
1064
1066
1069
1070 /// Describe the breakpoint overrides. If ixds is empty, list all. Otherwise
1071 /// list the overrides whose ids match the ones given in idxs. The matched
1072 /// elements are removed from the list, so any elements remaining in idxs are
1073 /// indexes that are not breakpoint override indexes.
1075 std::vector<lldb::user_id_t> &idxs,
1076 uint32_t terminal_width, bool use_color);
1077
1078 // The flag 'end_to_end', default to true, signifies that the operation is
1079 // performed end to end, for both the debugger and the debuggee.
1080
1081 bool RemoveAllWatchpoints(bool end_to_end = true);
1082
1083 bool DisableAllWatchpoints(bool end_to_end = true);
1084
1085 bool EnableAllWatchpoints(bool end_to_end = true);
1086
1088
1090
1091 bool IgnoreAllWatchpoints(uint32_t ignore_count);
1092
1094
1096
1098
1099 bool IgnoreWatchpointByID(lldb::watch_id_t watch_id, uint32_t ignore_count);
1100
1102 const BreakpointIDList &bp_ids,
1103 bool append);
1104
1106 BreakpointIDList &new_bps);
1107
1109 std::vector<std::string> &names,
1110 BreakpointIDList &new_bps);
1111
1112 /// Get \a load_addr as a callable code load address for this target
1113 ///
1114 /// Take \a load_addr and potentially add any address bits that are
1115 /// needed to make the address callable. For ARM this can set bit
1116 /// zero (if it already isn't) if \a load_addr is a thumb function.
1117 /// If \a addr_class is set to AddressClass::eInvalid, then the address
1118 /// adjustment will always happen. If it is set to an address class
1119 /// that doesn't have code in it, LLDB_INVALID_ADDRESS will be
1120 /// returned.
1122 lldb::addr_t load_addr,
1123 AddressClass addr_class = AddressClass::eInvalid) const;
1124
1125 /// Get \a load_addr as an opcode for this target.
1126 ///
1127 /// Take \a load_addr and potentially strip any address bits that are
1128 /// needed to make the address point to an opcode. For ARM this can
1129 /// clear bit zero (if it already isn't) if \a load_addr is a
1130 /// thumb function and load_addr is in code.
1131 /// If \a addr_class is set to AddressClass::eInvalid, then the address
1132 /// adjustment will always happen. If it is set to an address class
1133 /// that doesn't have code in it, LLDB_INVALID_ADDRESS will be
1134 /// returned.
1137 AddressClass addr_class = AddressClass::eInvalid) const;
1138
1139 // Get load_addr as breakable load address for this target. Take a addr and
1140 // check if for any reason there is a better address than this to put a
1141 // breakpoint on. If there is then return that address. For MIPS, if
1142 // instruction at addr is a delay slot instruction then this method will find
1143 // the address of its previous instruction and return that address.
1145
1146 /// This call may preload module symbols, and may do so in parallel depending
1147 /// on the following target settings:
1148 /// - TargetProperties::GetPreloadSymbols()
1149 /// - TargetProperties::GetParallelModuleLoad()
1150 ///
1151 /// Warning: if preloading is active and this is called in parallel with
1152 /// Target::GetOrCreateModule, this may result in a ABBA deadlock situation.
1153 void ModulesDidLoad(ModuleList &module_list);
1154
1155 void ModulesDidUnload(ModuleList &module_list, bool delete_locations);
1156
1157 void SymbolsDidLoad(ModuleList &module_list);
1158
1159 void ClearModules(bool delete_locations);
1160
1161 /// Called as the last function in Process::DidExec().
1162 ///
1163 /// Process::DidExec() will clear a lot of state in the process,
1164 /// then try to reload a dynamic loader plugin to discover what
1165 /// binaries are currently available and then this function should
1166 /// be called to allow the target to do any cleanup after everything
1167 /// has been figured out. It can remove breakpoints that no longer
1168 /// make sense as the exec might have changed the target
1169 /// architecture, and unloaded some modules that might get deleted.
1170 void DidExec();
1171
1172 /// Gets the module for the main executable.
1173 ///
1174 /// Each process has a notion of a main executable that is the file
1175 /// that will be executed or attached to. Executable files can have
1176 /// dependent modules that are discovered from the object files, or
1177 /// discovered at runtime as things are dynamically loaded.
1178 ///
1179 /// \return
1180 /// The shared pointer to the executable module which can
1181 /// contains a nullptr Module object if no executable has been
1182 /// set.
1183 ///
1184 /// \see DynamicLoader
1185 /// \see ObjectFile::GetDependentModules (FileSpecList&)
1186 /// \see Process::SetExecutableModule(lldb::ModuleSP&)
1188
1190
1191 /// Set the main executable module.
1192 ///
1193 /// Each process has a notion of a main executable that is the file
1194 /// that will be executed or attached to. Executable files can have
1195 /// dependent modules that are discovered from the object files, or
1196 /// discovered at runtime as things are dynamically loaded.
1197 ///
1198 /// Setting the executable causes any of the current dependent
1199 /// image information to be cleared and replaced with the static
1200 /// dependent image information found by calling
1201 /// ObjectFile::GetDependentModules (FileSpecList&) on the main
1202 /// executable and any modules on which it depends. Calling
1203 /// Process::GetImages() will return the newly found images that
1204 /// were obtained from all of the object files.
1205 ///
1206 /// \param[in] module_sp
1207 /// A shared pointer reference to the module that will become
1208 /// the main executable for this process.
1209 ///
1210 /// \param[in] load_dependent_files
1211 /// If \b true then ask the object files to track down any
1212 /// known dependent files.
1213 ///
1214 /// \see ObjectFile::GetDependentModules (FileSpecList&)
1215 /// \see Process::GetImages()
1217 lldb::ModuleSP &module_sp,
1218 LoadDependentFiles load_dependent_files = eLoadDependentsDefault);
1219
1220 bool LoadScriptingResources(std::list<Status> &errors,
1221 bool continue_on_error = true) {
1222 return m_images.LoadScriptingResourcesInTarget(this, errors,
1223 continue_on_error);
1224 }
1225
1226 /// Get accessor for the images for this process.
1227 ///
1228 /// Each process has a notion of a main executable that is the file
1229 /// that will be executed or attached to. Executable files can have
1230 /// dependent modules that are discovered from the object files, or
1231 /// discovered at runtime as things are dynamically loaded. After
1232 /// a main executable has been set, the images will contain a list
1233 /// of all the files that the executable depends upon as far as the
1234 /// object files know. These images will usually contain valid file
1235 /// virtual addresses only. When the process is launched or attached
1236 /// to, the DynamicLoader plug-in will discover where these images
1237 /// were loaded in memory and will resolve the load virtual
1238 /// addresses is each image, and also in images that are loaded by
1239 /// code.
1240 ///
1241 /// \return
1242 /// A list of Module objects in a module list.
1243 const ModuleList &GetImages() const { return m_images; }
1244
1246
1247 /// Return whether this FileSpec corresponds to a module that should be
1248 /// considered for general searches.
1249 ///
1250 /// This API will be consulted by the SearchFilterForUnconstrainedSearches
1251 /// and any module that returns \b true will not be searched. Note the
1252 /// SearchFilterForUnconstrainedSearches is the search filter that
1253 /// gets used in the CreateBreakpoint calls when no modules is provided.
1254 ///
1255 /// The target call at present just consults the Platform's call of the
1256 /// same name.
1257 ///
1258 /// \param[in] module_spec
1259 /// Path to the module.
1260 ///
1261 /// \return \b true if the module should be excluded, \b false otherwise.
1262 bool ModuleIsExcludedForUnconstrainedSearches(const FileSpec &module_spec);
1263
1264 /// Return whether this module should be considered for general searches.
1265 ///
1266 /// This API will be consulted by the SearchFilterForUnconstrainedSearches
1267 /// and any module that returns \b true will not be searched. Note the
1268 /// SearchFilterForUnconstrainedSearches is the search filter that
1269 /// gets used in the CreateBreakpoint calls when no modules is provided.
1270 ///
1271 /// The target call at present just consults the Platform's call of the
1272 /// same name.
1273 ///
1274 /// FIXME: When we get time we should add a way for the user to set modules
1275 /// that they
1276 /// don't want searched, in addition to or instead of the platform ones.
1277 ///
1278 /// \param[in] module_sp
1279 /// A shared pointer reference to the module that checked.
1280 ///
1281 /// \return \b true if the module should be excluded, \b false otherwise.
1282 bool
1284
1285 const ArchSpec &GetArchitecture() const { return m_arch.GetSpec(); }
1286
1287 /// Returns the name of the target's ABI plugin.
1288 llvm::StringRef GetABIName() const;
1289
1290 /// Set the architecture for this target.
1291 ///
1292 /// If the current target has no Images read in, then this just sets the
1293 /// architecture, which will be used to select the architecture of the
1294 /// ExecutableModule when that is set. If the current target has an
1295 /// ExecutableModule, then calling SetArchitecture with a different
1296 /// architecture from the currently selected one will reset the
1297 /// ExecutableModule to that slice of the file backing the ExecutableModule.
1298 /// If the file backing the ExecutableModule does not contain a fork of this
1299 /// architecture, then this code will return false, and the architecture
1300 /// won't be changed. If the input arch_spec is the same as the already set
1301 /// architecture, this is a no-op.
1302 ///
1303 /// \param[in] arch_spec
1304 /// The new architecture.
1305 ///
1306 /// \param[in] set_platform
1307 /// If \b true, then the platform will be adjusted if the currently
1308 /// selected platform is not compatible with the architecture being set.
1309 /// If \b false, then just the architecture will be set even if the
1310 /// currently selected platform isn't compatible (in case it might be
1311 /// manually set following this function call).
1312 ///
1313 /// \param[in] merged
1314 /// If true, arch_spec is merged with the current
1315 /// architecture. Otherwise it's replaced.
1316 ///
1317 /// \return
1318 /// \b true if the architecture was successfully set, \b false otherwise.
1319 bool SetArchitecture(const ArchSpec &arch_spec, bool set_platform = false,
1320 bool merge = true);
1321
1322 bool MergeArchitecture(const ArchSpec &arch_spec);
1323
1324 Architecture *GetArchitecturePlugin() const { return m_arch.GetPlugin(); }
1325
1326 Debugger &GetDebugger() const { return m_debugger; }
1327
1328 size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len,
1329 Status &error);
1330
1331 // Reading memory through the target allows us to skip going to the process
1332 // for reading memory if possible and it allows us to try and read from any
1333 // constant sections in our object files on disk. If you always want live
1334 // program memory, read straight from the process. If you possibly want to
1335 // read from const sections in object files, read from the target. This
1336 // version of ReadMemory will try and read memory from the process if the
1337 // process is alive. The order is:
1338 // 1 - if (force_live_memory == false) and the address falls in a read-only
1339 // section, then read from the file cache
1340 // 2 - if there is a process, then read from memory
1341 // 3 - if there is no process, then read from the file cache
1342 //
1343 // If did_read_live_memory is provided, will indicate if the read was from
1344 // live memory, or from file contents. A caller which needs to treat these two
1345 // sources differently should use this argument to disambiguate where the data
1346 // was read from.
1347 //
1348 // The method is virtual for mocking in the unit tests.
1349 virtual size_t ReadMemory(const Address &addr, void *dst, size_t dst_len,
1350 Status &error, bool force_live_memory = false,
1351 lldb::addr_t *load_addr_ptr = nullptr,
1352 bool *did_read_live_memory = nullptr);
1353
1354 size_t ReadCStringFromMemory(const Address &addr, std::string &out_str,
1355 Status &error, bool force_live_memory = false);
1356
1357 size_t ReadCStringFromMemory(const Address &addr, char *dst,
1358 size_t dst_max_len, Status &result_error,
1359 bool force_live_memory = false);
1360
1361 /// Read a NULL terminated string from memory
1362 ///
1363 /// This function will read a cache page at a time until a NULL string
1364 /// terminator is found. It will stop reading if an aligned sequence of NULL
1365 /// termination \a type_width bytes is not found before reading \a
1366 /// cstr_max_len bytes. The results are always guaranteed to be NULL
1367 /// terminated, and that no more than (max_bytes - type_width) bytes will be
1368 /// read.
1369 ///
1370 /// \param[in] addr
1371 /// The address to start the memory read.
1372 ///
1373 /// \param[in] dst
1374 /// A character buffer containing at least max_bytes.
1375 ///
1376 /// \param[in] max_bytes
1377 /// The maximum number of bytes to read.
1378 ///
1379 /// \param[in] error
1380 /// The error status of the read operation.
1381 ///
1382 /// \param[in] type_width
1383 /// The size of the null terminator (1 to 4 bytes per
1384 /// character). Defaults to 1.
1385 ///
1386 /// \return
1387 /// The error status or the number of bytes prior to the null terminator.
1388 size_t ReadStringFromMemory(const Address &addr, char *dst, size_t max_bytes,
1389 Status &error, size_t type_width,
1390 bool force_live_memory = true);
1391
1392 size_t ReadScalarIntegerFromMemory(const Address &addr, uint32_t byte_size,
1393 bool is_signed, Scalar &scalar,
1394 Status &error,
1395 bool force_live_memory = false);
1396
1397 int64_t ReadSignedIntegerFromMemory(const Address &addr,
1398 size_t integer_byte_size,
1399 int64_t fail_value, Status &error,
1400 bool force_live_memory = false);
1401
1402 uint64_t ReadUnsignedIntegerFromMemory(const Address &addr,
1403 size_t integer_byte_size,
1404 uint64_t fail_value, Status &error,
1405 bool force_live_memory = false);
1406
1407 bool ReadPointerFromMemory(const Address &addr, Status &error,
1408 Address &pointer_addr,
1409 bool force_live_memory = false);
1410
1411 bool HasLoadedSections();
1412
1414
1415 void ClearSectionLoadList();
1416
1417 void DumpSectionLoadList(Stream &s);
1418
1419 static Target *GetTargetFromContexts(const ExecutionContext *exe_ctx_ptr,
1420 const SymbolContext *sc_ptr);
1421
1422 // lldb::ExecutionContextScope pure virtual functions
1424
1426
1428
1430
1431 void CalculateExecutionContext(ExecutionContext &exe_ctx) override;
1432
1434
1435 llvm::Expected<lldb::TypeSystemSP>
1437 bool create_on_demand = true);
1438
1439 std::vector<lldb::TypeSystemSP>
1440 GetScratchTypeSystems(bool create_on_demand = true);
1441
1444
1445 // Creates a UserExpression for the given language, the rest of the
1446 // parameters have the same meaning as for the UserExpression constructor.
1447 // Returns a new-ed object which the caller owns.
1448
1450 GetUserExpressionForLanguage(llvm::StringRef expr, llvm::StringRef prefix,
1451 SourceLanguage language,
1452 Expression::ResultType desired_type,
1453 const EvaluateExpressionOptions &options,
1454 ValueObject *ctx_obj, Status &error);
1455
1456 // Creates a FunctionCaller for the given language, the rest of the
1457 // parameters have the same meaning as for the FunctionCaller constructor.
1458 // Since a FunctionCaller can't be
1459 // IR Interpreted, it makes no sense to call this with an
1460 // ExecutionContextScope that lacks
1461 // a Process.
1462 // Returns a new-ed object which the caller owns.
1463
1465 const CompilerType &return_type,
1466 const Address &function_address,
1467 const ValueList &arg_value_list,
1468 const char *name, Status &error);
1469
1470 /// Creates and installs a UtilityFunction for the given language.
1471 llvm::Expected<std::unique_ptr<UtilityFunction>>
1472 CreateUtilityFunction(std::string expression, std::string name,
1473 lldb::LanguageType language, ExecutionContext &exe_ctx);
1474
1475 // Install any files through the platform that need be to installed prior to
1476 // launching or attaching.
1477 Status Install(ProcessLaunchInfo *launch_info);
1478
1479 bool ResolveFileAddress(lldb::addr_t load_addr, Address &so_addr);
1480
1481 bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr,
1482 uint32_t stop_id = SectionLoadHistory::eStopIDNow,
1483 bool allow_section_end = false);
1484
1485 bool SetSectionLoadAddress(const lldb::SectionSP &section,
1486 lldb::addr_t load_addr,
1487 bool warn_multiple = false);
1488
1489 size_t UnloadModuleSections(const lldb::ModuleSP &module_sp);
1490
1491 size_t UnloadModuleSections(const ModuleList &module_list);
1492
1493 bool SetSectionUnloaded(const lldb::SectionSP &section_sp);
1494
1495 bool SetSectionUnloaded(const lldb::SectionSP &section_sp,
1496 lldb::addr_t load_addr);
1497
1499
1501 lldb_private::TypeSummaryImpl &summary_provider);
1503
1504 /// Set the \a Trace object containing processor trace information of this
1505 /// target.
1506 ///
1507 /// \param[in] trace_sp
1508 /// The trace object.
1509 void SetTrace(const lldb::TraceSP &trace_sp);
1510
1511 /// Get the \a Trace object containing processor trace information of this
1512 /// target.
1513 ///
1514 /// \return
1515 /// The trace object. It might be undefined.
1517
1518 /// Create a \a Trace object for the current target using the using the
1519 /// default supported tracing technology for this process.
1520 ///
1521 /// \return
1522 /// The new \a Trace or an \a llvm::Error if a \a Trace already exists or
1523 /// the trace couldn't be created.
1524 llvm::Expected<lldb::TraceSP> CreateTrace();
1525
1526 /// If a \a Trace object is present, this returns it, otherwise a new Trace is
1527 /// created with \a Trace::CreateTrace.
1528 llvm::Expected<lldb::TraceSP> GetTraceOrCreate();
1529
1530 // Since expressions results can persist beyond the lifetime of a process,
1531 // and the const expression results are available after a process is gone, we
1532 // provide a way for expressions to be evaluated from the Target itself. If
1533 // an expression is going to be run, then it should have a frame filled in in
1534 // the execution context.
1536 llvm::StringRef expression, ExecutionContextScope *exe_scope,
1537 lldb::ValueObjectSP &result_valobj_sp,
1539 std::string *fixed_expression = nullptr, ValueObject *ctx_obj = nullptr);
1540
1542
1544
1545 /// This method will return the address of the starting function for
1546 /// this binary, e.g. main() or its equivalent. This can be used as
1547 /// an address of a function that is not called once a binary has
1548 /// started running - e.g. as a return address for inferior function
1549 /// calls that are unambiguous completion of the function call, not
1550 /// called during the course of the inferior function code running.
1551 ///
1552 /// If no entry point can be found, an invalid address is returned.
1553 ///
1554 /// \param [out] err
1555 /// This object will be set to failure if no entry address could
1556 /// be found, and may contain a helpful error message.
1557 //
1558 /// \return
1559 /// Returns the entry address for this program, or an error
1560 /// if none can be found.
1561 llvm::Expected<lldb_private::Address> GetEntryPointAddress();
1562
1563 CompilerType GetRegisterType(const std::string &name,
1564 const lldb_private::RegisterFlags &flags,
1565 uint32_t byte_size);
1566
1567 /// Sends a breakpoint notification event.
1569 lldb::BreakpointEventType event_kind);
1570 /// Sends a breakpoint notification event.
1572 const lldb::EventDataSP &breakpoint_data_sp);
1573
1574 llvm::Expected<lldb::DisassemblerSP>
1575 ReadInstructions(const Address &start_addr, uint32_t count,
1576 const char *flavor_string = nullptr);
1577
1578 // Target Stop Hooks
1579 class StopHook : public UserID {
1580 public:
1581 StopHook(const StopHook &rhs);
1582 virtual ~StopHook() = default;
1583
1584 enum class StopHookKind : uint32_t {
1588 };
1595
1597
1598 // Set the specifier. The stop hook will own the specifier, and is
1599 // responsible for deleting it when we're done.
1600 void SetSpecifier(SymbolContextSpecifier *specifier);
1601
1603
1604 bool ExecutionContextPasses(const ExecutionContext &exe_ctx);
1605
1606 // Called on stop, this gets passed the ExecutionContext for each "stop
1607 // with a reason" thread. It should add to the stream whatever text it
1608 // wants to show the user, and return False to indicate it wants the target
1609 // not to stop.
1611 lldb::StreamSP output) = 0;
1612
1613 // Set the Thread Specifier. The stop hook will own the thread specifier,
1614 // and is responsible for deleting it when we're done.
1615 void SetThreadSpecifier(ThreadSpec *specifier);
1616
1618
1619 bool IsActive() { return m_active; }
1620
1621 void SetIsActive(bool is_active) { m_active = is_active; }
1622
1623 void SetAutoContinue(bool auto_continue) {
1624 m_auto_continue = auto_continue;
1625 }
1626
1627 bool GetAutoContinue() const { return m_auto_continue; }
1628
1629 void SetRunAtInitialStop(bool at_initial_stop) {
1630 m_at_initial_stop = at_initial_stop;
1631 }
1632
1634
1635 void SetSuppressOutput(bool suppress_output) {
1636 m_suppress_output = suppress_output;
1637 }
1638
1639 bool GetSuppressOutput() const { return m_suppress_output; }
1640
1641 void GetDescription(Stream &s, lldb::DescriptionLevel level) const;
1643 lldb::DescriptionLevel level) const = 0;
1644
1645 protected:
1648 std::unique_ptr<ThreadSpec> m_thread_spec_up;
1649 bool m_active = true;
1650 bool m_auto_continue = false;
1652 bool m_suppress_output = false;
1653
1654 StopHook(lldb::TargetSP target_sp, lldb::user_id_t uid);
1655 };
1656
1658 public:
1659 ~StopHookCommandLine() override = default;
1660
1662 void SetActionFromString(const std::string &strings);
1663 void SetActionFromStrings(const std::vector<std::string> &strings);
1664
1666 lldb::StreamSP output_sp) override;
1668 lldb::DescriptionLevel level) const override;
1669
1670 private:
1672 // Use CreateStopHook to make a new empty stop hook. Use SetActionFromString
1673 // to fill it with commands, and SetSpecifier to set the specifier shared
1674 // pointer (can be null, that will match anything.)
1676 : StopHook(target_sp, uid) {}
1677 friend class Target;
1678 };
1679
1681 public:
1682 ~StopHookScripted() override = default;
1684 lldb::StreamSP output) override;
1685
1686 Status SetScriptCallback(const ScriptedMetadata &scripted_metadata);
1687
1689 lldb::DescriptionLevel level) const override;
1690
1691 private:
1692 llvm::StringRef GetScriptClassName() const;
1693
1695
1696 /// Use CreateStopHook to make a new empty stop hook. Use SetScriptCallback
1697 /// to set the script to execute, and SetSpecifier to set the specifier
1698 /// shared pointer (can be null, that will match anything.)
1700 : StopHook(target_sp, uid) {}
1701 friend class Target;
1702 };
1703
1704 class StopHookCoded : public StopHook {
1705 public:
1706 ~StopHookCoded() override = default;
1707
1709 lldb::StreamSP output);
1710
1711 void SetCallback(llvm::StringRef name, HandleStopCallback *callback) {
1712 m_name = name;
1713 m_callback = callback;
1714 }
1715
1717 lldb::StreamSP output) override {
1718 return m_callback(exc_ctx, output);
1719 }
1720
1722 lldb::DescriptionLevel level) const override {
1723 s.Indent();
1724 s.Printf("%s (built-in)\n", m_name.c_str());
1725 }
1726
1727 private:
1728 std::string m_name;
1730
1731 /// Use CreateStopHook to make a new empty stop hook. Use SetCallback to set
1732 /// the callback to execute, and SetSpecifier to set the specifier shared
1733 /// pointer (can be null, that will match anything.)
1735 : StopHook(target_sp, uid) {}
1736 friend class Target;
1737 };
1738
1740
1741 typedef std::shared_ptr<StopHook> StopHookSP;
1742
1743 // Target Hooks
1744 //
1745 // Hooks fire on target lifecycle events. There are two flows:
1746 //
1747 // Command-based hooks: the user specifies which triggers the hook responds
1748 // to (--on-load, --on-unload, --on-stop) and provides a list of commands.
1749 // All commands run for every trigger the hook is signed up for.
1750 //
1751 // Python class hooks: the user provides a Python class name and optional
1752 // extra_args that will be passed to the hook init method (-k key -v value).
1753 // The class controls which events it handles by implementing the
1754 // corresponding callback methods (handle_module_loaded,
1755 // handle_module_unloaded, handle_stop). Triggers are set automatically
1756 // based on which methods exist.
1757 class Hook : public UserID {
1758 public:
1759 Hook(const Hook &rhs);
1760 virtual ~Hook() = default;
1761
1762 enum class HookKind : uint32_t { CommandBased = 0, ScriptBased };
1763
1764 HookKind GetHookKind() const { return m_kind; }
1765
1766 /// Individual trigger bits. Combine with bitwise OR to form a trigger mask.
1767 // FIXME: Add kProcessExit, kProcessDetach, etc. as needed.
1768 enum TriggerBit : uint32_t {
1769 kModulesLoaded = (1u << 0),
1770 kModulesUnloaded = (1u << 1),
1771 kProcessStop = (1u << 2),
1772 };
1773
1775
1776 bool IsEnabled() { return m_enabled; }
1777 void SetIsEnabled(bool enabled) { m_enabled = enabled; }
1778
1779 /// Return the bitmask of triggers this hook responds to.
1780 /// Each bit corresponds to a TriggerBit value.
1781 uint32_t GetTriggerMask() const { return m_trigger_mask; }
1782
1783 /// Return true if this hook fires on the given trigger.
1784 bool FiresOn(uint32_t trigger) const { return m_trigger_mask & trigger; }
1785
1786 // Filter fields
1787
1788 /// Set the symbol context specifier. The hook takes ownership.
1789 void SetSCSpecifier(SymbolContextSpecifier *specifier);
1791
1792 /// Check if the execution context passes the specifier and thread spec
1793 /// filters. Always returns true if no filters are set.
1794 bool ExecutionContextPasses(const ExecutionContext &exe_ctx);
1795
1796 /// Set the thread specifier. The hook takes ownership.
1797 void SetThreadSpecifier(ThreadSpec *specifier);
1799
1800 void SetRunAtInitialStop(bool at_initial_stop) {
1801 m_at_initial_stop = at_initial_stop;
1802 }
1804
1805 // Reaction settings
1806
1807 void SetAutoContinue(bool auto_continue) {
1808 m_auto_continue = auto_continue;
1809 }
1810 bool GetAutoContinue() const { return m_auto_continue; }
1811
1812 void SetSuppressOutput(bool suppress_output) {
1813 m_suppress_output = suppress_output;
1814 }
1815 bool GetSuppressOutput() const { return m_suppress_output; }
1816
1817 // Event handler methods (default no-ops)
1818
1819 virtual void HandleModuleLoaded(lldb::StreamSP output) {}
1820 virtual void HandleModuleUnloaded(lldb::StreamSP output) {}
1821
1822 /// Called when the process stops. Returns a StopHookResult indicating
1823 /// whether the process should remain stopped or continue.
1828
1829 virtual void GetDescription(Stream &s, lldb::DescriptionLevel level) const;
1830
1831 protected:
1832 /// Print the filter portion of the description (AutoContinue, Specifier,
1833 /// ThreadSpec). Called by subclass GetDescription after printing the
1834 /// hook-specific content (commands or class).
1838 bool m_enabled = true;
1839 uint32_t m_trigger_mask = 0; // No default, triggers must be explicit.
1840
1841 // Filters
1843 std::unique_ptr<ThreadSpec> m_thread_spec_up;
1845
1846 // Reaction settings
1847 bool m_auto_continue = false;
1848 bool m_suppress_output = false;
1849
1850 Hook(lldb::TargetSP target_sp, lldb::user_id_t uid, HookKind kind);
1851 };
1852
1853 class HookCommandLine : public Hook {
1854 public:
1855 ~HookCommandLine() override = default;
1856
1857 /// Replace the trigger mask. \a mask is a bitwise OR of TriggerBit values.
1858 void SetTriggerMask(uint32_t mask) { m_trigger_mask = mask; }
1859
1860 /// Add a trigger to the mask. \a trigger is a single TriggerBit value.
1861 void AddTrigger(uint32_t trigger) { m_trigger_mask |= trigger; }
1862
1863 /// Remove a trigger from the mask. \a trigger is a single TriggerBit value.
1864 void RemoveTrigger(uint32_t trigger) { m_trigger_mask &= ~trigger; }
1865
1866 /// Return the list of commands that this hook runs.
1868
1869 /// Populate the command list by splitting a single string on newlines.
1870 void SetActionFromString(const std::string &string);
1871
1872 /// Populate the command list from a vector of individual command strings.
1873 void SetActionFromStrings(const std::vector<std::string> &strings);
1874
1875 void GetDescription(Stream &s, lldb::DescriptionLevel level) const override;
1876 void HandleModuleLoaded(lldb::StreamSP output) override;
1877 void HandleModuleUnloaded(lldb::StreamSP output) override;
1879 lldb::StreamSP output) override;
1880
1881 private:
1883
1885 : Hook(target_sp, uid, HookKind::CommandBased) {}
1886 friend class Target;
1887 };
1888
1889 class HookScripted : public Hook {
1890 public:
1891 ~HookScripted() override = default;
1892
1893 void GetDescription(Stream &s, lldb::DescriptionLevel level) const override;
1894
1895 void HandleModuleLoaded(lldb::StreamSP output) override;
1896 void HandleModuleUnloaded(lldb::StreamSP output) override;
1898 lldb::StreamSP output) override;
1899
1900 Status SetScriptCallback(const ScriptedMetadata &scripted_metadata);
1901
1902 private:
1903 llvm::StringRef GetScriptClassName() const;
1904
1906
1908 : Hook(target_sp, uid, HookKind::ScriptBased) {}
1909 friend class Target;
1910 };
1911
1912 typedef std::shared_ptr<Hook> HookSP;
1913
1915
1916 /// Removes the most recently created hook. Used to roll back a
1917 /// hook creation when an error occurs (e.g., invalid script class name
1918 /// or empty interactive input).
1920
1922
1923 void RemoveAllHooks();
1924
1926
1927 bool SetHookEnabledStateByID(lldb::user_id_t uid, bool enabled);
1928
1929 void SetAllHooksEnabledState(bool enabled);
1930
1931 size_t GetNumHooks() const { return m_hooks.size(); }
1932
1933 HookSP GetHookAtIndex(size_t index);
1934
1935 void RunModuleHooks(bool is_load);
1936
1937 /// Add an empty stop hook to the Target's stop hook list, and returns a
1938 /// shared pointer to the new hook.
1939 StopHookSP CreateStopHook(StopHook::StopHookKind kind, bool internal = false);
1940
1941 /// If you tried to create a stop hook, and that failed, call this to
1942 /// remove the stop hook, as it will also reset the stop hook counter.
1944
1945 // Runs the stop hooks that have been registered for this target.
1946 // Returns true if the stop hooks cause the target to resume.
1947 // Pass at_initial_stop if this is the stop where lldb gains
1948 // control over the process for the first time.
1949 bool RunStopHooks(bool at_initial_stop = false);
1950
1951 bool SetSuppresStopHooks(bool suppress) {
1952 bool old_value = m_suppress_stop_hooks;
1953 m_suppress_stop_hooks = suppress;
1954 return old_value;
1955 }
1956
1958
1960
1961 void RemoveAllStopHooks();
1962
1963 StopHookSP GetStopHookByID(lldb::user_id_t uid);
1964
1965 bool SetStopHookActiveStateByID(lldb::user_id_t uid, bool active_state);
1966
1967 void SetAllStopHooksActiveState(bool active_state);
1968
1969 const std::vector<StopHookSP> GetStopHooks(bool internal = false) const;
1970
1972
1973 void SetPlatform(const lldb::PlatformSP &platform_sp) {
1974 m_platform_sp = platform_sp;
1975 }
1976
1978
1979 // Methods.
1981 GetSearchFilterForModule(const FileSpec *containingModule);
1982
1984 GetSearchFilterForModuleList(const FileSpecList *containingModuleList);
1985
1987 GetSearchFilterForModuleAndCUList(const FileSpecList *containingModules,
1988 const FileSpecList *containingSourceFiles);
1989
1991 const char *repl_options, bool can_create);
1992
1993 void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp);
1994
1998
2000
2001 /// Get the list of paths that LLDB will consider automatically loading
2002 /// scripting resources from. Currently whether to load scripts
2003 /// unconditionally is controlled via the
2004 /// `target.load-script-from-symbol-file` setting.
2006
2007 /// Add a signal for the target. This will get copied over to the process
2008 /// if the signal exists on that target. Only the values with Yes and No are
2009 /// set, Calculate values will be ignored.
2010protected:
2019 using DummySignalElement = llvm::StringMapEntry<DummySignalValues>;
2020 static bool UpdateSignalFromDummy(lldb::UnixSignalsSP signals_sp,
2021 const DummySignalElement &element);
2022 static bool ResetSignalFromDummy(lldb::UnixSignalsSP signals_sp,
2023 const DummySignalElement &element);
2024
2025public:
2026 /// Add a signal to the Target's list of stored signals/actions. These
2027 /// values will get copied into any processes launched from
2028 /// this target.
2029 void AddDummySignal(llvm::StringRef name, LazyBool pass, LazyBool print,
2030 LazyBool stop);
2031 /// Updates the signals in signals_sp using the stored dummy signals.
2032 /// If warning_stream_sp is not null, if any stored signals are not found in
2033 /// the current process, a warning will be emitted here.
2035 lldb::StreamSP warning_stream_sp);
2036 /// Clear the dummy signals in signal_names from the target, or all signals
2037 /// if signal_names is empty. Also remove the behaviors they set from the
2038 /// process's signals if it exists.
2039 void ClearDummySignals(Args &signal_names);
2040 /// Print all the signals set in this target.
2041 void PrintDummySignals(Stream &strm, Args &signals);
2042
2043protected:
2044 /// Implementing of ModuleList::Notifier.
2045
2046 void NotifyModuleAdded(const ModuleList &module_list,
2047 const lldb::ModuleSP &module_sp) override;
2048
2049 void NotifyModuleRemoved(const ModuleList &module_list,
2050 const lldb::ModuleSP &module_sp) override;
2051
2052 void NotifyModuleUpdated(const ModuleList &module_list,
2053 const lldb::ModuleSP &old_module_sp,
2054 const lldb::ModuleSP &new_module_sp) override;
2055
2056 void NotifyWillClearList(const ModuleList &module_list) override;
2057
2058 void NotifyModulesRemoved(lldb_private::ModuleList &module_list) override;
2059
2060 class Arch {
2061 public:
2062 explicit Arch(const ArchSpec &spec);
2063 const Arch &operator=(const ArchSpec &spec);
2064
2065 const ArchSpec &GetSpec() const { return m_spec; }
2066 Architecture *GetPlugin() const { return m_plugin_up.get(); }
2067
2068 private:
2070 std::unique_ptr<Architecture> m_plugin_up;
2071 };
2072
2073 // Member variables.
2075 lldb::PlatformSP m_platform_sp; ///< The platform for this target.
2076 std::recursive_mutex m_mutex; ///< An API mutex that is used by the lldb::SB*
2077 /// classes make the SB interface thread safe
2078 /// When the private state thread calls SB API's - usually because it is
2079 /// running OS plugin or Python ThreadPlan code - it should not block on the
2080 /// API mutex that is held by the code that kicked off the sequence of events
2081 /// that led us to run the code. We hand out this mutex instead when we
2082 /// detect that code is running on the private state thread.
2083 std::recursive_mutex m_private_mutex;
2085 std::string m_label;
2086 ModuleList m_images; ///< The list of images for this process (shared
2087 /// libraries and anything dynamically loaded).
2092 using BreakpointNameMap = llvm::StringMap<std::unique_ptr<BreakpointName>>;
2094
2095 std::map<lldb::user_id_t, BreakpointResolverOverrideUP>
2097 /// This is the ID that will be handed out for the next added breakpoint
2098 /// override resolver for this target.
2100
2104 // We want to tightly control the process destruction process so we can
2105 // correctly tear down everything that we need to, so the only class that
2106 // knows about the process lifespan is this target class.
2111
2112 /// Map of scripted frame provider descriptors for this target.
2113 /// Keys are the provider descriptor IDs, values are the descriptors.
2114 /// Insertion order is preserved so that equal-priority providers chain
2115 /// in registration order.
2116 llvm::MapVector<uint32_t, ScriptedFrameProviderDescriptor>
2118 mutable std::recursive_mutex m_frame_provider_descriptors_mutex;
2120
2121 typedef std::map<lldb::LanguageType, lldb::REPLSP> REPLMap;
2123
2125
2126 typedef std::map<lldb::user_id_t, StopHookSP> StopHookCollection;
2129 std::vector<StopHookSP> m_internal_stop_hooks;
2130 uint32_t m_latest_stop_hook_id; /// This records the last natural stop at
2131 /// which we ran a stop-hook.
2133 bool m_suppress_stop_hooks; /// Used to not run stop hooks for expressions
2135
2136 typedef std::map<lldb::user_id_t, HookSP> HookCollection;
2141 LLDB_INVALID_GLOBALLY_UNIQUE_TARGET_ID; ///< The globally unique ID
2142 /// assigned to this target
2143 std::string m_target_session_name; ///< The target session name for this
2144 /// target, used to name debugging
2145 /// sessions in DAP.
2146 /// An optional \a lldb_private::Trace object containing processor trace
2147 /// information of this target.
2149 /// Stores the frame recognizers of this target.
2151 /// These are used to set the signal state when you don't have a process and
2152 /// more usefully in the Dummy target where you can't know exactly what
2153 /// signals you will have.
2154 llvm::StringMap<DummySignalValues> m_dummy_signals;
2155
2157
2158 static void ImageSearchPathsChanged(const PathMappingList &path_list,
2159 void *baton);
2160
2161 // Utilities for `statistics` command.
2162private:
2163 // Target metrics storage.
2165
2166public:
2167 /// Get metrics associated with this target in JSON format.
2168 ///
2169 /// Target metrics help measure timings and information that is contained in
2170 /// a target. These are designed to help measure performance of a debug
2171 /// session as well as represent the current state of the target, like
2172 /// information on the currently modules, currently set breakpoints and more.
2173 ///
2174 /// \return
2175 /// Returns a JSON value that contains all target metrics.
2176 llvm::json::Value
2178
2179 void ResetStatistics();
2180
2182
2183protected:
2184 /// Construct with optional file and arch.
2185 ///
2186 /// This member is private. Clients must use
2187 /// TargetList::CreateTarget(const FileSpec*, const ArchSpec*)
2188 /// so all targets can be tracked from the central target list.
2189 ///
2190 /// \see TargetList::CreateTarget(const FileSpec*, const ArchSpec*)
2191 Target(Debugger &debugger, const ArchSpec &target_arch,
2192 const lldb::PlatformSP &platform_sp, bool is_dummy_target);
2193
2194 // Helper function.
2195 bool ProcessIsValid();
2196
2197 // Copy breakpoints, stop hooks and so forth from the dummy target:
2198 void PrimeFromDummyTarget(Target &target);
2199
2200 void AddBreakpoint(lldb::BreakpointSP breakpoint_sp, bool internal);
2201
2203
2204 /// Return a recommended size for memory reads at \a addr, optimizing for
2205 /// cache usage.
2207
2208 Target(const Target &) = delete;
2209 const Target &operator=(const Target &) = delete;
2210
2212 return m_section_load_history.GetCurrentSectionLoadList();
2213 }
2214};
2215
2216} // namespace lldb_private
2217
2218#endif // LLDB_TARGET_TARGET_H
static llvm::raw_ostream & error(Stream &strm)
A section + offset based address class.
Definition Address.h:62
An architecture specification class.
Definition ArchSpec.h:32
A command line argument class.
Definition Args.h:33
General Outline: Allows adding and removing breakpoints and find by ID and index.
"lldb/Breakpoint/BreakpointOptions.h" Class that manages the options on a breakpoint or breakpoint lo...
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
Definition Breakpoint.h:83
Broadcaster(lldb::BroadcasterManagerSP manager_sp, std::string name)
Construct with a broadcaster with a name.
Generic representation of a type in a programming language.
A uniqued constant string class.
Definition ConstString.h:40
A class to manage flag bits.
Definition Debugger.h:100
void SetPreferredSymbolContexts(SymbolContextList contexts)
Definition Target.h:364
void SetOneThreadTimeout(const Timeout< std::micro > &timeout)
Definition Target.h:423
void SetUnwindOnError(bool unwind=false)
Definition Target.h:396
SourceLanguage GetLanguage() const
Definition Target.h:358
const char * GetPoundLineFilePath() const
Definition Target.h:486
lldb::DynamicValueType m_use_dynamic
Definition Target.h:554
void SetExecutionPolicy(ExecutionPolicy policy=eExecutionPolicyAlways)
Definition Target.h:354
Timeout< std::micro > m_one_thread_timeout
Definition Target.h:556
bool InvokeCancelCallback(lldb::ExpressionEvaluationPhase phase) const
Definition Target.h:468
lldb::DynamicValueType GetUseDynamic() const
Definition Target.h:408
void SetKeepInMemory(bool keep=true)
Definition Target.h:406
void SetCoerceToId(bool coerce=true)
Definition Target.h:392
void SetLanguage(lldb::LanguageType language_type)
Definition Target.h:360
ExecutionPolicy GetExecutionPolicy() const
Definition Target.h:352
Timeout< std::micro > m_timeout
Definition Target.h:555
void SetCppIgnoreContextQualifiers(bool value)
Definition Target.cpp:6123
const StructuredData::Dictionary & GetLanguageOptions() const
Definition Target.cpp:6101
llvm::Expected< bool > GetBooleanLanguageOption(llvm::StringRef option_name) const
Get the language-plugin specific boolean option called option_name.
Definition Target.cpp:6085
void SetPrefix(const char *prefix)
Definition Target.h:385
void SetTryAllThreads(bool try_others=true)
Definition Target.h:429
static constexpr std::chrono::milliseconds default_timeout
Definition Target.h:344
void SetPoundLine(const char *path, uint32_t line) const
Definition Target.h:476
void SetRetriesWithFixIts(uint64_t number_of_retries)
Definition Target.h:502
SymbolContextList m_preferred_lookup_contexts
During expression evaluation, any SymbolContext in this list will be used for symbol/function lookup ...
Definition Target.h:572
void SetTimeout(const Timeout< std::micro > &timeout)
Definition Target.h:417
static constexpr ExecutionPolicy default_execution_policy
Definition Target.h:349
void SetStopOthers(bool stop_others=true)
Definition Target.h:433
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:552
llvm::Error SetBooleanLanguageOption(llvm::StringRef option_name, bool value)
Set language-plugin specific option called option_name to the specified boolean value.
Definition Target.cpp:6068
StructuredData::DictionarySP m_language_options_sp
Dictionary mapping names of language-plugin specific options to values.
Definition Target.h:567
void SetCancelCallback(lldb::ExpressionCancelCallback callback, void *baton)
Definition Target.h:463
const Timeout< std::micro > & GetTimeout() const
Definition Target.h:415
const SymbolContextList & GetPreferredSymbolContexts() const
Definition Target.h:368
void SetIgnoreBreakpoints(bool ignore=false)
Definition Target.h:400
void SetLanguage(uint16_t name, uint32_t version)
Set the language using a pair of language code and version as defined by the DWARF 6 specification.
Definition Target.h:375
void SetUseDynamic(lldb::DynamicValueType dynamic=lldb::eDynamicCanRunTarget)
Definition Target.h:411
lldb::ExpressionCancelCallback m_cancel_callback
Definition Target.h:557
const Timeout< std::micro > & GetOneThreadTimeout() const
Definition Target.h:419
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A file collection class.
A file utility class.
Definition FileSpec.h:57
Encapsulates a function that can be called.
A collection class for Module objects.
Definition ModuleList.h:125
A class that describes an executable image and its associated object and symbol files.
Definition Module.h:91
Class that provides a registry of known stack frame recognizers.
An error handling class.
Definition Status.h:118
A stream class that can stream formatted output to a file.
Definition Stream.h:28
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
Definition Stream.cpp:157
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition Stream.cpp:134
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Object > ObjectSP
A class that wraps a std::map of SummaryStatistics objects behind a mutex.
Definition Statistics.h:281
Defines a list of symbol context objects.
Defines a symbol context baton that can be handed other debug core functions.
uint32_t GetMaximumSizeOfStringSummary() const
Definition Target.cpp:5599
FileSpecList GetDebugFileSearchPaths()
Definition Target.cpp:5480
llvm::StringRef GetLaunchWorkingDirectory() const
Definition Target.cpp:5286
bool GetDisplayRecognizedArguments() const
Definition Target.cpp:5763
ImportStdModule GetImportStdModule() const
Definition Target.cpp:5496
void AppendExecutableSearchPaths(const FileSpec &)
Definition Target.cpp:5467
bool GetEnableSyntheticValue() const
Definition Target.cpp:5566
void SetStandardInputPath(const char *path)=delete
ProcessLaunchInfo m_launch_info
Definition Target.h:327
bool GetCheckValueObjectOwnership() const
Definition Target.cpp:5891
uint64_t GetExprAllocAlign() const
Definition Target.cpp:5678
MemoryModuleLoadLevel GetMemoryModuleLoadLevel() const
Definition Target.cpp:5735
llvm::StringRef GetArg0() const
Definition Target.cpp:5339
uint32_t GetMaximumMemReadSize() const
Definition Target.cpp:5605
void SetRunArguments(const Args &args)
Definition Target.cpp:5356
FileSpec GetStandardErrorPath() const
Definition Target.cpp:5631
void SetLoadScriptFromSymbolFile(LoadScriptFromSymFile load_style)
Set the target-wide target.load-script-from-symbol-file setting.
Definition Target.cpp:5715
bool GetEnableNotifyAboutFixIts() const
Definition Target.cpp:5522
bool SetPreferDynamicValue(lldb::DynamicValueType d)
Definition Target.cpp:5223
void SetDisplayRecognizedArguments(bool b)
Definition Target.cpp:5769
std::optional< bool > GetExperimentalPropertyValue(size_t prop_idx, ExecutionContext *exe_ctx=nullptr) const
Definition Target.cpp:5162
const ProcessLaunchInfo & GetProcessLaunchInfo() const
Definition Target.cpp:5774
Environment ComputeEnvironment() const
Definition Target.cpp:5362
void SetStandardOutputPath(const char *path)=delete
bool GetUserSpecifiedTrapHandlerNames(Args &args) const
Definition Target.cpp:5742
uint64_t GetExprErrorLimit() const
Definition Target.cpp:5660
bool GetEnableAutoImportClangModules() const
Definition Target.cpp:5490
bool GetDebugUtilityExpression() const
Definition Target.cpp:5880
DynamicClassInfoHelper GetDynamicClassInfoHelper() const
Definition Target.cpp:5503
FileSpec GetStandardOutputPath() const
Definition Target.cpp:5621
void SetDisplayRuntimeSupportValues(bool b)
Definition Target.cpp:5758
uint32_t GetMaximumNumberOfChildrenToDisplay() const
Definition Target.cpp:5584
void SetRequireHardwareBreakpoints(bool b)
Definition Target.cpp:5812
bool GetAutoInstallMainExecutable() const
Definition Target.cpp:5817
const char * GetDisassemblyFeatures() const
Definition Target.cpp:5318
void SetAutoLoadScriptsForModule(llvm::StringRef module_name, LoadScriptFromSymFile load_style)
Set the LoadScriptFromSymFile for a module called module_name (excluding file extension).
Definition Target.cpp:5917
RealpathPrefixes GetSourceRealpathPrefixes() const
Definition Target.cpp:5334
void SetCheckValueObjectOwnership(bool check)
Definition Target.cpp:5897
uint64_t GetNumberOfRetriesWithFixits() const
Definition Target.cpp:5516
uint64_t GetExprAllocSize() const
Definition Target.cpp:5672
std::optional< LoadScriptFromSymFile > GetAutoLoadScriptsForModule(llvm::StringRef module_name) const
Definition Target.cpp:5903
llvm::StringRef GetExpressionPrefixContents()
Definition Target.cpp:5646
PathMappingList & GetObjectPathMap() const
Definition Target.cpp:5453
const char * GetDisassemblyFlavor() const
Definition Target.cpp:5298
FileSpec GetStandardInputPath() const
Definition Target.cpp:5611
lldb::DynamicValueType GetPreferDynamicValue() const
Definition Target.cpp:5216
InlineStrategy GetInlineStrategy() const
Definition Target.cpp:5325
Environment GetTargetEnvironment() const
Definition Target.cpp:5422
bool GetDisplayRuntimeSupportValues() const
Definition Target.cpp:5752
void SetUserSpecifiedTrapHandlerNames(const Args &args)
Definition Target.cpp:5747
uint32_t GetMaxZeroPaddingInFloatFormat() const
Definition Target.cpp:5578
uint64_t GetExprAllocAddress() const
Definition Target.cpp:5666
LoadCWDlldbinitFile GetLoadCWDlldbinitFile() const
Definition Target.cpp:5721
Environment GetInheritedEnvironment() const
Definition Target.cpp:5394
void SetArg0(llvm::StringRef arg)
Definition Target.cpp:5345
bool GetInjectLocalVariables(ExecutionContext *exe_ctx) const
Definition Target.cpp:5173
void SetStandardErrorPath(const char *path)=delete
bool ShowHexVariableValuesWithLeadingZeroes() const
Definition Target.cpp:5572
SourceLanguage GetLanguage() const
Definition Target.cpp:5641
Environment GetEnvironment() const
Definition Target.cpp:5390
void SetProcessLaunchInfo(const ProcessLaunchInfo &launch_info)
Definition Target.cpp:5778
FileSpec GetSaveJITObjectsDir() const
Definition Target.cpp:5528
void SetEnvironment(Environment env)
Definition Target.cpp:5433
LoadScriptFromSymFile GetLoadScriptFromSymbolFile() const
Definition Target.cpp:5708
const char * GetDisassemblyCPU() const
Definition Target.cpp:5311
void SetStandardErrorPath(llvm::StringRef path)
Definition Target.cpp:5636
bool GetRunArguments(Args &args) const
Definition Target.cpp:5351
FileSpecList GetExecutableSearchPaths()
Definition Target.cpp:5475
ArchSpec GetDefaultArchitecture() const
Definition Target.cpp:5200
Disassembler::HexImmediateStyle GetHexImmediateStyle() const
Definition Target.cpp:5728
void SetUseDIL(ExecutionContext *exe_ctx, bool b)
Definition Target.cpp:5191
std::unique_ptr< TargetExperimentalProperties > m_experimental_properties_up
Definition Target.h:328
FileSpecList GetClangModuleSearchPaths()
Definition Target.cpp:5485
void SetStandardOutputPath(llvm::StringRef path)
Definition Target.cpp:5626
bool GetRequireHardwareBreakpoints() const
Definition Target.cpp:5806
PathMappingList & GetSourcePathMap() const
Definition Target.cpp:5445
bool GetAutoSourceMapRelative() const
Definition Target.cpp:5461
bool GetUseDIL(ExecutionContext *exe_ctx) const
Definition Target.cpp:5179
void SetDefaultArchitecture(const ArchSpec &arch)
Definition Target.cpp:5205
void SetStandardInputPath(llvm::StringRef path)
Definition Target.cpp:5616
TargetProperties(Target *target)
Definition Target.cpp:5086
bool GetDisplayExpressionsInCrashlogs() const
Definition Target.cpp:5702
bool GetEnableAutoApplyFixIts() const
Definition Target.cpp:5510
void SetDebugUtilityExpression(bool debug)
Definition Target.cpp:5886
std::pair< uint32_t, bool > GetMaximumDepthOfChildrenToDisplay() const
Get the max depth value, augmented with a bool to indicate whether the depth is the default.
Definition Target.cpp:5591
A class that represents statistics for a since lldb_private::Target.
Definition Statistics.h:309
std::unique_ptr< Architecture > m_plugin_up
Definition Target.h:2070
const ArchSpec & GetSpec() const
Definition Target.h:2065
const Arch & operator=(const ArchSpec &spec)
Definition Target.cpp:169
Arch(const ArchSpec &spec)
Definition Target.cpp:165
Architecture * GetPlugin() const
Definition Target.h:2066
virtual BreakpointResolverOverrideUP CopyIntoNewTarget(Target &target)=0
BreakpointResolverOverride(Target &target, const std::string &description, uint64_t type_mask)
Definition Target.h:1024
virtual lldb::BreakpointResolverSP CheckForOverride(Target &target, lldb::BreakpointResolverSP initial_sp)=0
void AddTrigger(uint32_t trigger)
Add a trigger to the mask. trigger is a single TriggerBit value.
Definition Target.h:1861
void RemoveTrigger(uint32_t trigger)
Remove a trigger from the mask. trigger is a single TriggerBit value.
Definition Target.h:1864
void GetDescription(Stream &s, lldb::DescriptionLevel level) const override
Definition Target.cpp:4521
HookCommandLine(lldb::TargetSP target_sp, lldb::user_id_t uid)
Definition Target.h:1884
void SetTriggerMask(uint32_t mask)
Replace the trigger mask. mask is a bitwise OR of TriggerBit values.
Definition Target.h:1858
void SetActionFromString(const std::string &string)
Populate the command list by splitting a single string on newlines.
Definition Target.cpp:4548
void SetActionFromStrings(const std::vector< std::string > &strings)
Populate the command list from a vector of individual command strings.
Definition Target.cpp:4552
void HandleModuleLoaded(lldb::StreamSP output) override
Definition Target.cpp:4558
StringList & GetCommands()
Return the list of commands that this hook runs.
Definition Target.h:1867
StopHook::StopHookResult HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP output) override
Called when the process stops.
Definition Target.cpp:4598
void HandleModuleUnloaded(lldb::StreamSP output) override
Definition Target.cpp:4592
llvm::StringRef GetScriptClassName() const
Definition Target.cpp:4712
Status SetScriptCallback(const ScriptedMetadata &scripted_metadata)
Definition Target.cpp:4633
void HandleModuleLoaded(lldb::StreamSP output) override
Definition Target.cpp:4675
StopHook::StopHookResult HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP output) override
Called when the process stops.
Definition Target.cpp:4694
HookScripted(lldb::TargetSP target_sp, lldb::user_id_t uid)
Definition Target.h:1907
void GetDescription(Stream &s, lldb::DescriptionLevel level) const override
Definition Target.cpp:4718
lldb::ScriptedHookInterfaceSP m_interface_sp
Definition Target.h:1905
void HandleModuleUnloaded(lldb::StreamSP output) override
Definition Target.cpp:4684
virtual ~Hook()=default
void SetSuppressOutput(bool suppress_output)
Definition Target.h:1812
bool GetRunAtInitialStop() const
Definition Target.h:1803
ThreadSpec * GetThreadSpecifier()
Definition Target.h:1798
TriggerBit
Individual trigger bits. Combine with bitwise OR to form a trigger mask.
Definition Target.h:1768
bool GetSuppressOutput() const
Definition Target.h:1815
void SetRunAtInitialStop(bool at_initial_stop)
Definition Target.h:1800
lldb::SymbolContextSpecifierSP m_sc_specifier_sp
Definition Target.h:1842
void SetIsEnabled(bool enabled)
Definition Target.h:1777
bool ExecutionContextPasses(const ExecutionContext &exe_ctx)
Check if the execution context passes the specifier and thread spec filters.
Definition Target.cpp:4444
HookKind GetHookKind() const
Definition Target.h:1764
Hook(const Hook &rhs)
Definition Target.cpp:4425
virtual StopHook::StopHookResult HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP output)
Called when the process stops.
Definition Target.h:1824
void GetFilterDescription(Stream &s, lldb::DescriptionLevel level) const
Print the filter portion of the description (AutoContinue, Specifier, ThreadSpec).
Definition Target.cpp:4493
void SetAutoContinue(bool auto_continue)
Definition Target.h:1807
bool GetAutoContinue() const
Definition Target.h:1810
virtual void HandleModuleUnloaded(lldb::StreamSP output)
Definition Target.h:1820
uint32_t GetTriggerMask() const
Return the bitmask of triggers this hook responds to.
Definition Target.h:1781
lldb::TargetSP & GetTarget()
Definition Target.h:1774
SymbolContextSpecifier * GetSCSpecifier()
Definition Target.h:1790
lldb::TargetSP m_target_sp
Definition Target.h:1836
virtual void GetDescription(Stream &s, lldb::DescriptionLevel level) const
Definition Target.cpp:4460
void SetSCSpecifier(SymbolContextSpecifier *specifier)
Set the symbol context specifier. The hook takes ownership.
Definition Target.cpp:4436
void SetThreadSpecifier(ThreadSpec *specifier)
Set the thread specifier. The hook takes ownership.
Definition Target.cpp:4440
virtual void HandleModuleLoaded(lldb::StreamSP output)
Definition Target.h:1819
bool FiresOn(uint32_t trigger) const
Return true if this hook fires on the given trigger.
Definition Target.h:1784
std::unique_ptr< ThreadSpec > m_thread_spec_up
Definition Target.h:1843
void GetSubclassDescription(Stream &s, lldb::DescriptionLevel level) const override
Definition Target.h:1721
HandleStopCallback * m_callback
Definition Target.h:1729
StopHookResult HandleStop(ExecutionContext &exc_ctx, lldb::StreamSP output) override
Definition Target.h:1716
StopHookCoded(lldb::TargetSP target_sp, lldb::user_id_t uid)
Use CreateStopHook to make a new empty stop hook.
Definition Target.h:1734
void SetCallback(llvm::StringRef name, HandleStopCallback *callback)
Definition Target.h:1711
StopHookResult(ExecutionContext &exc_ctx, lldb::StreamSP output) HandleStopCallback
Definition Target.h:1708
void SetActionFromString(const std::string &strings)
Definition Target.cpp:4272
StopHookCommandLine(lldb::TargetSP target_sp, lldb::user_id_t uid)
Definition Target.h:1675
void SetActionFromStrings(const std::vector< std::string > &strings)
Definition Target.cpp:4276
StopHookResult HandleStop(ExecutionContext &exc_ctx, lldb::StreamSP output_sp) override
Definition Target.cpp:4283
void GetSubclassDescription(Stream &s, lldb::DescriptionLevel level) const override
Definition Target.cpp:4254
lldb::ScriptedHookInterfaceSP m_interface_sp
Definition Target.h:1694
StopHookResult HandleStop(ExecutionContext &exc_ctx, lldb::StreamSP output) override
Definition Target.cpp:4355
Status SetScriptCallback(const ScriptedMetadata &scripted_metadata)
Definition Target.cpp:4318
StopHookScripted(lldb::TargetSP target_sp, lldb::user_id_t uid)
Use CreateStopHook to make a new empty stop hook.
Definition Target.h:1699
void GetSubclassDescription(Stream &s, lldb::DescriptionLevel level) const override
Definition Target.cpp:4383
llvm::StringRef GetScriptClassName() const
Definition Target.cpp:4377
bool GetRunAtInitialStop() const
Definition Target.h:1633
SymbolContextSpecifier * GetSpecifier()
Definition Target.h:1602
void SetSpecifier(SymbolContextSpecifier *specifier)
Definition Target.cpp:4192
virtual StopHookResult HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP output)=0
std::unique_ptr< ThreadSpec > m_thread_spec_up
Definition Target.h:1648
void SetIsActive(bool is_active)
Definition Target.h:1621
void SetSuppressOutput(bool suppress_output)
Definition Target.h:1635
void SetThreadSpecifier(ThreadSpec *specifier)
Definition Target.cpp:4196
ThreadSpec * GetThreadSpecifier()
Definition Target.h:1617
StopHook(const StopHook &rhs)
Definition Target.cpp:4184
bool ExecutionContextPasses(const ExecutionContext &exe_ctx)
Definition Target.cpp:4200
lldb::TargetSP & GetTarget()
Definition Target.h:1596
void SetRunAtInitialStop(bool at_initial_stop)
Definition Target.h:1629
lldb::SymbolContextSpecifierSP m_specifier_sp
Definition Target.h:1647
virtual void GetSubclassDescription(Stream &s, lldb::DescriptionLevel level) const =0
void GetDescription(Stream &s, lldb::DescriptionLevel level) const
Definition Target.cpp:4216
void SetAutoContinue(bool auto_continue)
Definition Target.h:1623
const ModuleList & GetModuleList() const
Definition Target.h:646
void Dump(Stream *s) const override
Definition Target.cpp:5949
static llvm::StringRef GetFlavorString()
Definition Target.cpp:5945
static lldb::TargetSP GetCreatedTargetFromEvent(const Event *event_ptr)
Definition Target.cpp:5978
static ModuleList GetModuleListFromEvent(const Event *event_ptr)
Definition Target.cpp:5987
static const TargetEventData * GetEventDataFromEvent(const Event *event_ptr)
Definition Target.cpp:5959
llvm::StringRef GetFlavor() const override
Definition Target.h:624
const lldb::TargetSP & GetTarget() const
Definition Target.h:640
TargetEventData(const lldb::TargetSP &target_sp)
Definition Target.cpp:5931
TargetEventData(const TargetEventData &)=delete
const lldb::TargetSP & GetCreatedTarget() const
Definition Target.h:642
const TargetEventData & operator=(const TargetEventData &)=delete
static lldb::TargetSP GetTargetFromEvent(const Event *event_ptr)
Definition Target.cpp:5969
void ModulesDidLoad(ModuleList &module_list)
This call may preload module symbols, and may do so in parallel depending on the following target set...
Definition Target.cpp:1940
lldb::ThreadSP CalculateThread() override
Definition Target.cpp:2683
llvm::Expected< uint32_t > AddScriptedFrameProviderDescriptor(const ScriptedFrameProviderDescriptor &descriptor)
Add or update a scripted frame provider descriptor for this target.
Definition Target.cpp:3882
StopHookCollection m_stop_hooks
Definition Target.h:2127
Module * GetExecutableModulePointer()
Definition Target.cpp:1640
void Dump(Stream *s, lldb::DescriptionLevel description_level)
Dump a description of this object to a Stream.
Definition Target.cpp:258
void DisableAllBreakpoints(bool internal_also=false)
Definition Target.cpp:1172
bool RemoveHookByID(lldb::user_id_t uid)
Definition Target.cpp:4780
lldb::WatchpointSP CreateWatchpoint(lldb::addr_t addr, size_t size, const CompilerType *type, uint32_t kind, Status &error)
Definition Target.cpp:1054
void ApplyNameToBreakpoints(BreakpointName &bp_name)
Definition Target.cpp:931
lldb::user_id_t m_hook_next_id
Definition Target.h:2138
lldb::TraceSP GetTrace()
Get the Trace object containing processor trace information of this target.
Definition Target.cpp:3757
PathMappingList & GetImageSearchPathList()
Definition Target.cpp:2692
void FinalizeFileActions(ProcessLaunchInfo &info)
Definition Target.cpp:3964
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:3091
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:3099
ModuleList & GetImages()
Definition Target.h:1245
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:776
static Target * GetTargetFromContexts(const ExecutionContext *exe_ctx_ptr, const SymbolContext *sc_ptr)
Definition Target.cpp:2926
lldb::addr_t GetBreakableLoadAddress(lldb::addr_t addr)
Definition Target.cpp:3106
llvm::StringMap< std::unique_ptr< BreakpointName > > BreakpointNameMap
Definition Target.h:2092
void ClearDummySignals(Args &signal_names)
Clear the dummy signals in signal_names from the target, or all signals if signal_names is empty.
Definition Target.cpp:4124
bool SetSuppresStopHooks(bool suppress)
Definition Target.h:1951
static void ImageSearchPathsChanged(const PathMappingList &path_list, void *baton)
Definition Target.cpp:2696
llvm::Expected< lldb_private::Address > GetEntryPointAddress()
This method will return the address of the starting function for this binary, e.g.
Definition Target.cpp:3057
bool IgnoreWatchpointByID(lldb::watch_id_t watch_id, uint32_t ignore_count)
Definition Target.cpp:1608
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:742
size_t GetNumHooks() const
Definition Target.h:1931
lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id)
Definition Target.cpp:437
std::shared_ptr< StopHook > StopHookSP
Definition Target.h:1741
llvm::StringRef GetBroadcasterClass() const override
This needs to be filled in if you are going to register the broadcaster with the broadcaster manager ...
Definition Target.h:600
void SymbolsDidLoad(ModuleList &module_list)
Definition Target.cpp:1968
bool ClearAllWatchpointHistoricValues()
Definition Target.cpp:1522
const std::vector< StopHookSP > GetStopHooks(bool internal=false) const
Definition Target.cpp:3220
void SetTrace(const lldb::TraceSP &trace_sp)
Set the Trace object containing processor trace information of this target.
Definition Target.cpp:3755
BreakpointList & GetBreakpointList(bool internal=false)
Definition Target.cpp:423
uint32_t m_next_frame_provider_id
Definition Target.h:2119
CompilerType GetRegisterType(const std::string &name, const lldb_private::RegisterFlags &flags, uint32_t byte_size)
Definition Target.cpp:2732
lldb_private::SummaryStatisticsCache & GetSummaryStatisticsCache()
Definition Target.cpp:3572
const llvm::MapVector< uint32_t, ScriptedFrameProviderDescriptor > & GetScriptedFrameProviderDescriptors() const
Get all scripted frame provider descriptors for this target.
Definition Target.cpp:3943
lldb::addr_t GetSectionLoadAddress(const lldb::SectionSP &section_sp)
Definition Target.cpp:6013
llvm::StringRef GetABIName() const
Returns the name of the target's ABI plugin.
Definition Target.cpp:412
SourceManager & GetSourceManager()
Definition Target.cpp:3144
lldb::SearchFilterSP GetSearchFilterForModuleList(const FileSpecList *containingModuleList)
Definition Target.cpp:705
StopHookSP GetStopHookByID(lldb::user_id_t uid)
Definition Target.cpp:3186
llvm::StringMap< DummySignalValues > m_dummy_signals
These are used to set the signal state when you don't have a process and more usefully in the Dummy t...
Definition Target.h:2154
lldb::user_id_t AddBreakpointResolverOverride(BreakpointResolverOverrideUP override_up)
Add a breakpoint override resolver. This version can't fail.
Definition Target.h:1047
lldb::ProcessSP m_process_sp
Definition Target.h:2107
Debugger & GetDebugger() const
Definition Target.h:1326
lldb::SearchFilterSP m_search_filter_sp
Definition Target.h:2108
PersistentExpressionState * GetPersistentExpressionStateForLanguage(lldb::LanguageType language)
Definition Target.cpp:2776
void UpdateSignalsFromDummy(lldb::UnixSignalsSP signals_sp, lldb::StreamSP warning_stream_sp)
Updates the signals in signals_sp using the stored dummy signals.
Definition Target.cpp:4112
bool m_is_dummy_target
Used to not run stop hooks for expressions.
Definition Target.h:2134
static bool UpdateSignalFromDummy(lldb::UnixSignalsSP signals_sp, const DummySignalElement &element)
Definition Target.cpp:4070
PathMappingList m_image_search_paths
Definition Target.h:2109
bool ModuleIsExcludedForUnconstrainedSearches(const FileSpec &module_spec)
Return whether this FileSpec corresponds to a module that should be considered for general searches.
Definition Target.cpp:2026
lldb::StackFrameSP CalculateStackFrame() override
Definition Target.cpp:2685
SectionLoadList & GetSectionLoadList()
Definition Target.h:2211
lldb::addr_t GetPersistentSymbol(ConstString name)
Definition Target.cpp:3037
void PrimeFromDummyTarget(Target &target)
Definition Target.cpp:225
bool RemoveScriptedFrameProviderDescriptor(uint32_t id)
Remove a scripted frame provider descriptor by id.
Definition Target.cpp:3918
lldb::RegisterTypeBuilderSP m_register_type_builder_sp
Definition Target.h:2156
static void SettingsTerminate()
Definition Target.cpp:2888
bool EnableWatchpointByID(lldb::watch_id_t watch_id)
Definition Target.cpp:1573
void DeleteBreakpointName(llvm::StringRef name)
Definition Target.cpp:908
HookSP CreateHook(Hook::HookKind kind)
Definition Target.cpp:4758
bool ResolveFileAddress(lldb::addr_t load_addr, Address &so_addr)
Definition Target.cpp:3488
bool ClearAllWatchpointHitCounts()
Definition Target.cpp:1508
size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len, Status &error)
Definition Target.cpp:2058
void ClearAllLoadedSections()
Definition Target.cpp:3564
std::vector< lldb::TypeSystemSP > GetScratchTypeSystems(bool create_on_demand=true)
Definition Target.cpp:2742
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:2356
void AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name, Status &error)
Definition Target.cpp:853
void DumpSectionLoadList(Stream &s)
Definition Target.cpp:6019
void DeleteCurrentProcess()
Definition Target.cpp:294
BreakpointList m_internal_breakpoint_list
Definition Target.h:2091
int64_t ReadSignedIntegerFromMemory(const Address &addr, size_t integer_byte_size, int64_t fail_value, Status &error, bool force_live_memory=false)
Definition Target.cpp:2387
void DisableAllowedBreakpoints()
Definition Target.cpp:1182
bool SetHookEnabledStateByID(lldb::user_id_t uid, bool enabled)
Definition Target.cpp:4802
bool LoadScriptingResources(std::list< Status > &errors, bool continue_on_error=true)
Definition Target.h:1220
bool SetSectionUnloaded(const lldb::SectionSP &section_sp)
Definition Target.cpp:3542
lldb::TargetSP CalculateTarget() override
Definition Target.cpp:2679
const lldb::ProcessSP & GetProcessSP() const
Definition Target.cpp:328
void ClearModules(bool delete_locations)
Definition Target.cpp:1644
void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, llvm::StringRef name)
Definition Target.cpp:918
BreakpointNameMap m_breakpoint_names
Definition Target.h:2093
bool RemoveBreakpointByID(lldb::break_id_t break_id)
Definition Target.cpp:1206
llvm::MapVector< uint32_t, ScriptedFrameProviderDescriptor > m_frame_provider_descriptors
Map of scripted frame provider descriptors for this target.
Definition Target.h:2117
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:2439
static bool ResetSignalFromDummy(lldb::UnixSignalsSP signals_sp, const DummySignalElement &element)
Definition Target.cpp:4097
Architecture * GetArchitecturePlugin() const
Definition Target.h:1324
llvm::json::Value ReportStatistics(const lldb_private::StatisticsOptions &options)
Get metrics associated with this target in JSON format.
Definition Target.cpp:6005
friend class TargetList
Definition Target.h:582
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:2829
TargetStats & GetStatistics()
Definition Target.h:2181
void EnableAllBreakpoints(bool internal_also=false)
Definition Target.cpp:1189
Status Launch(ProcessLaunchInfo &launch_info, Stream *stream)
Definition Target.cpp:3587
bool DisableBreakpointByID(lldb::break_id_t break_id)
Definition Target.cpp:1226
lldb::BreakpointSP CreateBreakpointAtUserEntry(Status &error)
Definition Target.cpp:449
std::map< lldb::user_id_t, StopHookSP > StopHookCollection
Definition Target.h:2126
llvm::Expected< lldb::TraceSP > CreateTrace()
Create a Trace object for the current target using the using the default supported tracing technology...
Definition Target.cpp:3759
lldb::TraceSP m_trace_sp
An optional lldb_private::Trace object containing processor trace information of this target.
Definition Target.h:2148
lldb::user_id_t GetGloballyUniqueID() const
Get the globally unique ID for this target.
Definition Target.h:682
bool RemoveAllWatchpoints(bool end_to_end=true)
Definition Target.cpp:1426
bool ReadPointerFromMemory(const Address &addr, Status &error, Address &pointer_addr, bool force_live_memory=false)
Definition Target.cpp:2409
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:3172
WatchpointList m_watchpoint_list
Definition Target.h:2102
BreakpointList m_breakpoint_list
Definition Target.h:2090
void DescribeBreakpointOverrides(Stream &stream, std::vector< lldb::user_id_t > &idxs, uint32_t terminal_width, bool use_color)
Describe the breakpoint overrides.
Definition Target.cpp:985
lldb::SourceManagerUP m_source_manager_up
Definition Target.h:2124
lldb::user_id_t m_override_id
This is the ID that will be handed out for the next added breakpoint override resolver for this targe...
Definition Target.h:2099
bool RemoveWatchpointByID(lldb::watch_id_t watch_id)
Definition Target.cpp:1592
bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr, uint32_t stop_id=SectionLoadHistory::eStopIDNow, bool allow_section_end=false)
Definition Target.cpp:3482
size_t ReadStringFromMemory(const Address &addr, char *dst, size_t max_bytes, Status &error, size_t type_width, bool force_live_memory=true)
Read a NULL terminated string from memory.
Definition Target.cpp:2307
HookSP GetHookByID(lldb::user_id_t uid)
Definition Target.cpp:4787
void NotifyWillClearList(const ModuleList &module_list) override
Definition Target.cpp:1902
bool SetArchitecture(const ArchSpec &arch_spec, bool set_platform=false, bool merge=true)
Set the architecture for this target.
Definition Target.cpp:1786
void ClearBreakpointResolverOverrides()
Definition Target.h:1065
bool RemoveBreakpointResolverOverride(lldb::user_id_t override_id)
Definition Target.h:1060
void NotifyModuleAdded(const ModuleList &module_list, const lldb::ModuleSP &module_sp) override
Implementing of ModuleList::Notifier.
Definition Target.cpp:1904
llvm::Expected< lldb::TypeSystemSP > GetScratchTypeSystemForLanguage(lldb::LanguageType language, bool create_on_demand=true)
Definition Target.cpp:2705
void ConfigureBreakpointName(BreakpointName &bp_name, const BreakpointOptions &options, const BreakpointName::Permissions &permissions)
Definition Target.cpp:923
lldb_private::SummaryStatisticsSP GetSummaryStatisticsSPForProviderName(lldb_private::TypeSummaryImpl &summary_provider)
Definition Target.cpp:3566
lldb::SearchFilterSP GetSearchFilterForModuleAndCUList(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles)
Definition Target.cpp:722
lldb::ModuleSP GetExecutableModule()
Gets the module for the main executable.
Definition Target.cpp:1624
bool SetStopHookActiveStateByID(lldb::user_id_t uid, bool active_state)
Definition Target.cpp:3196
const lldb::ProcessSP & CreateProcess(lldb::ListenerSP listener_sp, llvm::StringRef plugin_name, const FileSpec *crash_file, bool can_connect)
Definition Target.cpp:316
void SetAllStopHooksActiveState(bool active_state)
Definition Target.cpp:3207
std::vector< StopHookSP > m_internal_stop_hooks
Definition Target.h:2129
lldb::ExpressionVariableSP GetPersistentVariable(ConstString name)
Definition Target.cpp:3018
void NotifyModulesRemoved(lldb_private::ModuleList &module_list) override
Definition Target.cpp:1936
StopHookSP CreateStopHook(StopHook::StopHookKind kind, bool internal=false)
Add an empty stop hook to the Target's stop hook list, and returns a shared pointer to the new hook.
Definition Target.cpp:3150
size_t ReadCStringFromMemory(const Address &addr, std::string &out_str, Status &error, bool force_live_memory=false)
Definition Target.cpp:2217
void SetAllHooksEnabledState(bool enabled)
Definition Target.cpp:4810
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:2076
std::recursive_mutex m_frame_provider_descriptors_mutex
Definition Target.h:2118
lldb::user_id_t m_target_unique_id
The globally unique ID assigned to this target.
Definition Target.h:2140
void ModulesDidUnload(ModuleList &module_list, bool delete_locations)
Definition Target.cpp:1984
void CalculateExecutionContext(ExecutionContext &exe_ctx) override
Reconstruct the object's execution context into sc.
Definition Target.cpp:2687
llvm::Expected< lldb::DisassemblerSP > ReadInstructions(const Address &start_addr, uint32_t count, const char *flavor_string=nullptr)
Definition Target.cpp:3112
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:3784
void NotifyModuleUpdated(const ModuleList &module_list, const lldb::ModuleSP &old_module_sp, const lldb::ModuleSP &new_module_sp) override
Definition Target.cpp:1924
SummaryStatisticsCache m_summary_statistics_cache
Definition Target.h:2088
Target(const Target &)=delete
void RegisterInternalStopHooks()
Status SerializeBreakpointsToFile(const FileSpec &file, const BreakpointIDList &bp_ids, bool append)
Definition Target.cpp:1267
void DidExec()
Called as the last function in Process::DidExec().
Definition Target.cpp:1651
void SaveScriptedLaunchInfo(lldb_private::ProcessInfo &process_info)
Definition Target.cpp:3576
bool GetSuppressStopHooks()
Definition Target.h:1957
std::string m_label
Definition Target.h:2085
lldb::user_id_t m_stop_hook_next_id
Definition Target.h:2128
static FileSpecList GetDefaultExecutableSearchPaths()
Definition Target.cpp:2890
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:759
void NotifyBreakpointChanged(Breakpoint &bp, lldb::BreakpointEventType event_kind)
Sends a breakpoint notification event.
Definition Target.cpp:6023
lldb::SearchFilterSP GetSearchFilterForModule(const FileSpec *containingModule)
Definition Target.cpp:687
llvm::StringMapEntry< DummySignalValues > DummySignalElement
Definition Target.h:2019
std::recursive_mutex & GetAPIMutex()
Definition Target.cpp:5995
static llvm::StringRef GetStaticBroadcasterClass()
Definition Target.cpp:175
static FileSpecList GetDefaultDebugFileSearchPaths()
Definition Target.cpp:2894
void EnableAllowedBreakpoints()
Definition Target.cpp:1199
virtual 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, bool *did_read_live_memory=nullptr)
Definition Target.cpp:2091
llvm::Error SetLabel(llvm::StringRef label)
Set a label for a target.
Definition Target.cpp:2909
uint32_t m_latest_stop_hook_id
Definition Target.h:2130
void RunModuleHooks(bool is_load)
Definition Target.cpp:4815
std::map< lldb::user_id_t, BreakpointResolverOverrideUP > m_breakpoint_overrides
Definition Target.h:2096
StackFrameRecognizerManager & GetFrameRecognizerManager()
Definition Target.h:1995
void RemoveAllowedBreakpoints()
Definition Target.cpp:1151
bool DisableAllWatchpoints(bool end_to_end=true)
Definition Target.cpp:1455
bool RunStopHooks(bool at_initial_stop=false)
Definition Target.cpp:3231
void ClearSectionLoadList()
Definition Target.cpp:6017
const Target & operator=(const Target &)=delete
lldb::addr_t GetReasonableReadSize(const Address &addr)
Return a recommended size for memory reads at addr, optimizing for cache usage.
Definition Target.cpp:2294
lldb::PlatformSP m_platform_sp
The platform for this target.
Definition Target.h:2075
void UndoCreateHook(lldb::user_id_t uid)
Removes the most recently created hook.
Definition Target.cpp:4773
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:2859
FileSpecList GetSafeAutoLoadPaths() const
Get the list of paths that LLDB will consider automatically loading scripting resources from.
Definition Target.cpp:6039
static TargetProperties & GetGlobalProperties()
Definition Target.cpp:3446
Status Install(ProcessLaunchInfo *launch_info)
Definition Target.cpp:3454
HookSP GetHookAtIndex(size_t index)
Definition Target.cpp:4794
lldb::PlatformSP GetPlatform()
Definition Target.h:1971
void NotifyModuleRemoved(const ModuleList &module_list, const lldb::ModuleSP &module_sp) override
Definition Target.cpp:1914
lldb::BreakpointSP CreateAddressInModuleBreakpoint(lldb::addr_t file_addr, bool internal, const FileSpec &file_spec, bool request_hardware)
Definition Target.cpp:593
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:504
void RemoveAllBreakpoints(bool internal_also=false)
Definition Target.cpp:1160
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:487
lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const char *func_name, lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language, lldb::addr_t offset, bool offset_is_insn_count, LazyBool skip_prologue, bool internal, bool request_hardware)
static ArchSpec GetDefaultArchitecture()
Definition Target.cpp:2898
void ResetBreakpointHitCounts()
Resets the hit count of all breakpoints.
Definition Target.cpp:1263
std::unique_ptr< BreakpointResolverOverride > BreakpointResolverOverrideUP
Definition Target.h:1019
const ModuleList & GetImages() const
Get accessor for the images for this process.
Definition Target.h:1243
const ArchSpec & GetArchitecture() const
Definition Target.h:1285
WatchpointList & GetWatchpointList()
Definition Target.h:955
@ eBroadcastBitWatchpointChanged
Definition Target.h:590
@ eBroadcastBitBreakpointChanged
Definition Target.h:587
@ eBroadcastBitNewTargetCreated
Definition Target.h:593
unsigned m_next_persistent_variable_index
Definition Target.h:2139
bool EnableBreakpointByID(lldb::break_id_t break_id)
Definition Target.cpp:1244
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:2398
void InvalidateThreadFrameProviders()
Invalidate all potentially cached frame providers for all threads and trigger a stack changed event f...
Definition Target.cpp:3949
TargetStats m_stats
Definition Target.h:2164
bool IgnoreAllWatchpoints(uint32_t ignore_count)
Definition Target.cpp:1537
void AddBreakpoint(lldb::BreakpointSP breakpoint_sp, bool internal)
Definition Target.cpp:830
std::string m_target_session_name
The target session name for this target, used to name debugging sessions in DAP.
Definition Target.h:2143
TypeSystemMap m_scratch_type_system_map
Definition Target.h:2110
void AddBreakpointName(std::unique_ptr< BreakpointName > bp_name)
Definition Target.cpp:880
void SetTargetSessionName(llvm::StringRef target_session_name)
Set the target session name for this target.
Definition Target.h:715
SectionLoadHistory m_section_load_history
Definition Target.h:2089
lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const std::vector< std::string > &func_names, lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language, lldb::addr_t m_offset, LazyBool skip_prologue, bool internal, bool request_hardware)
lldb::BreakpointResolverSP CheckBreakpointOverrides(lldb::BreakpointResolverSP original_sp)
Definition Target.cpp:1023
void GetBreakpointNames(std::vector< std::string > &names)
Definition Target.cpp:945
bool IsDummyTarget() const
Definition Target.h:671
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:180
size_t UnloadModuleSections(const lldb::ModuleSP &module_sp)
Definition Target.cpp:3523
llvm::StringRef GetTargetSessionName()
Get the target session name for this target.
Definition Target.h:703
const std::string & GetLabel() const
Definition Target.h:684
std::map< lldb::user_id_t, HookSP > HookCollection
Definition Target.h:2136
bool m_valid
This records the last natural stop at which we ran a stop-hook.
Definition Target.h:2132
bool DisableWatchpointByID(lldb::watch_id_t watch_id)
Definition Target.cpp:1554
void AddDummySignal(llvm::StringRef name, LazyBool pass, LazyBool print, LazyBool stop)
Add a signal to the Target's list of stored signals/actions.
Definition Target.cpp:4055
void ClearScriptedFrameProviderDescriptors()
Clear all scripted frame provider descriptors for this target.
Definition Target.cpp:3931
lldb::WatchpointSP m_last_created_watchpoint
Definition Target.h:2103
Status CreateBreakpointsFromFile(const FileSpec &file, BreakpointIDList &new_bps)
Definition Target.cpp:1359
Debugger & m_debugger
Definition Target.h:2074
void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp)
Definition Target.cpp:381
lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const char *func_names[], size_t num_names, lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language, lldb::addr_t offset, LazyBool skip_prologue, bool internal, bool request_hardware)
void SetExecutableModule(lldb::ModuleSP &module_sp, LoadDependentFiles load_dependent_files=eLoadDependentsDefault)
Set the main executable module.
Definition Target.cpp:1657
lldb::StackFrameRecognizerManagerUP m_frame_recognizer_manager_up
Stores the frame recognizers of this target.
Definition Target.h:2150
HookCollection m_hooks
Definition Target.h:2137
lldb::REPLSP GetREPL(Status &err, lldb::LanguageType language, const char *repl_options, bool can_create)
Definition Target.cpp:330
std::shared_ptr< Hook > HookSP
Definition Target.h:1912
UserExpression * GetUserExpressionForLanguage(llvm::StringRef expr, llvm::StringRef prefix, SourceLanguage language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options, ValueObject *ctx_obj, Status &error)
Definition Target.cpp:2796
ModuleList m_images
The list of images for this process (shared libraries and anything dynamically loaded).
Definition Target.h:2086
lldb::ProcessSP CalculateProcess() override
Definition Target.cpp:2681
void PrintDummySignals(Stream &strm, Args &signals)
Print all the signals set in this target.
Definition Target.cpp:4149
void SetPlatform(const lldb::PlatformSP &platform_sp)
Definition Target.h:1973
bool SetSectionLoadAddress(const lldb::SectionSP &section, lldb::addr_t load_addr, bool warn_multiple=false)
Definition Target.cpp:3493
BreakpointName * FindBreakpointName(llvm::StringRef name, bool can_create, Status &error)
Definition Target.cpp:885
Status Attach(ProcessAttachInfo &attach_info, Stream *stream)
Definition Target.cpp:3790
std::map< lldb::LanguageType, lldb::REPLSP > REPLMap
Definition Target.h:2121
static void SetDefaultArchitecture(const ArchSpec &arch)
Definition Target.cpp:2902
lldb::BreakpointSP m_last_created_breakpoint
Definition Target.h:2101
lldb::WatchpointSP GetLastCreatedWatchpoint()
Definition Target.h:951
bool RemoveStopHookByID(lldb::user_id_t uid)
Definition Target.cpp:3179
friend class Debugger
Definition Target.h:583
lldb::BreakpointSP GetLastCreatedBreakpoint()
Definition Target.h:843
static void SettingsInitialize()
Definition Target.cpp:2886
~Target() override
Definition Target.cpp:219
bool EnableAllWatchpoints(bool end_to_end=true)
Definition Target.cpp:1482
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:2083
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:2940
bool MergeArchitecture(const ArchSpec &arch_spec)
Definition Target.cpp:1877
Encapsulates a one-time expression for use in lldb.
This class is used by Watchpoint to manage a list of watchpoints,.
#define LLDB_INVALID_GLOBALLY_UNIQUE_TARGET_ID
A class that represents a running process on the host machine.
std::shared_ptr< SummaryStatistics > SummaryStatisticsSP
Definition Statistics.h:33
LoadScriptFromSymFile
Definition Target.h:59
@ eLoadScriptFromSymFileTrue
Definition Target.h:60
@ eLoadScriptFromSymFileTrusted
Definition Target.h:63
@ eLoadScriptFromSymFileFalse
Definition Target.h:61
@ eLoadScriptFromSymFileWarn
Definition Target.h:62
ExecutionPolicy
Expression execution policies.
DynamicClassInfoHelper
Definition Target.h:78
@ eDynamicClassInfoHelperCopyRealizedClassList
Definition Target.h:81
@ eDynamicClassInfoHelperGetRealizedClassList
Definition Target.h:82
@ eDynamicClassInfoHelperAuto
Definition Target.h:79
@ eDynamicClassInfoHelperRealizedClassesStruct
Definition Target.h:80
OptionEnumValues GetDynamicValueTypes()
Definition Target.cpp:4863
@ eImportStdModuleFalse
Definition Target.h:73
@ eImportStdModuleFallback
Definition Target.h:74
@ eImportStdModuleTrue
Definition Target.h:75
LoadCWDlldbinitFile
Definition Target.h:66
@ eLoadCWDlldbinitTrue
Definition Target.h:67
@ eLoadCWDlldbinitFalse
Definition Target.h:68
@ eLoadCWDlldbinitWarn
Definition Target.h:69
llvm::ArrayRef< OptionEnumValueElement > OptionEnumValues
@ eInlineBreakpointsNever
Definition Target.h:54
@ eInlineBreakpointsAlways
Definition Target.h:56
@ eInlineBreakpointsHeaders
Definition Target.h:55
ExpressionEvaluationPhase
Expression Evaluation Stages.
std::shared_ptr< lldb_private::Trace > TraceSP
std::shared_ptr< lldb_private::ScriptedHookInterface > ScriptedHookInterfaceSP
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::SearchFilter > SearchFilterSP
std::shared_ptr< lldb_private::BreakpointResolver > BreakpointResolverSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::unique_ptr< lldb_private::StackFrameRecognizerManager > StackFrameRecognizerManagerUP
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::ExpressionVariable > ExpressionVariableSP
std::shared_ptr< lldb_private::UnixSignals > UnixSignalsSP
std::shared_ptr< lldb_private::Platform > PlatformSP
std::shared_ptr< lldb_private::RegisterTypeBuilder > RegisterTypeBuilderSP
LanguageType
Programming language type.
std::shared_ptr< lldb_private::Stream > StreamSP
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
ExpressionResults
The results of expression evaluation.
int32_t break_id_t
Definition lldb-types.h:87
std::unique_ptr< lldb_private::SourceManager > SourceManagerUP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::SymbolContextSpecifier > SymbolContextSpecifierSP
std::shared_ptr< lldb_private::Watchpoint > WatchpointSP
std::shared_ptr< lldb_private::Listener > ListenerSP
int32_t watch_id_t
Definition lldb-types.h:88
uint64_t user_id_t
Definition lldb-types.h:82
std::shared_ptr< lldb_private::Section > SectionSP
uint64_t addr_t
Definition lldb-types.h:80
std::shared_ptr< lldb_private::Target > TargetSP
@ eDynamicCanRunTarget
bool(* ExpressionCancelCallback)(lldb::ExpressionEvaluationPhase phase, void *baton)
Definition lldb-types.h:75
std::shared_ptr< lldb_private::Module > ModuleSP
std::shared_ptr< lldb_private::EventData > EventDataSP
std::shared_ptr< lldb_private::REPL > REPLSP
This struct contains the metadata needed to instantiate a frame provider and optional filters to cont...
A type-erased pair of llvm::dwarf::SourceLanguageName and version.
DummySignalValues(LazyBool pass, LazyBool notify, LazyBool stop)
Definition Target.h:2015
UserID(lldb::user_id_t uid=LLDB_INVALID_UID)
Construct with optional user ID.
Definition UserID.h:33