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
86
91
93public:
94 TargetProperties(Target *target);
95
97
99
100 void SetDefaultArchitecture(const ArchSpec &arch);
101
102 bool GetMoveToNearestCode() const;
103
105
107
108 bool GetPreloadSymbols() const;
109
110 void SetPreloadSymbols(bool b);
111
112 bool GetDisableASLR() const;
113
114 void SetDisableASLR(bool b);
115
116 bool GetInheritTCC() const;
117
118 void SetInheritTCC(bool b);
119
120 bool GetDetachOnError() const;
121
122 void SetDetachOnError(bool b);
123
124 bool GetDisableSTDIO() const;
125
126 void SetDisableSTDIO(bool b);
127
128 llvm::StringRef GetLaunchWorkingDirectory() const;
129
130 bool GetParallelModuleLoad() const;
131
132 const char *GetDisassemblyFlavor() const;
133
134 const char *GetDisassemblyCPU() const;
135
136 const char *GetDisassemblyFeatures() const;
137
139
141
142 llvm::StringRef GetArg0() const;
143
144 void SetArg0(llvm::StringRef arg);
145
146 bool GetRunArguments(Args &args) const;
147
148 void SetRunArguments(const Args &args);
149
150 // Get the whole environment including the platform inherited environment and
151 // the target specific environment, excluding the unset environment variables.
153 // Get the platform inherited environment, excluding the unset environment
154 // variables.
156 // Get the target specific environment only, without the platform inherited
157 // environment.
159 // Set the target specific environment.
160 void SetEnvironment(Environment env);
161
162 bool GetSkipPrologue() const;
163
165
167
168 bool GetAutoSourceMapRelative() const;
169
171
173
175
177
179
181
183
184 bool GetEnableAutoApplyFixIts() const;
185
186 uint64_t GetNumberOfRetriesWithFixits() const;
187
188 bool GetEnableNotifyAboutFixIts() const;
189
191
192 JITEngine GetJITEngine() const;
193
194 bool GetEnableSyntheticValue() const;
195
197
198 uint32_t GetMaxZeroPaddingInFloatFormat() const;
199
201
202 /// Get the max depth value, augmented with a bool to indicate whether the
203 /// depth is the default.
204 ///
205 /// When the user has customized the max depth, the bool will be false.
206 ///
207 /// \returns the max depth, and true if the max depth is the system default,
208 /// otherwise false.
209 std::pair<uint32_t, bool> GetMaximumDepthOfChildrenToDisplay() const;
210
211 uint32_t GetMaximumSizeOfStringSummary() const;
212
213 uint32_t GetMaximumMemReadSize() const;
214
218
219 void SetStandardInputPath(llvm::StringRef path);
220 void SetStandardOutputPath(llvm::StringRef path);
221 void SetStandardErrorPath(llvm::StringRef path);
222
223 void SetStandardInputPath(const char *path) = delete;
224 void SetStandardOutputPath(const char *path) = delete;
225 void SetStandardErrorPath(const char *path) = delete;
226
228
230
231 llvm::StringRef GetExpressionPrefixContents();
232
233 uint64_t GetExprErrorLimit() const;
234
235 uint64_t GetExprAllocAddress() const;
236
237 uint64_t GetExprAllocSize() const;
238
239 uint64_t GetExprAllocAlign() const;
240
241 bool GetUseHexImmediates() const;
242
243 bool GetUseFastStepping() const;
244
246
248
249 /// Set the target-wide target.load-script-from-symbol-file setting.
250 /// See \c SetAutoLoadScriptsForModule for overriding this setting
251 /// per-module.
253
255
257
259
260 bool GetUserSpecifiedTrapHandlerNames(Args &args) const;
261
262 void SetUserSpecifiedTrapHandlerNames(const Args &args);
263
265
267
269
271
273
274 void SetProcessLaunchInfo(const ProcessLaunchInfo &launch_info);
275
276 bool GetInjectLocalVariables(ExecutionContext *exe_ctx) const;
277
278 bool GetUseDIL(ExecutionContext *exe_ctx) const;
279
280 void SetUseDIL(ExecutionContext *exe_ctx, bool b);
281
283
285
286 bool GetAutoInstallMainExecutable() const;
287
289
290 void SetDebugUtilityExpression(bool debug);
291
292 bool GetDebugUtilityExpression() const;
293
294 void SetCheckValueObjectOwnership(bool check);
295
296 bool GetCheckValueObjectOwnership() const;
297
298 std::optional<LoadScriptFromSymFile>
299 GetAutoLoadScriptsForModule(llvm::StringRef module_name) const;
300
301 /// Set the \c LoadScriptFromSymFile for a module called \c module_name
302 /// (excluding file extension). LLDB will prefer this over the target-wide
303 /// target.load-script-from-symbol-file setting
304 /// (see \c SetLoadScriptFromSymbolFile).
305 void SetAutoLoadScriptsForModule(llvm::StringRef module_name,
306 LoadScriptFromSymFile load_style);
307
308private:
309 std::optional<bool>
310 GetExperimentalPropertyValue(size_t prop_idx,
311 ExecutionContext *exe_ctx = nullptr) const;
312
313 // Callbacks for m_launch_info.
324
325 // Settings checker for target.jit-save-objects-dir:
326 void CheckJITObjectsDir();
327
329
330 // Member variables.
332 std::unique_ptr<TargetExperimentalProperties> m_experimental_properties_up;
334};
335
337public:
339
340// MSVC has a bug here that reports C4268: 'const' static/global data
341// initialized with compiler generated default constructor fills the object
342// with zeros. Confirmed that MSVC is *not* zero-initializing, it's just a
343// bogus warning.
344#if defined(_MSC_VER)
345#pragma warning(push)
346#pragma warning(disable : 4268)
347#endif
348 static constexpr std::chrono::milliseconds default_timeout{500};
349#if defined(_MSC_VER)
350#pragma warning(pop)
351#endif
352
355
357
361
363
364 void SetLanguage(lldb::LanguageType language_type) {
365 m_language = SourceLanguage(language_type);
366 }
367
369 m_preferred_lookup_contexts = std::move(contexts);
370 }
371
375
376 /// Set the language using a pair of language code and version as
377 /// defined by the DWARF 6 specification.
378 /// WARNING: These codes may change until DWARF 6 is finalized.
379 void SetLanguage(uint16_t name, uint32_t version) {
380 m_language = SourceLanguage(name, version);
381 }
382
383 bool DoesCoerceToId() const { return m_coerce_to_id; }
384
385 const char *GetPrefix() const {
386 return (m_prefix.empty() ? nullptr : m_prefix.c_str());
387 }
388
389 void SetPrefix(const char *prefix) {
390 if (prefix && prefix[0])
391 m_prefix = prefix;
392 else
393 m_prefix.clear();
394 }
395
396 void SetCoerceToId(bool coerce = true) { m_coerce_to_id = coerce; }
397
398 bool DoesUnwindOnError() const { return m_unwind_on_error; }
399
400 void SetUnwindOnError(bool unwind = false) { m_unwind_on_error = unwind; }
401
403
404 void SetIgnoreBreakpoints(bool ignore = false) {
405 m_ignore_breakpoints = ignore;
406 }
407
408 bool DoesKeepInMemory() const { return m_keep_in_memory; }
409
410 void SetKeepInMemory(bool keep = true) { m_keep_in_memory = keep; }
411
413
414 void
418
419 const Timeout<std::micro> &GetTimeout() const { return m_timeout; }
420
421 void SetTimeout(const Timeout<std::micro> &timeout) { m_timeout = timeout; }
422
426
428 m_one_thread_timeout = timeout;
429 }
430
431 bool GetTryAllThreads() const { return m_try_others; }
432
433 void SetTryAllThreads(bool try_others = true) { m_try_others = try_others; }
434
435 bool GetStopOthers() const { return m_stop_others; }
436
437 void SetStopOthers(bool stop_others = true) { m_stop_others = stop_others; }
438
439 bool GetDebug() const { return m_debug; }
440
441 void SetDebug(bool b) {
442 m_debug = b;
443 if (m_debug)
445 }
446
448
450
451 bool GetColorizeErrors() const { return m_ansi_color_errors; }
452
454
455 bool GetTrapExceptions() const { return m_trap_exceptions; }
456
458
459 bool GetStopOnFork() const { return m_stop_on_fork; }
460
461 void SetStopOnFork(bool b) { m_stop_on_fork = b; }
462
463 bool GetREPLEnabled() const { return m_repl; }
464
465 void SetREPLEnabled(bool b) { m_repl = b; }
466
469 m_cancel_callback = callback;
470 }
471
473 return ((m_cancel_callback != nullptr)
475 : false);
476 }
477
478 // Allows the expression contents to be remapped to point to the specified
479 // file and line using #line directives.
480 void SetPoundLine(const char *path, uint32_t line) const {
481 if (path && path[0]) {
482 m_pound_line_file = path;
483 m_pound_line_line = line;
484 } else {
485 m_pound_line_file.clear();
487 }
488 }
489
490 const char *GetPoundLineFilePath() const {
491 return (m_pound_line_file.empty() ? nullptr : m_pound_line_file.c_str());
492 }
493
494 uint32_t GetPoundLineLine() const { return m_pound_line_line; }
495
497
501
503
505
506 void SetRetriesWithFixIts(uint64_t number_of_retries) {
507 m_retries_with_fixits = number_of_retries;
508 }
509
510 uint64_t GetRetriesWithFixIts() const { return m_retries_with_fixits; }
511
513
515
516 /// Set language-plugin specific option called \c option_name to
517 /// the specified boolean \c value.
518 llvm::Error SetBooleanLanguageOption(llvm::StringRef option_name, bool value);
519
520 /// Get the language-plugin specific boolean option called \c option_name.
521 ///
522 /// If the option doesn't exist or is not a boolean option, returns false.
523 /// Otherwise returns the boolean value of the option.
524 llvm::Expected<bool>
525 GetBooleanLanguageOption(llvm::StringRef option_name) const;
526
527 void SetCppIgnoreContextQualifiers(bool value);
528
530
531private:
533
535
538 std::string m_prefix;
539 bool m_coerce_to_id = false;
540 bool m_unwind_on_error = true;
542 bool m_keep_in_memory = false;
543 bool m_try_others = true;
544 bool m_stop_others = true;
545 bool m_debug = false;
546 bool m_trap_exceptions = true;
547 bool m_stop_on_fork = false;
548 bool m_repl = false;
554 /// True if the executed code should be treated as utility code that is only
555 /// used by LLDB internally.
557
562 void *m_cancel_callback_baton = nullptr;
563 // If m_pound_line_file is not empty and m_pound_line_line is non-zero, use
564 // #line %u "%s" before the expression content to remap where the source
565 // originates
566 mutable std::string m_pound_line_file;
567 mutable uint32_t m_pound_line_line = 0;
568
569 /// Dictionary mapping names of language-plugin specific options
570 /// to values.
572
573 /// During expression evaluation, any SymbolContext in this list will be
574 /// used for symbol/function lookup before any other context (except for
575 /// the module corresponding to the current frame).
577};
578
579// Target
580class Target : public std::enable_shared_from_this<Target>,
581 public TargetProperties,
582 public Broadcaster,
584 public ModuleList::Notifier {
585public:
586 friend class TargetList;
587 friend class Debugger;
588
589 /// Broadcaster event bits definitions.
590 enum {
598 };
599
600 // These two functions fill out the Broadcaster interface:
601
602 static llvm::StringRef GetStaticBroadcasterClass();
603
604 llvm::StringRef GetBroadcasterClass() const override {
606 }
607
608 // This event data class is for use by the TargetList to broadcast new target
609 // notifications.
610 class TargetEventData : public EventData {
611 public:
612 TargetEventData(const lldb::TargetSP &target_sp);
613
614 TargetEventData(const lldb::TargetSP &target_sp,
615 const ModuleList &module_list);
616
617 // Constructor for eBroadcastBitNewTargetCreated events. For this event
618 // type:
619 // - target_sp is the parent target (the subject/broadcaster of the event)
620 // - created_target_sp is the newly created target
621 TargetEventData(const lldb::TargetSP &target_sp,
622 const lldb::TargetSP &created_target_sp);
623
625
626 static llvm::StringRef GetFlavorString();
627
628 llvm::StringRef GetFlavor() const override {
630 }
631
632 void Dump(Stream *s) const override;
633
634 static const TargetEventData *GetEventDataFromEvent(const Event *event_ptr);
635
636 static lldb::TargetSP GetTargetFromEvent(const Event *event_ptr);
637
638 // For eBroadcastBitNewTargetCreated events, returns the newly created
639 // target. For other event types, returns an invalid target.
640 static lldb::TargetSP GetCreatedTargetFromEvent(const Event *event_ptr);
641
642 static ModuleList GetModuleListFromEvent(const Event *event_ptr);
643
644 const lldb::TargetSP &GetTarget() const { return m_target_sp; }
645
647 return m_created_target_sp;
648 }
649
650 const ModuleList &GetModuleList() const { return m_module_list; }
651
652 private:
656
658 const TargetEventData &operator=(const TargetEventData &) = delete;
659 };
660
661 ~Target() override;
662
663 static void SettingsInitialize();
664
665 static void SettingsTerminate();
666
668
670
672
673 static void SetDefaultArchitecture(const ArchSpec &arch);
674
675 bool IsDummyTarget() const { return m_is_dummy_target; }
676
677 /// Get the globally unique ID for this target.
678 ///
679 /// This ID is unique across all debugger instances and all targets,
680 /// within the same lldb process. The ID is assigned
681 /// during target construction and remains constant for the target's lifetime.
682 /// The first target created (typically the dummy target) gets ID 1.
683 ///
684 /// \return
685 /// The globally unique ID for this target.
687
688 const std::string &GetLabel() const { return m_label; }
689
690 /// Set a label for a target.
691 ///
692 /// The label cannot be used by another target or be only integral.
693 ///
694 /// \return
695 /// The label for this target or an error if the label didn't match the
696 /// requirements.
697 llvm::Error SetLabel(llvm::StringRef label);
698
699 /// Get the target session name for this target.
700 ///
701 /// Provides a meaningful name for IDEs or tools to display for dynamically
702 /// created targets. Defaults to "Session {ID}" based on the globally unique
703 /// ID.
704 ///
705 /// \return
706 /// The target session name for this target.
707 llvm::StringRef GetTargetSessionName() { return m_target_session_name; }
708
709 /// Set the target session name for this target.
710 ///
711 /// This should typically be set along with the event
712 /// eBroadcastBitNewTargetCreated. Useful for scripts or triggers that
713 /// automatically create targets and want to provide meaningful names that
714 /// IDEs or other tools can display to help users identify the origin and
715 /// purpose of each target.
716 ///
717 /// \param[in] target_session_name
718 /// The target session name to set for this target.
719 void SetTargetSessionName(llvm::StringRef target_session_name) {
720 m_target_session_name = target_session_name.str();
721 }
722
723 /// Find a binary on the system and return its Module,
724 /// or return an existing Module that is already in the Target.
725 ///
726 /// Given a ModuleSpec, find a binary satisifying that specification,
727 /// or identify a matching Module already present in the Target,
728 /// and return a shared pointer to it.
729 ///
730 /// Note that this function previously also preloaded the module's symbols
731 /// depending on a setting. This function no longer does any module
732 /// preloading because that can potentially cause deadlocks when called in
733 /// parallel with this function.
734 ///
735 /// \param[in] module_spec
736 /// The criteria that must be matched for the binary being loaded.
737 /// e.g. UUID, architecture, file path.
738 ///
739 /// \param[in] notify
740 /// If notify is true, and the Module is new to this Target,
741 /// Target::ModulesDidLoad will be called. See note in
742 /// Target::ModulesDidLoad about thread-safety with
743 /// Target::GetOrCreateModule.
744 /// If notify is false, it is assumed that the caller is adding
745 /// multiple Modules and will call ModulesDidLoad with the
746 /// full list at the end.
747 /// ModulesDidLoad must be called when a Module/Modules have
748 /// been added to the target, one way or the other.
749 ///
750 /// \param[out] error_ptr
751 /// Optional argument, pointing to a Status object to fill in
752 /// with any results / messages while attempting to find/load
753 /// this binary. Many callers will be internal functions that
754 /// will handle / summarize the failures in a custom way and
755 /// don't use these messages.
756 ///
757 /// \return
758 /// An empty ModuleSP will be returned if no matching file
759 /// was found. If error_ptr was non-nullptr, an error message
760 /// will likely be provided.
761 lldb::ModuleSP GetOrCreateModule(const ModuleSpec &module_spec, bool notify,
762 Status *error_ptr = nullptr);
763
764 // Settings accessors
765
767
768 std::recursive_mutex &GetAPIMutex();
769
771
772 void CleanupProcess();
773
774 /// Dump a description of this object to a Stream.
775 ///
776 /// Dump a description of the contents of this object to the
777 /// supplied stream \a s. The dumped content will be only what has
778 /// been loaded or parsed up to this point at which this function
779 /// is called, so this is a good way to see what has been parsed
780 /// in a target.
781 ///
782 /// \param[in] s
783 /// The stream to which to dump the object description.
784 void Dump(Stream *s, lldb::DescriptionLevel description_level);
785
786 // If listener_sp is null, the listener of the owning Debugger object will be
787 // used.
789 llvm::StringRef plugin_name,
790 const FileSpec *crash_file,
791 bool can_connect);
792
793 const lldb::ProcessSP &GetProcessSP() const;
794
795 bool IsValid() { return m_valid; }
796
797 void Destroy();
798
799 Status Launch(ProcessLaunchInfo &launch_info,
800 Stream *stream); // Optional stream to receive first stop info
801
802 Status Attach(ProcessAttachInfo &attach_info,
803 Stream *stream); // Optional stream to receive first stop info
804
805 /// Add or update a scripted frame provider descriptor for this target.
806 /// All new threads in this target will check if they match any descriptors
807 /// to create their frame providers.
808 ///
809 /// \param[in] descriptor
810 /// The descriptor to add or update.
811 ///
812 /// \return
813 /// The descriptor identifier if the registration succeeded, otherwise an
814 /// llvm::Error.
815 llvm::Expected<uint32_t> AddScriptedFrameProviderDescriptor(
816 const ScriptedFrameProviderDescriptor &descriptor);
817
818 /// Remove a scripted frame provider descriptor by id.
819 ///
820 /// \param[in] id
821 /// The id of the descriptor to remove.
822 ///
823 /// \return
824 /// True if a descriptor was removed, false if no descriptor with that
825 /// id existed.
827
828 /// Clear all scripted frame provider descriptors for this target.
830
831 /// Get all scripted frame provider descriptors for this target.
832 const llvm::MapVector<uint32_t, ScriptedFrameProviderDescriptor> &
834
835protected:
836 /// Invalidate all potentially cached frame providers for all threads
837 /// and trigger a stack changed event for all threads.
839
840public:
841 // This part handles the breakpoints.
842
843 BreakpointList &GetBreakpointList(bool internal = false);
844
845 const BreakpointList &GetBreakpointList(bool internal = false) const;
846
850
852
854
855 // Use this to create a file and line breakpoint to a given module or all
856 // module it is nullptr
857 lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules,
858 const FileSpec &file, uint32_t line_no,
859 uint32_t column, lldb::addr_t offset,
860 LazyBool check_inlines,
861 LazyBool skip_prologue, bool internal,
862 bool request_hardware,
863 LazyBool move_to_nearest_code);
864
865 // Use this to create breakpoint that matches regex against the source lines
866 // in files given in source_file_list: If function_names is non-empty, also
867 // filter by function after the matches are made.
869 const FileSpecList *containingModules,
870 const FileSpecList *source_file_list,
871 const std::unordered_set<std::string> &function_names,
872 RegularExpression source_regex, bool internal, bool request_hardware,
873 LazyBool move_to_nearest_code);
874
875 // Use this to create a breakpoint from a load address
876 lldb::BreakpointSP CreateBreakpoint(lldb::addr_t load_addr, bool internal,
877 bool request_hardware);
878
879 // Use this to create a breakpoint from a file address and a module file spec
881 bool internal,
882 const FileSpec &file_spec,
883 bool request_hardware);
884
885 // Use this to create Address breakpoints:
886 lldb::BreakpointSP CreateBreakpoint(const Address &addr, bool internal,
887 bool request_hardware);
888
889 // Use this to create a function breakpoint by regexp in
890 // containingModule/containingSourceFiles, or all modules if it is nullptr
891 // When "skip_prologue is set to eLazyBoolCalculate, we use the current
892 // target setting, else we use the values passed in
894 const FileSpecList *containingModules,
895 const FileSpecList *containingSourceFiles, RegularExpression func_regexp,
896 lldb::LanguageType requested_language, LazyBool skip_prologue,
897 bool internal, bool request_hardware);
898
899 // Use this to create a function breakpoint by name in containingModule, or
900 // all modules if it is nullptr When "skip_prologue is set to
901 // eLazyBoolCalculate, we use the current target setting, else we use the
902 // values passed in. func_name_type_mask is or'ed values from the
903 // FunctionNameType enum.
905 const FileSpecList *containingModules,
906 const FileSpecList *containingSourceFiles, const char *func_name,
907 lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language,
908 lldb::addr_t offset, bool offset_is_insn_count, LazyBool skip_prologue,
909 bool internal, bool request_hardware);
910
912 CreateExceptionBreakpoint(enum lldb::LanguageType language, bool catch_bp,
913 bool throw_bp, bool internal,
914 Args *additional_args = nullptr,
915 Status *additional_args_error = nullptr);
916
918 const llvm::StringRef class_name, const FileSpecList *containingModules,
919 const FileSpecList *containingSourceFiles, bool internal,
920 bool request_hardware, StructuredData::ObjectSP extra_args_sp,
921 Status *creation_error = nullptr);
922
923 // This is the same as the func_name breakpoint except that you can specify a
924 // vector of names. This is cheaper than a regular expression breakpoint in
925 // the case where you just want to set a breakpoint on a set of names you
926 // already know. func_name_type_mask is or'ed values from the
927 // FunctionNameType enum.
929 const FileSpecList *containingModules,
930 const FileSpecList *containingSourceFiles, const char *func_names[],
931 size_t num_names, lldb::FunctionNameType func_name_type_mask,
932 lldb::LanguageType language, lldb::addr_t offset, LazyBool skip_prologue,
933 bool internal, bool request_hardware);
934
936 CreateBreakpoint(const FileSpecList *containingModules,
937 const FileSpecList *containingSourceFiles,
938 const std::vector<std::string> &func_names,
939 lldb::FunctionNameType func_name_type_mask,
940 lldb::LanguageType language, lldb::addr_t m_offset,
941 LazyBool skip_prologue, bool internal,
942 bool request_hardware);
943
944 // Use this to create a general breakpoint:
946 lldb::BreakpointResolverSP &resolver_sp,
947 bool internal, bool request_hardware,
948 bool resolve_indirect_symbols);
949
950 // Use this to create a watchpoint:
952 const CompilerType *type, uint32_t kind,
953 Status &error);
954
958
960
961 // Manages breakpoint names:
962 void AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name,
963 Status &error);
964
965 void AddNameToBreakpoint(lldb::BreakpointSP &bp_sp, llvm::StringRef name,
966 Status &error);
967
969 llvm::StringRef name);
970
971 BreakpointName *FindBreakpointName(llvm::StringRef name, bool can_create,
972 Status &error);
973
974 void DeleteBreakpointName(llvm::StringRef name);
975
977 const BreakpointOptions &options,
978 const BreakpointName::Permissions &permissions);
980
981 void AddBreakpointName(std::unique_ptr<BreakpointName> bp_name);
982
983 void GetBreakpointNames(std::vector<std::string> &names);
984
985 // This call removes ALL breakpoints regardless of permission.
986 void RemoveAllBreakpoints(bool internal_also = false);
987
988 // This removes all the breakpoints, but obeys the ePermDelete on them.
990
991 void DisableAllBreakpoints(bool internal_also = false);
992
994
995 void EnableAllBreakpoints(bool internal_also = false);
996
998
1000
1002
1004
1005 /// Resets the hit count of all breakpoints.
1007
1008 // This callout implements the "Resolver Override". When we have determined
1009 // the Resolver for a given breakpoint, we pass each of the registered
1010 // overrides the "natural" resolver, and then we will use whatever resolver
1011 // we get back from it if it is non-null.
1012 // We keep a list of overrides ordered by ID - and we search through the list
1013 // by ID order, and the first override that returns a non-null Resolver will
1014 // be the one we use. If no overrides return an override resolver, we'll use
1015 // the original one.
1016
1017 /// This is the abstract version of the override. Particular implementations,
1018 /// e.g. the scripted override resolver, instantiate actual versions of the
1019 /// class. The constructor takes the target this resolver is registered in, a
1020 /// description for the override and a mask of the resolver types this
1021 /// overrides, made of elements of the BreakpointResolverType enum.
1022 class BreakpointResolverOverride;
1024 std::unique_ptr<BreakpointResolverOverride>;
1025
1027 public:
1028 BreakpointResolverOverride(Target &target, const std::string &description,
1029 uint64_t type_mask)
1030 : m_target(target), m_desc(description), m_type_mask(type_mask) {}
1031
1033
1037 // Return whether constructing this resolver was successful.
1038 virtual llvm::Error Validate() = 0;
1039 const std::string &GetDescription() { return m_desc; }
1040 uint64_t GetTypeMask() { return m_type_mask; }
1041 std::string DescribeTypeMask();
1042
1043 protected:
1045 std::string m_desc;
1046 uint64_t m_type_mask = 0;
1047 };
1048
1049 /// Add a breakpoint override resolver. This version can't fail.
1053 m_breakpoint_overrides.emplace(m_override_id, std::move(override_up));
1054 m_override_id++;
1055 return id_used;
1056 }
1057
1058 /// Add a breakpoint override resolver. Return the ID or an error:
1059 llvm::Expected<lldb::user_id_t>
1060 AddBreakpointResolverOverride(llvm::StringRef class_name, uint64_t type_mask,
1061 StructuredData::DictionarySP args_data_sp,
1062 llvm::StringRef description);
1063
1065 size_t removed = m_breakpoint_overrides.erase(override_id);
1066 return removed == 1;
1067 }
1068
1070
1073
1074 /// Describe the breakpoint overrides. If ixds is empty, list all. Otherwise
1075 /// list the overrides whose ids match the ones given in idxs. The matched
1076 /// elements are removed from the list, so any elements remaining in idxs are
1077 /// indexes that are not breakpoint override indexes.
1079 std::vector<lldb::user_id_t> &idxs,
1080 uint32_t terminal_width, bool use_color);
1081
1082 // The flag 'end_to_end', default to true, signifies that the operation is
1083 // performed end to end, for both the debugger and the debuggee.
1084
1085 bool RemoveAllWatchpoints(bool end_to_end = true);
1086
1087 bool DisableAllWatchpoints(bool end_to_end = true);
1088
1089 bool EnableAllWatchpoints(bool end_to_end = true);
1090
1092
1094
1095 bool IgnoreAllWatchpoints(uint32_t ignore_count);
1096
1098
1100
1102
1103 bool IgnoreWatchpointByID(lldb::watch_id_t watch_id, uint32_t ignore_count);
1104
1106 const BreakpointIDList &bp_ids,
1107 bool append);
1108
1110 BreakpointIDList &new_bps);
1111
1113 std::vector<std::string> &names,
1114 BreakpointIDList &new_bps);
1115
1116 /// Get \a load_addr as a callable code load address for this target
1117 ///
1118 /// Take \a load_addr and potentially add any address bits that are
1119 /// needed to make the address callable. For ARM this can set bit
1120 /// zero (if it already isn't) if \a load_addr is a thumb function.
1121 /// If \a addr_class is set to AddressClass::eInvalid, then the address
1122 /// adjustment will always happen. If it is set to an address class
1123 /// that doesn't have code in it, LLDB_INVALID_ADDRESS will be
1124 /// returned.
1126 lldb::addr_t load_addr,
1127 AddressClass addr_class = AddressClass::eInvalid) const;
1128
1129 /// Get \a load_addr as an opcode for this target.
1130 ///
1131 /// Take \a load_addr and potentially strip any address bits that are
1132 /// needed to make the address point to an opcode. For ARM this can
1133 /// clear bit zero (if it already isn't) if \a load_addr is a
1134 /// thumb function and load_addr is in code.
1135 /// If \a addr_class is set to AddressClass::eInvalid, then the address
1136 /// adjustment will always happen. If it is set to an address class
1137 /// that doesn't have code in it, LLDB_INVALID_ADDRESS will be
1138 /// returned.
1141 AddressClass addr_class = AddressClass::eInvalid) const;
1142
1143 // Get load_addr as breakable load address for this target. Take a addr and
1144 // check if for any reason there is a better address than this to put a
1145 // breakpoint on. If there is then return that address. For MIPS, if
1146 // instruction at addr is a delay slot instruction then this method will find
1147 // the address of its previous instruction and return that address.
1149
1150 /// This call may preload module symbols, and may do so in parallel depending
1151 /// on the following target settings:
1152 /// - TargetProperties::GetPreloadSymbols()
1153 /// - TargetProperties::GetParallelModuleLoad()
1154 ///
1155 /// Warning: if preloading is active and this is called in parallel with
1156 /// Target::GetOrCreateModule, this may result in a ABBA deadlock situation.
1157 void ModulesDidLoad(ModuleList &module_list);
1158
1159 void ModulesDidUnload(ModuleList &module_list, bool delete_locations);
1160
1161 void SymbolsDidLoad(ModuleList &module_list);
1162
1163 void ClearModules(bool delete_locations);
1164
1165 /// Called as the last function in Process::DidExec().
1166 ///
1167 /// Process::DidExec() will clear a lot of state in the process,
1168 /// then try to reload a dynamic loader plugin to discover what
1169 /// binaries are currently available and then this function should
1170 /// be called to allow the target to do any cleanup after everything
1171 /// has been figured out. It can remove breakpoints that no longer
1172 /// make sense as the exec might have changed the target
1173 /// architecture, and unloaded some modules that might get deleted.
1174 void DidExec();
1175
1176 /// Gets the module for the main executable.
1177 ///
1178 /// Each process has a notion of a main executable that is the file
1179 /// that will be executed or attached to. Executable files can have
1180 /// dependent modules that are discovered from the object files, or
1181 /// discovered at runtime as things are dynamically loaded.
1182 ///
1183 /// \return
1184 /// The shared pointer to the executable module which can
1185 /// contains a nullptr Module object if no executable has been
1186 /// set.
1187 ///
1188 /// \see DynamicLoader
1189 /// \see ObjectFile::GetDependentModules (FileSpecList&)
1190 /// \see Process::SetExecutableModule(lldb::ModuleSP&)
1192
1194
1195 /// Set the main executable module.
1196 ///
1197 /// Each process has a notion of a main executable that is the file
1198 /// that will be executed or attached to. Executable files can have
1199 /// dependent modules that are discovered from the object files, or
1200 /// discovered at runtime as things are dynamically loaded.
1201 ///
1202 /// Setting the executable causes any of the current dependent
1203 /// image information to be cleared and replaced with the static
1204 /// dependent image information found by calling
1205 /// ObjectFile::GetDependentModules (FileSpecList&) on the main
1206 /// executable and any modules on which it depends. Calling
1207 /// Process::GetImages() will return the newly found images that
1208 /// were obtained from all of the object files.
1209 ///
1210 /// \param[in] module_sp
1211 /// A shared pointer reference to the module that will become
1212 /// the main executable for this process.
1213 ///
1214 /// \param[in] load_dependent_files
1215 /// If \b true then ask the object files to track down any
1216 /// known dependent files.
1217 ///
1218 /// \see ObjectFile::GetDependentModules (FileSpecList&)
1219 /// \see Process::GetImages()
1221 lldb::ModuleSP &module_sp,
1222 LoadDependentFiles load_dependent_files = eLoadDependentsDefault);
1223
1224 bool LoadScriptingResources(std::list<Status> &errors,
1225 bool continue_on_error = true) {
1226 return m_images.LoadScriptingResourcesInTarget(this, errors,
1227 continue_on_error);
1228 }
1229
1230 /// Get accessor for the images for this process.
1231 ///
1232 /// Each process has a notion of a main executable that is the file
1233 /// that will be executed or attached to. Executable files can have
1234 /// dependent modules that are discovered from the object files, or
1235 /// discovered at runtime as things are dynamically loaded. After
1236 /// a main executable has been set, the images will contain a list
1237 /// of all the files that the executable depends upon as far as the
1238 /// object files know. These images will usually contain valid file
1239 /// virtual addresses only. When the process is launched or attached
1240 /// to, the DynamicLoader plug-in will discover where these images
1241 /// were loaded in memory and will resolve the load virtual
1242 /// addresses is each image, and also in images that are loaded by
1243 /// code.
1244 ///
1245 /// \return
1246 /// A list of Module objects in a module list.
1247 const ModuleList &GetImages() const { return m_images; }
1248
1250
1251 /// Return whether this FileSpec corresponds to a module that should be
1252 /// considered for general searches.
1253 ///
1254 /// This API will be consulted by the SearchFilterForUnconstrainedSearches
1255 /// and any module that returns \b true will not be searched. Note the
1256 /// SearchFilterForUnconstrainedSearches is the search filter that
1257 /// gets used in the CreateBreakpoint calls when no modules is provided.
1258 ///
1259 /// The target call at present just consults the Platform's call of the
1260 /// same name.
1261 ///
1262 /// \param[in] module_spec
1263 /// Path to the module.
1264 ///
1265 /// \return \b true if the module should be excluded, \b false otherwise.
1266 bool ModuleIsExcludedForUnconstrainedSearches(const FileSpec &module_spec);
1267
1268 /// Return whether this module should be considered for general searches.
1269 ///
1270 /// This API will be consulted by the SearchFilterForUnconstrainedSearches
1271 /// and any module that returns \b true will not be searched. Note the
1272 /// SearchFilterForUnconstrainedSearches is the search filter that
1273 /// gets used in the CreateBreakpoint calls when no modules is provided.
1274 ///
1275 /// The target call at present just consults the Platform's call of the
1276 /// same name.
1277 ///
1278 /// FIXME: When we get time we should add a way for the user to set modules
1279 /// that they
1280 /// don't want searched, in addition to or instead of the platform ones.
1281 ///
1282 /// \param[in] module_sp
1283 /// A shared pointer reference to the module that checked.
1284 ///
1285 /// \return \b true if the module should be excluded, \b false otherwise.
1286 bool
1288
1289 const ArchSpec &GetArchitecture() const { return m_arch.GetSpec(); }
1290
1291 /// Returns the name of the target's ABI plugin.
1292 llvm::StringRef GetABIName() const;
1293
1294 /// Set the architecture for this target.
1295 ///
1296 /// If the current target has no Images read in, then this just sets the
1297 /// architecture, which will be used to select the architecture of the
1298 /// ExecutableModule when that is set. If the current target has an
1299 /// ExecutableModule, then calling SetArchitecture with a different
1300 /// architecture from the currently selected one will reset the
1301 /// ExecutableModule to that slice of the file backing the ExecutableModule.
1302 /// If the file backing the ExecutableModule does not contain a fork of this
1303 /// architecture, then this code will return false, and the architecture
1304 /// won't be changed. If the input arch_spec is the same as the already set
1305 /// architecture, this is a no-op.
1306 ///
1307 /// \param[in] arch_spec
1308 /// The new architecture.
1309 ///
1310 /// \param[in] set_platform
1311 /// If \b true, then the platform will be adjusted if the currently
1312 /// selected platform is not compatible with the architecture being set.
1313 /// If \b false, then just the architecture will be set even if the
1314 /// currently selected platform isn't compatible (in case it might be
1315 /// manually set following this function call).
1316 ///
1317 /// \param[in] merged
1318 /// If true, arch_spec is merged with the current
1319 /// architecture. Otherwise it's replaced.
1320 ///
1321 /// \return
1322 /// \b true if the architecture was successfully set, \b false otherwise.
1323 bool SetArchitecture(const ArchSpec &arch_spec, bool set_platform = false,
1324 bool merge = true);
1325
1326 bool MergeArchitecture(const ArchSpec &arch_spec);
1327
1328 Architecture *GetArchitecturePlugin() const { return m_arch.GetPlugin(); }
1329
1330 Debugger &GetDebugger() const { return m_debugger; }
1331
1332 size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len,
1333 Status &error);
1334
1335 // Reading memory through the target allows us to skip going to the process
1336 // for reading memory if possible and it allows us to try and read from any
1337 // constant sections in our object files on disk. If you always want live
1338 // program memory, read straight from the process. If you possibly want to
1339 // read from const sections in object files, read from the target. This
1340 // version of ReadMemory will try and read memory from the process if the
1341 // process is alive. The order is:
1342 // 1 - if (force_live_memory == false) and the address falls in a read-only
1343 // section, then read from the file cache
1344 // 2 - if there is a process, then read from memory
1345 // 3 - if there is no process, then read from the file cache
1346 //
1347 // If did_read_live_memory is provided, will indicate if the read was from
1348 // live memory, or from file contents. A caller which needs to treat these two
1349 // sources differently should use this argument to disambiguate where the data
1350 // was read from.
1351 //
1352 // The method is virtual for mocking in the unit tests.
1353 virtual size_t ReadMemory(const Address &addr, void *dst, size_t dst_len,
1354 Status &error, bool force_live_memory = false,
1355 lldb::addr_t *load_addr_ptr = nullptr,
1356 bool *did_read_live_memory = nullptr);
1357
1358 size_t ReadCStringFromMemory(const Address &addr, std::string &out_str,
1359 Status &error, bool force_live_memory = false);
1360
1361 size_t ReadCStringFromMemory(const Address &addr, char *dst,
1362 size_t dst_max_len, Status &result_error,
1363 bool force_live_memory = false);
1364
1365 /// Read a NULL terminated string from memory
1366 ///
1367 /// This function will read a cache page at a time until a NULL string
1368 /// terminator is found. It will stop reading if an aligned sequence of NULL
1369 /// termination \a type_width bytes is not found before reading \a
1370 /// cstr_max_len bytes. The results are always guaranteed to be NULL
1371 /// terminated, and that no more than (max_bytes - type_width) bytes will be
1372 /// read.
1373 ///
1374 /// \param[in] addr
1375 /// The address to start the memory read.
1376 ///
1377 /// \param[in] dst
1378 /// A character buffer containing at least max_bytes.
1379 ///
1380 /// \param[in] max_bytes
1381 /// The maximum number of bytes to read.
1382 ///
1383 /// \param[in] error
1384 /// The error status of the read operation.
1385 ///
1386 /// \param[in] type_width
1387 /// The size of the null terminator (1 to 4 bytes per
1388 /// character). Defaults to 1.
1389 ///
1390 /// \return
1391 /// The error status or the number of bytes prior to the null terminator.
1392 size_t ReadStringFromMemory(const Address &addr, char *dst, size_t max_bytes,
1393 Status &error, size_t type_width,
1394 bool force_live_memory = true);
1395
1396 size_t ReadScalarIntegerFromMemory(const Address &addr, uint32_t byte_size,
1397 bool is_signed, Scalar &scalar,
1398 Status &error,
1399 bool force_live_memory = false);
1400
1401 int64_t ReadSignedIntegerFromMemory(const Address &addr,
1402 size_t integer_byte_size,
1403 int64_t fail_value, Status &error,
1404 bool force_live_memory = false);
1405
1406 uint64_t ReadUnsignedIntegerFromMemory(const Address &addr,
1407 size_t integer_byte_size,
1408 uint64_t fail_value, Status &error,
1409 bool force_live_memory = false);
1410
1411 bool ReadPointerFromMemory(const Address &addr, Status &error,
1412 Address &pointer_addr,
1413 bool force_live_memory = false);
1414
1415 bool HasLoadedSections();
1416
1418
1419 void ClearSectionLoadList();
1420
1421 void DumpSectionLoadList(Stream &s);
1422
1423 static Target *GetTargetFromContexts(const ExecutionContext *exe_ctx_ptr,
1424 const SymbolContext *sc_ptr);
1425
1426 // lldb::ExecutionContextScope pure virtual functions
1428
1430
1432
1434
1435 void CalculateExecutionContext(ExecutionContext &exe_ctx) override;
1436
1438
1439 llvm::Expected<lldb::TypeSystemSP>
1441 bool create_on_demand = true);
1442
1443 std::vector<lldb::TypeSystemSP>
1444 GetScratchTypeSystems(bool create_on_demand = true);
1445
1448
1449 // Creates a UserExpression for the given language, the rest of the
1450 // parameters have the same meaning as for the UserExpression constructor.
1451 // Returns a new-ed object which the caller owns.
1452
1454 GetUserExpressionForLanguage(llvm::StringRef expr, llvm::StringRef prefix,
1455 SourceLanguage language,
1456 Expression::ResultType desired_type,
1457 const EvaluateExpressionOptions &options,
1458 ValueObject *ctx_obj, Status &error);
1459
1460 // Creates a FunctionCaller for the given language, the rest of the
1461 // parameters have the same meaning as for the FunctionCaller constructor.
1462 // Since a FunctionCaller can't be
1463 // IR Interpreted, it makes no sense to call this with an
1464 // ExecutionContextScope that lacks
1465 // a Process.
1466 // Returns a new-ed object which the caller owns.
1467
1469 const CompilerType &return_type,
1470 const Address &function_address,
1471 const ValueList &arg_value_list,
1472 const char *name, Status &error);
1473
1474 /// Creates and installs a UtilityFunction for the given language.
1475 llvm::Expected<std::unique_ptr<UtilityFunction>>
1476 CreateUtilityFunction(std::string expression, std::string name,
1477 lldb::LanguageType language, ExecutionContext &exe_ctx);
1478
1479 // Install any files through the platform that need be to installed prior to
1480 // launching or attaching.
1481 Status Install(ProcessLaunchInfo *launch_info);
1482
1483 bool ResolveFileAddress(lldb::addr_t load_addr, Address &so_addr);
1484
1485 bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr,
1486 uint32_t stop_id = SectionLoadHistory::eStopIDNow,
1487 bool allow_section_end = false);
1488
1489 bool SetSectionLoadAddress(const lldb::SectionSP &section,
1490 lldb::addr_t load_addr,
1491 bool warn_multiple = false);
1492
1493 size_t UnloadModuleSections(const lldb::ModuleSP &module_sp);
1494
1495 size_t UnloadModuleSections(const ModuleList &module_list);
1496
1497 bool SetSectionUnloaded(const lldb::SectionSP &section_sp);
1498
1499 bool SetSectionUnloaded(const lldb::SectionSP &section_sp,
1500 lldb::addr_t load_addr);
1501
1503
1505 lldb_private::TypeSummaryImpl &summary_provider);
1507
1508 /// Set the \a Trace object containing processor trace information of this
1509 /// target.
1510 ///
1511 /// \param[in] trace_sp
1512 /// The trace object.
1513 void SetTrace(const lldb::TraceSP &trace_sp);
1514
1515 /// Get the \a Trace object containing processor trace information of this
1516 /// target.
1517 ///
1518 /// \return
1519 /// The trace object. It might be undefined.
1521
1522 /// Create a \a Trace object for the current target using the using the
1523 /// default supported tracing technology for this process.
1524 ///
1525 /// \return
1526 /// The new \a Trace or an \a llvm::Error if a \a Trace already exists or
1527 /// the trace couldn't be created.
1528 llvm::Expected<lldb::TraceSP> CreateTrace();
1529
1530 /// If a \a Trace object is present, this returns it, otherwise a new Trace is
1531 /// created with \a Trace::CreateTrace.
1532 llvm::Expected<lldb::TraceSP> GetTraceOrCreate();
1533
1534 // Since expressions results can persist beyond the lifetime of a process,
1535 // and the const expression results are available after a process is gone, we
1536 // provide a way for expressions to be evaluated from the Target itself. If
1537 // an expression is going to be run, then it should have a frame filled in in
1538 // the execution context.
1540 llvm::StringRef expression, ExecutionContextScope *exe_scope,
1541 lldb::ValueObjectSP &result_valobj_sp,
1543 std::string *fixed_expression = nullptr, ValueObject *ctx_obj = nullptr);
1544
1546
1548
1549 /// This method will return the address of the starting function for
1550 /// this binary, e.g. main() or its equivalent. This can be used as
1551 /// an address of a function that is not called once a binary has
1552 /// started running - e.g. as a return address for inferior function
1553 /// calls that are unambiguous completion of the function call, not
1554 /// called during the course of the inferior function code running.
1555 ///
1556 /// If no entry point can be found, an invalid address is returned.
1557 ///
1558 /// \param [out] err
1559 /// This object will be set to failure if no entry address could
1560 /// be found, and may contain a helpful error message.
1561 //
1562 /// \return
1563 /// Returns the entry address for this program, or an error
1564 /// if none can be found.
1565 llvm::Expected<lldb_private::Address> GetEntryPointAddress();
1566
1567 CompilerType GetRegisterType(const RegisterInfo &reg_info);
1568
1569 /// Sends a breakpoint notification event.
1571 lldb::BreakpointEventType event_kind);
1572 /// Sends a breakpoint notification event.
1574 const lldb::EventDataSP &breakpoint_data_sp);
1575
1576 llvm::Expected<lldb::DisassemblerSP>
1577 ReadInstructions(const Address &start_addr, uint32_t count,
1578 const char *flavor_string = nullptr);
1579
1580 // Target Stop Hooks
1581 class StopHook : public UserID {
1582 public:
1583 StopHook(const StopHook &rhs);
1584 virtual ~StopHook() = default;
1585
1586 enum class StopHookKind : uint32_t {
1590 };
1597
1599
1600 // Set the specifier. The stop hook will own the specifier, and is
1601 // responsible for deleting it when we're done.
1602 void SetSpecifier(SymbolContextSpecifier *specifier);
1603
1605
1606 bool ExecutionContextPasses(const ExecutionContext &exe_ctx);
1607
1608 // Called on stop, this gets passed the ExecutionContext for each "stop
1609 // with a reason" thread. It should add to the stream whatever text it
1610 // wants to show the user, and return False to indicate it wants the target
1611 // not to stop.
1613 lldb::StreamSP output) = 0;
1614
1615 // Set the Thread Specifier. The stop hook will own the thread specifier,
1616 // and is responsible for deleting it when we're done.
1617 void SetThreadSpecifier(ThreadSpec *specifier);
1618
1620
1621 bool IsActive() { return m_active; }
1622
1623 void SetIsActive(bool is_active) { m_active = is_active; }
1624
1625 void SetAutoContinue(bool auto_continue) {
1626 m_auto_continue = auto_continue;
1627 }
1628
1629 bool GetAutoContinue() const { return m_auto_continue; }
1630
1631 void SetRunAtInitialStop(bool at_initial_stop) {
1632 m_at_initial_stop = at_initial_stop;
1633 }
1634
1636
1637 void SetSuppressOutput(bool suppress_output) {
1638 m_suppress_output = suppress_output;
1639 }
1640
1641 bool GetSuppressOutput() const { return m_suppress_output; }
1642
1643 void GetDescription(Stream &s, lldb::DescriptionLevel level) const;
1645 lldb::DescriptionLevel level) const = 0;
1646
1647 protected:
1650 std::unique_ptr<ThreadSpec> m_thread_spec_up;
1651 bool m_active = true;
1652 bool m_auto_continue = false;
1654 bool m_suppress_output = false;
1655
1656 StopHook(lldb::TargetSP target_sp, lldb::user_id_t uid);
1657 };
1658
1660 public:
1661 ~StopHookCommandLine() override = default;
1662
1664 void SetActionFromString(const std::string &strings);
1665 void SetActionFromStrings(const std::vector<std::string> &strings);
1666
1668 lldb::StreamSP output_sp) override;
1670 lldb::DescriptionLevel level) const override;
1671
1672 private:
1674 // Use CreateStopHook to make a new empty stop hook. Use SetActionFromString
1675 // to fill it with commands, and SetSpecifier to set the specifier shared
1676 // pointer (can be null, that will match anything.)
1678 : StopHook(target_sp, uid) {}
1679 friend class Target;
1680 };
1681
1683 public:
1684 ~StopHookScripted() override = default;
1686 lldb::StreamSP output) override;
1687
1688 Status SetScriptCallback(const ScriptedMetadata &scripted_metadata);
1689
1691 lldb::DescriptionLevel level) const override;
1692
1693 private:
1694 llvm::StringRef GetScriptClassName() const;
1695
1697
1698 /// Use CreateStopHook to make a new empty stop hook. Use SetScriptCallback
1699 /// to set the script to execute, and SetSpecifier to set the specifier
1700 /// shared pointer (can be null, that will match anything.)
1702 : StopHook(target_sp, uid) {}
1703 friend class Target;
1704 };
1705
1706 class StopHookCoded : public StopHook {
1707 public:
1708 ~StopHookCoded() override = default;
1709
1711 lldb::StreamSP output);
1712
1713 void SetCallback(llvm::StringRef name, HandleStopCallback *callback) {
1714 m_name = name;
1715 m_callback = callback;
1716 }
1717
1719 lldb::StreamSP output) override {
1720 return m_callback(exc_ctx, output);
1721 }
1722
1724 lldb::DescriptionLevel level) const override {
1725 s.Indent();
1726 s.Printf("%s (built-in)\n", m_name.c_str());
1727 }
1728
1729 private:
1730 std::string m_name;
1732
1733 /// Use CreateStopHook to make a new empty stop hook. Use SetCallback to set
1734 /// the callback to execute, and SetSpecifier to set the specifier shared
1735 /// pointer (can be null, that will match anything.)
1737 : StopHook(target_sp, uid) {}
1738 friend class Target;
1739 };
1740
1742
1743 typedef std::shared_ptr<StopHook> StopHookSP;
1744
1745 // Target Hooks
1746 //
1747 // Hooks fire on target lifecycle events. There are two flows:
1748 //
1749 // Command-based hooks: the user specifies which triggers the hook responds
1750 // to (--on-load, --on-unload, --on-stop) and provides a list of commands.
1751 // All commands run for every trigger the hook is signed up for.
1752 //
1753 // Python class hooks: the user provides a Python class name and optional
1754 // extra_args that will be passed to the hook init method (-k key -v value).
1755 // The class controls which events it handles by implementing the
1756 // corresponding callback methods (handle_module_loaded,
1757 // handle_module_unloaded, handle_stop). Triggers are set automatically
1758 // based on which methods exist.
1759 class Hook : public UserID {
1760 public:
1761 Hook(const Hook &rhs);
1762 virtual ~Hook() = default;
1763
1764 enum class HookKind : uint32_t { CommandBased = 0, ScriptBased };
1765
1766 HookKind GetHookKind() const { return m_kind; }
1767
1768 /// Individual trigger bits. Combine with bitwise OR to form a trigger mask.
1769 // FIXME: Add kProcessExit, kProcessDetach, etc. as needed.
1770 enum TriggerBit : uint32_t {
1771 kModulesLoaded = (1u << 0),
1772 kModulesUnloaded = (1u << 1),
1773 kProcessStop = (1u << 2),
1774 };
1775
1777
1778 bool IsEnabled() { return m_enabled; }
1779 void SetIsEnabled(bool enabled) { m_enabled = enabled; }
1780
1781 /// Return the bitmask of triggers this hook responds to.
1782 /// Each bit corresponds to a TriggerBit value.
1783 uint32_t GetTriggerMask() const { return m_trigger_mask; }
1784
1785 /// Return true if this hook fires on the given trigger.
1786 bool FiresOn(uint32_t trigger) const { return m_trigger_mask & trigger; }
1787
1788 // Filter fields
1789
1790 /// Set the symbol context specifier. The hook takes ownership.
1791 void SetSCSpecifier(SymbolContextSpecifier *specifier);
1793
1794 /// Check if the execution context passes the specifier and thread spec
1795 /// filters. Always returns true if no filters are set.
1796 bool ExecutionContextPasses(const ExecutionContext &exe_ctx);
1797
1798 /// Set the thread specifier. The hook takes ownership.
1799 void SetThreadSpecifier(ThreadSpec *specifier);
1801
1802 void SetRunAtInitialStop(bool at_initial_stop) {
1803 m_at_initial_stop = at_initial_stop;
1804 }
1806
1807 // Reaction settings
1808
1809 void SetAutoContinue(bool auto_continue) {
1810 m_auto_continue = auto_continue;
1811 }
1812 bool GetAutoContinue() const { return m_auto_continue; }
1813
1814 void SetSuppressOutput(bool suppress_output) {
1815 m_suppress_output = suppress_output;
1816 }
1817 bool GetSuppressOutput() const { return m_suppress_output; }
1818
1819 // Event handler methods (default no-ops)
1820
1821 virtual void HandleModuleLoaded(lldb::StreamSP output) {}
1822 virtual void HandleModuleUnloaded(lldb::StreamSP output) {}
1823
1824 /// Called when the process stops. Returns a StopHookResult indicating
1825 /// whether the process should remain stopped or continue.
1830
1831 virtual void GetDescription(Stream &s, lldb::DescriptionLevel level) const;
1832
1833 protected:
1834 /// Print the filter portion of the description (AutoContinue, Specifier,
1835 /// ThreadSpec). Called by subclass GetDescription after printing the
1836 /// hook-specific content (commands or class).
1840 bool m_enabled = true;
1841 uint32_t m_trigger_mask = 0; // No default, triggers must be explicit.
1842
1843 // Filters
1845 std::unique_ptr<ThreadSpec> m_thread_spec_up;
1847
1848 // Reaction settings
1849 bool m_auto_continue = false;
1850 bool m_suppress_output = false;
1851
1852 Hook(lldb::TargetSP target_sp, lldb::user_id_t uid, HookKind kind);
1853 };
1854
1855 class HookCommandLine : public Hook {
1856 public:
1857 ~HookCommandLine() override = default;
1858
1859 /// Replace the trigger mask. \a mask is a bitwise OR of TriggerBit values.
1860 void SetTriggerMask(uint32_t mask) { m_trigger_mask = mask; }
1861
1862 /// Add a trigger to the mask. \a trigger is a single TriggerBit value.
1863 void AddTrigger(uint32_t trigger) { m_trigger_mask |= trigger; }
1864
1865 /// Remove a trigger from the mask. \a trigger is a single TriggerBit value.
1866 void RemoveTrigger(uint32_t trigger) { m_trigger_mask &= ~trigger; }
1867
1868 /// Return the list of commands that this hook runs.
1870
1871 /// Populate the command list by splitting a single string on newlines.
1872 void SetActionFromString(const std::string &string);
1873
1874 /// Populate the command list from a vector of individual command strings.
1875 void SetActionFromStrings(const std::vector<std::string> &strings);
1876
1877 void GetDescription(Stream &s, lldb::DescriptionLevel level) const override;
1878 void HandleModuleLoaded(lldb::StreamSP output) override;
1879 void HandleModuleUnloaded(lldb::StreamSP output) override;
1881 lldb::StreamSP output) override;
1882
1883 private:
1885
1887 : Hook(target_sp, uid, HookKind::CommandBased) {}
1888 friend class Target;
1889 };
1890
1891 class HookScripted : public Hook {
1892 public:
1893 ~HookScripted() override = default;
1894
1895 void GetDescription(Stream &s, lldb::DescriptionLevel level) const override;
1896
1897 void HandleModuleLoaded(lldb::StreamSP output) override;
1898 void HandleModuleUnloaded(lldb::StreamSP output) override;
1900 lldb::StreamSP output) override;
1901
1902 Status SetScriptCallback(const ScriptedMetadata &scripted_metadata);
1903
1904 private:
1905 llvm::StringRef GetScriptClassName() const;
1906
1908
1910 : Hook(target_sp, uid, HookKind::ScriptBased) {}
1911 friend class Target;
1912 };
1913
1914 typedef std::shared_ptr<Hook> HookSP;
1915
1917
1918 /// Removes the most recently created hook. Used to roll back a
1919 /// hook creation when an error occurs (e.g., invalid script class name
1920 /// or empty interactive input).
1922
1924
1925 void RemoveAllHooks();
1926
1928
1929 bool SetHookEnabledStateByID(lldb::user_id_t uid, bool enabled);
1930
1931 void SetAllHooksEnabledState(bool enabled);
1932
1933 size_t GetNumHooks() const { return m_hooks.size(); }
1934
1935 HookSP GetHookAtIndex(size_t index);
1936
1937 void RunModuleHooks(bool is_load);
1938
1939 /// Add an empty stop hook to the Target's stop hook list, and returns a
1940 /// shared pointer to the new hook.
1941 StopHookSP CreateStopHook(StopHook::StopHookKind kind, bool internal = false);
1942
1943 /// If you tried to create a stop hook, and that failed, call this to
1944 /// remove the stop hook, as it will also reset the stop hook counter.
1946
1947 // Runs the stop hooks that have been registered for this target.
1948 // Returns true if the stop hooks cause the target to resume.
1949 // Pass at_initial_stop if this is the stop where lldb gains
1950 // control over the process for the first time.
1951 bool RunStopHooks(bool at_initial_stop = false);
1952
1953 bool SetSuppresStopHooks(bool suppress) {
1954 bool old_value = m_suppress_stop_hooks;
1955 m_suppress_stop_hooks = suppress;
1956 return old_value;
1957 }
1958
1960
1962
1963 void RemoveAllStopHooks();
1964
1965 StopHookSP GetStopHookByID(lldb::user_id_t uid);
1966
1967 bool SetStopHookActiveStateByID(lldb::user_id_t uid, bool active_state);
1968
1969 void SetAllStopHooksActiveState(bool active_state);
1970
1971 const std::vector<StopHookSP> GetStopHooks(bool internal = false) const;
1972
1974
1975 void SetPlatform(const lldb::PlatformSP &platform_sp) {
1976 m_platform_sp = platform_sp;
1977 }
1978
1980
1981 // Methods.
1983 GetSearchFilterForModule(const FileSpec *containingModule);
1984
1986 GetSearchFilterForModuleList(const FileSpecList *containingModuleList);
1987
1989 GetSearchFilterForModuleAndCUList(const FileSpecList *containingModules,
1990 const FileSpecList *containingSourceFiles);
1991
1993 const char *repl_options, bool can_create);
1994
1995 void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp);
1996
2000
2002
2003 /// Get the list of paths that LLDB will consider automatically loading
2004 /// scripting resources from. Currently whether to load scripts
2005 /// unconditionally is controlled via the
2006 /// `target.load-script-from-symbol-file` setting.
2008
2009 /// Add a signal for the target. This will get copied over to the process
2010 /// if the signal exists on that target. Only the values with Yes and No are
2011 /// set, Calculate values will be ignored.
2012protected:
2021 using DummySignalElement = llvm::StringMapEntry<DummySignalValues>;
2022 static bool UpdateSignalFromDummy(lldb::UnixSignalsSP signals_sp,
2023 const DummySignalElement &element);
2024 static bool ResetSignalFromDummy(lldb::UnixSignalsSP signals_sp,
2025 const DummySignalElement &element);
2026
2027public:
2028 /// Add a signal to the Target's list of stored signals/actions. These
2029 /// values will get copied into any processes launched from
2030 /// this target.
2031 void AddDummySignal(llvm::StringRef name, LazyBool pass, LazyBool print,
2032 LazyBool stop);
2033 /// Updates the signals in signals_sp using the stored dummy signals.
2034 /// If warning_stream_sp is not null, if any stored signals are not found in
2035 /// the current process, a warning will be emitted here.
2037 lldb::StreamSP warning_stream_sp);
2038 /// Clear the dummy signals in signal_names from the target, or all signals
2039 /// if signal_names is empty. Also remove the behaviors they set from the
2040 /// process's signals if it exists.
2041 void ClearDummySignals(Args &signal_names);
2042 /// Print all the signals set in this target.
2043 void PrintDummySignals(Stream &strm, Args &signals);
2044
2045protected:
2046 /// Implementing of ModuleList::Notifier.
2047
2048 void NotifyModuleAdded(const ModuleList &module_list,
2049 const lldb::ModuleSP &module_sp) override;
2050
2051 void NotifyModuleRemoved(const ModuleList &module_list,
2052 const lldb::ModuleSP &module_sp) override;
2053
2054 void NotifyModuleUpdated(const ModuleList &module_list,
2055 const lldb::ModuleSP &old_module_sp,
2056 const lldb::ModuleSP &new_module_sp) override;
2057
2058 void NotifyWillClearList(const ModuleList &module_list) override;
2059
2060 void NotifyModulesRemoved(lldb_private::ModuleList &module_list) override;
2061
2062 class Arch {
2063 public:
2064 explicit Arch(const ArchSpec &spec);
2065 const Arch &operator=(const ArchSpec &spec);
2066
2067 const ArchSpec &GetSpec() const { return m_spec; }
2068 Architecture *GetPlugin() const { return m_plugin_up.get(); }
2069
2070 private:
2072 std::unique_ptr<Architecture> m_plugin_up;
2073 };
2074
2075 // Member variables.
2077 lldb::PlatformSP m_platform_sp; ///< The platform for this target.
2078 std::recursive_mutex m_mutex; ///< An API mutex that is used by the lldb::SB*
2079 /// classes make the SB interface thread safe
2080 /// When the private state thread calls SB API's - usually because it is
2081 /// running OS plugin or Python ThreadPlan code - it should not block on the
2082 /// API mutex that is held by the code that kicked off the sequence of events
2083 /// that led us to run the code. We hand out this mutex instead when we
2084 /// detect that code is running on the private state thread.
2085 std::recursive_mutex m_private_mutex;
2087 std::string m_label;
2088 ModuleList m_images; ///< The list of images for this process (shared
2089 /// libraries and anything dynamically loaded).
2094 using BreakpointNameMap = llvm::StringMap<std::unique_ptr<BreakpointName>>;
2096
2097 std::map<lldb::user_id_t, BreakpointResolverOverrideUP>
2099 /// This is the ID that will be handed out for the next added breakpoint
2100 /// override resolver for this target.
2102
2106 // We want to tightly control the process destruction process so we can
2107 // correctly tear down everything that we need to, so the only class that
2108 // knows about the process lifespan is this target class.
2113
2114 /// Map of scripted frame provider descriptors for this target.
2115 /// Keys are the provider descriptor IDs, values are the descriptors.
2116 /// Insertion order is preserved so that equal-priority providers chain
2117 /// in registration order.
2118 llvm::MapVector<uint32_t, ScriptedFrameProviderDescriptor>
2120 mutable std::recursive_mutex m_frame_provider_descriptors_mutex;
2122
2123 typedef std::map<lldb::LanguageType, lldb::REPLSP> REPLMap;
2125
2127
2128 typedef std::map<lldb::user_id_t, StopHookSP> StopHookCollection;
2131 std::vector<StopHookSP> m_internal_stop_hooks;
2132 uint32_t m_latest_stop_hook_id; /// This records the last natural stop at
2133 /// which we ran a stop-hook.
2135 bool m_suppress_stop_hooks; /// Used to not run stop hooks for expressions
2137
2138 typedef std::map<lldb::user_id_t, HookSP> HookCollection;
2143 LLDB_INVALID_GLOBALLY_UNIQUE_TARGET_ID; ///< The globally unique ID
2144 /// assigned to this target
2145 std::string m_target_session_name; ///< The target session name for this
2146 /// target, used to name debugging
2147 /// sessions in DAP.
2148 /// An optional \a lldb_private::Trace object containing processor trace
2149 /// information of this target.
2151 /// Stores the frame recognizers of this target.
2153 /// These are used to set the signal state when you don't have a process and
2154 /// more usefully in the Dummy target where you can't know exactly what
2155 /// signals you will have.
2156 llvm::StringMap<DummySignalValues> m_dummy_signals;
2157
2159
2160 static void ImageSearchPathsChanged(const PathMappingList &path_list,
2161 void *baton);
2162
2163 // Utilities for `statistics` command.
2164private:
2165 // Target metrics storage.
2167
2168public:
2169 /// Get metrics associated with this target in JSON format.
2170 ///
2171 /// Target metrics help measure timings and information that is contained in
2172 /// a target. These are designed to help measure performance of a debug
2173 /// session as well as represent the current state of the target, like
2174 /// information on the currently modules, currently set breakpoints and more.
2175 ///
2176 /// \return
2177 /// Returns a JSON value that contains all target metrics.
2178 llvm::json::Value
2180
2181 void ResetStatistics();
2182
2184
2185protected:
2186 /// Construct with optional file and arch.
2187 ///
2188 /// This member is private. Clients must use
2189 /// TargetList::CreateTarget(const FileSpec*, const ArchSpec*)
2190 /// so all targets can be tracked from the central target list.
2191 ///
2192 /// \see TargetList::CreateTarget(const FileSpec*, const ArchSpec*)
2193 Target(Debugger &debugger, const ArchSpec &target_arch,
2194 const lldb::PlatformSP &platform_sp, bool is_dummy_target);
2195
2196 // Helper function.
2197 bool ProcessIsValid();
2198
2199 // Copy breakpoints, stop hooks and so forth from the dummy target:
2200 void PrimeFromDummyTarget(Target &target);
2201
2202 void AddBreakpoint(lldb::BreakpointSP breakpoint_sp, bool internal);
2203
2205
2206 /// Return a recommended size for memory reads at \a addr, optimizing for
2207 /// cache usage.
2209
2210 Target(const Target &) = delete;
2211 const Target &operator=(const Target &) = delete;
2212
2214 return m_section_load_history.GetCurrentSectionLoadList();
2215 }
2216};
2217
2218} // namespace lldb_private
2219
2220#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:368
void SetOneThreadTimeout(const Timeout< std::micro > &timeout)
Definition Target.h:427
void SetUnwindOnError(bool unwind=false)
Definition Target.h:400
SourceLanguage GetLanguage() const
Definition Target.h:362
const char * GetPoundLineFilePath() const
Definition Target.h:490
lldb::DynamicValueType m_use_dynamic
Definition Target.h:558
void SetExecutionPolicy(ExecutionPolicy policy=eExecutionPolicyAlways)
Definition Target.h:358
Timeout< std::micro > m_one_thread_timeout
Definition Target.h:560
bool InvokeCancelCallback(lldb::ExpressionEvaluationPhase phase) const
Definition Target.h:472
lldb::DynamicValueType GetUseDynamic() const
Definition Target.h:412
void SetKeepInMemory(bool keep=true)
Definition Target.h:410
void SetCoerceToId(bool coerce=true)
Definition Target.h:396
void SetLanguage(lldb::LanguageType language_type)
Definition Target.h:364
ExecutionPolicy GetExecutionPolicy() const
Definition Target.h:356
Timeout< std::micro > m_timeout
Definition Target.h:559
void SetCppIgnoreContextQualifiers(bool value)
Definition Target.cpp:6151
const StructuredData::Dictionary & GetLanguageOptions() const
Definition Target.cpp:6129
llvm::Expected< bool > GetBooleanLanguageOption(llvm::StringRef option_name) const
Get the language-plugin specific boolean option called option_name.
Definition Target.cpp:6113
void SetPrefix(const char *prefix)
Definition Target.h:389
void SetTryAllThreads(bool try_others=true)
Definition Target.h:433
static constexpr std::chrono::milliseconds default_timeout
Definition Target.h:348
void SetPoundLine(const char *path, uint32_t line) const
Definition Target.h:480
void SetRetriesWithFixIts(uint64_t number_of_retries)
Definition Target.h:506
SymbolContextList m_preferred_lookup_contexts
During expression evaluation, any SymbolContext in this list will be used for symbol/function lookup ...
Definition Target.h:576
void SetTimeout(const Timeout< std::micro > &timeout)
Definition Target.h:421
static constexpr ExecutionPolicy default_execution_policy
Definition Target.h:353
void SetStopOthers(bool stop_others=true)
Definition Target.h:437
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:556
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:6096
StructuredData::DictionarySP m_language_options_sp
Dictionary mapping names of language-plugin specific options to values.
Definition Target.h:571
void SetCancelCallback(lldb::ExpressionCancelCallback callback, void *baton)
Definition Target.h:467
const Timeout< std::micro > & GetTimeout() const
Definition Target.h:419
const SymbolContextList & GetPreferredSymbolContexts() const
Definition Target.h:372
void SetIgnoreBreakpoints(bool ignore=false)
Definition Target.h:404
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:379
void SetUseDynamic(lldb::DynamicValueType dynamic=lldb::eDynamicCanRunTarget)
Definition Target.h:415
lldb::ExpressionCancelCallback m_cancel_callback
Definition Target.h:561
const Timeout< std::micro > & GetOneThreadTimeout() const
Definition Target.h:423
"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:56
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:5627
FileSpecList GetDebugFileSearchPaths()
Definition Target.cpp:5502
llvm::StringRef GetLaunchWorkingDirectory() const
Definition Target.cpp:5308
bool GetDisplayRecognizedArguments() const
Definition Target.cpp:5791
ImportStdModule GetImportStdModule() const
Definition Target.cpp:5518
void AppendExecutableSearchPaths(const FileSpec &)
Definition Target.cpp:5489
bool GetEnableSyntheticValue() const
Definition Target.cpp:5594
void SetStandardInputPath(const char *path)=delete
ProcessLaunchInfo m_launch_info
Definition Target.h:331
bool GetCheckValueObjectOwnership() const
Definition Target.cpp:5919
uint64_t GetExprAllocAlign() const
Definition Target.cpp:5706
MemoryModuleLoadLevel GetMemoryModuleLoadLevel() const
Definition Target.cpp:5763
llvm::StringRef GetArg0() const
Definition Target.cpp:5361
uint32_t GetMaximumMemReadSize() const
Definition Target.cpp:5633
void SetRunArguments(const Args &args)
Definition Target.cpp:5378
FileSpec GetStandardErrorPath() const
Definition Target.cpp:5659
void SetLoadScriptFromSymbolFile(LoadScriptFromSymFile load_style)
Set the target-wide target.load-script-from-symbol-file setting.
Definition Target.cpp:5743
bool GetEnableNotifyAboutFixIts() const
Definition Target.cpp:5544
bool SetPreferDynamicValue(lldb::DynamicValueType d)
Definition Target.cpp:5245
void SetDisplayRecognizedArguments(bool b)
Definition Target.cpp:5797
std::optional< bool > GetExperimentalPropertyValue(size_t prop_idx, ExecutionContext *exe_ctx=nullptr) const
Definition Target.cpp:5184
const ProcessLaunchInfo & GetProcessLaunchInfo() const
Definition Target.cpp:5802
Environment ComputeEnvironment() const
Definition Target.cpp:5384
void SetStandardOutputPath(const char *path)=delete
bool GetUserSpecifiedTrapHandlerNames(Args &args) const
Definition Target.cpp:5770
uint64_t GetExprErrorLimit() const
Definition Target.cpp:5688
bool GetEnableAutoImportClangModules() const
Definition Target.cpp:5512
bool GetDebugUtilityExpression() const
Definition Target.cpp:5908
JITEngine GetJITEngine() const
Definition Target.cpp:5555
DynamicClassInfoHelper GetDynamicClassInfoHelper() const
Definition Target.cpp:5525
FileSpec GetStandardOutputPath() const
Definition Target.cpp:5649
void SetDisplayRuntimeSupportValues(bool b)
Definition Target.cpp:5786
uint32_t GetMaximumNumberOfChildrenToDisplay() const
Definition Target.cpp:5612
void SetRequireHardwareBreakpoints(bool b)
Definition Target.cpp:5840
bool GetAutoInstallMainExecutable() const
Definition Target.cpp:5845
const char * GetDisassemblyFeatures() const
Definition Target.cpp:5340
void SetAutoLoadScriptsForModule(llvm::StringRef module_name, LoadScriptFromSymFile load_style)
Set the LoadScriptFromSymFile for a module called module_name (excluding file extension).
Definition Target.cpp:5945
RealpathPrefixes GetSourceRealpathPrefixes() const
Definition Target.cpp:5356
void SetCheckValueObjectOwnership(bool check)
Definition Target.cpp:5925
uint64_t GetNumberOfRetriesWithFixits() const
Definition Target.cpp:5538
uint64_t GetExprAllocSize() const
Definition Target.cpp:5700
std::optional< LoadScriptFromSymFile > GetAutoLoadScriptsForModule(llvm::StringRef module_name) const
Definition Target.cpp:5931
llvm::StringRef GetExpressionPrefixContents()
Definition Target.cpp:5674
PathMappingList & GetObjectPathMap() const
Definition Target.cpp:5475
const char * GetDisassemblyFlavor() const
Definition Target.cpp:5320
FileSpec GetStandardInputPath() const
Definition Target.cpp:5639
lldb::DynamicValueType GetPreferDynamicValue() const
Definition Target.cpp:5238
InlineStrategy GetInlineStrategy() const
Definition Target.cpp:5347
Environment GetTargetEnvironment() const
Definition Target.cpp:5444
bool GetDisplayRuntimeSupportValues() const
Definition Target.cpp:5780
void SetUserSpecifiedTrapHandlerNames(const Args &args)
Definition Target.cpp:5775
uint32_t GetMaxZeroPaddingInFloatFormat() const
Definition Target.cpp:5606
uint64_t GetExprAllocAddress() const
Definition Target.cpp:5694
LoadCWDlldbinitFile GetLoadCWDlldbinitFile() const
Definition Target.cpp:5749
Environment GetInheritedEnvironment() const
Definition Target.cpp:5416
void SetArg0(llvm::StringRef arg)
Definition Target.cpp:5367
bool GetInjectLocalVariables(ExecutionContext *exe_ctx) const
Definition Target.cpp:5195
void SetStandardErrorPath(const char *path)=delete
bool ShowHexVariableValuesWithLeadingZeroes() const
Definition Target.cpp:5600
SourceLanguage GetLanguage() const
Definition Target.cpp:5669
Environment GetEnvironment() const
Definition Target.cpp:5412
void SetProcessLaunchInfo(const ProcessLaunchInfo &launch_info)
Definition Target.cpp:5806
FileSpec GetSaveJITObjectsDir() const
Definition Target.cpp:5550
void SetEnvironment(Environment env)
Definition Target.cpp:5455
LoadScriptFromSymFile GetLoadScriptFromSymbolFile() const
Definition Target.cpp:5736
const char * GetDisassemblyCPU() const
Definition Target.cpp:5333
void SetStandardErrorPath(llvm::StringRef path)
Definition Target.cpp:5664
bool GetRunArguments(Args &args) const
Definition Target.cpp:5373
FileSpecList GetExecutableSearchPaths()
Definition Target.cpp:5497
ArchSpec GetDefaultArchitecture() const
Definition Target.cpp:5222
Disassembler::HexImmediateStyle GetHexImmediateStyle() const
Definition Target.cpp:5756
void SetUseDIL(ExecutionContext *exe_ctx, bool b)
Definition Target.cpp:5213
std::unique_ptr< TargetExperimentalProperties > m_experimental_properties_up
Definition Target.h:332
FileSpecList GetClangModuleSearchPaths()
Definition Target.cpp:5507
void SetStandardOutputPath(llvm::StringRef path)
Definition Target.cpp:5654
bool GetRequireHardwareBreakpoints() const
Definition Target.cpp:5834
PathMappingList & GetSourcePathMap() const
Definition Target.cpp:5467
bool GetAutoSourceMapRelative() const
Definition Target.cpp:5483
bool GetUseDIL(ExecutionContext *exe_ctx) const
Definition Target.cpp:5201
void SetDefaultArchitecture(const ArchSpec &arch)
Definition Target.cpp:5227
void SetStandardInputPath(llvm::StringRef path)
Definition Target.cpp:5644
TargetProperties(Target *target)
Definition Target.cpp:5108
bool GetDisplayExpressionsInCrashlogs() const
Definition Target.cpp:5730
bool GetEnableAutoApplyFixIts() const
Definition Target.cpp:5532
void SetDebugUtilityExpression(bool debug)
Definition Target.cpp:5914
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:5619
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:2072
const ArchSpec & GetSpec() const
Definition Target.h:2067
const Arch & operator=(const ArchSpec &spec)
Definition Target.cpp:169
Arch(const ArchSpec &spec)
Definition Target.cpp:165
Architecture * GetPlugin() const
Definition Target.h:2068
virtual BreakpointResolverOverrideUP CopyIntoNewTarget(Target &target)=0
BreakpointResolverOverride(Target &target, const std::string &description, uint64_t type_mask)
Definition Target.h:1028
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:1863
void RemoveTrigger(uint32_t trigger)
Remove a trigger from the mask. trigger is a single TriggerBit value.
Definition Target.h:1866
void GetDescription(Stream &s, lldb::DescriptionLevel level) const override
Definition Target.cpp:4530
HookCommandLine(lldb::TargetSP target_sp, lldb::user_id_t uid)
Definition Target.h:1886
void SetTriggerMask(uint32_t mask)
Replace the trigger mask. mask is a bitwise OR of TriggerBit values.
Definition Target.h:1860
void SetActionFromString(const std::string &string)
Populate the command list by splitting a single string on newlines.
Definition Target.cpp:4557
void SetActionFromStrings(const std::vector< std::string > &strings)
Populate the command list from a vector of individual command strings.
Definition Target.cpp:4561
void HandleModuleLoaded(lldb::StreamSP output) override
Definition Target.cpp:4567
StringList & GetCommands()
Return the list of commands that this hook runs.
Definition Target.h:1869
StopHook::StopHookResult HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP output) override
Called when the process stops.
Definition Target.cpp:4607
void HandleModuleUnloaded(lldb::StreamSP output) override
Definition Target.cpp:4601
llvm::StringRef GetScriptClassName() const
Definition Target.cpp:4721
Status SetScriptCallback(const ScriptedMetadata &scripted_metadata)
Definition Target.cpp:4642
void HandleModuleLoaded(lldb::StreamSP output) override
Definition Target.cpp:4684
StopHook::StopHookResult HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP output) override
Called when the process stops.
Definition Target.cpp:4703
HookScripted(lldb::TargetSP target_sp, lldb::user_id_t uid)
Definition Target.h:1909
void GetDescription(Stream &s, lldb::DescriptionLevel level) const override
Definition Target.cpp:4727
lldb::ScriptedHookInterfaceSP m_interface_sp
Definition Target.h:1907
void HandleModuleUnloaded(lldb::StreamSP output) override
Definition Target.cpp:4693
virtual ~Hook()=default
void SetSuppressOutput(bool suppress_output)
Definition Target.h:1814
bool GetRunAtInitialStop() const
Definition Target.h:1805
ThreadSpec * GetThreadSpecifier()
Definition Target.h:1800
TriggerBit
Individual trigger bits. Combine with bitwise OR to form a trigger mask.
Definition Target.h:1770
bool GetSuppressOutput() const
Definition Target.h:1817
void SetRunAtInitialStop(bool at_initial_stop)
Definition Target.h:1802
lldb::SymbolContextSpecifierSP m_sc_specifier_sp
Definition Target.h:1844
void SetIsEnabled(bool enabled)
Definition Target.h:1779
bool ExecutionContextPasses(const ExecutionContext &exe_ctx)
Check if the execution context passes the specifier and thread spec filters.
Definition Target.cpp:4453
HookKind GetHookKind() const
Definition Target.h:1766
Hook(const Hook &rhs)
Definition Target.cpp:4434
virtual StopHook::StopHookResult HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP output)
Called when the process stops.
Definition Target.h:1826
void GetFilterDescription(Stream &s, lldb::DescriptionLevel level) const
Print the filter portion of the description (AutoContinue, Specifier, ThreadSpec).
Definition Target.cpp:4502
void SetAutoContinue(bool auto_continue)
Definition Target.h:1809
bool GetAutoContinue() const
Definition Target.h:1812
virtual void HandleModuleUnloaded(lldb::StreamSP output)
Definition Target.h:1822
uint32_t GetTriggerMask() const
Return the bitmask of triggers this hook responds to.
Definition Target.h:1783
lldb::TargetSP & GetTarget()
Definition Target.h:1776
SymbolContextSpecifier * GetSCSpecifier()
Definition Target.h:1792
lldb::TargetSP m_target_sp
Definition Target.h:1838
virtual void GetDescription(Stream &s, lldb::DescriptionLevel level) const
Definition Target.cpp:4469
void SetSCSpecifier(SymbolContextSpecifier *specifier)
Set the symbol context specifier. The hook takes ownership.
Definition Target.cpp:4445
void SetThreadSpecifier(ThreadSpec *specifier)
Set the thread specifier. The hook takes ownership.
Definition Target.cpp:4449
virtual void HandleModuleLoaded(lldb::StreamSP output)
Definition Target.h:1821
bool FiresOn(uint32_t trigger) const
Return true if this hook fires on the given trigger.
Definition Target.h:1786
std::unique_ptr< ThreadSpec > m_thread_spec_up
Definition Target.h:1845
void GetSubclassDescription(Stream &s, lldb::DescriptionLevel level) const override
Definition Target.h:1723
HandleStopCallback * m_callback
Definition Target.h:1731
StopHookResult HandleStop(ExecutionContext &exc_ctx, lldb::StreamSP output) override
Definition Target.h:1718
StopHookCoded(lldb::TargetSP target_sp, lldb::user_id_t uid)
Use CreateStopHook to make a new empty stop hook.
Definition Target.h:1736
void SetCallback(llvm::StringRef name, HandleStopCallback *callback)
Definition Target.h:1713
StopHookResult(ExecutionContext &exc_ctx, lldb::StreamSP output) HandleStopCallback
Definition Target.h:1710
void SetActionFromString(const std::string &strings)
Definition Target.cpp:4281
StopHookCommandLine(lldb::TargetSP target_sp, lldb::user_id_t uid)
Definition Target.h:1677
void SetActionFromStrings(const std::vector< std::string > &strings)
Definition Target.cpp:4285
StopHookResult HandleStop(ExecutionContext &exc_ctx, lldb::StreamSP output_sp) override
Definition Target.cpp:4292
void GetSubclassDescription(Stream &s, lldb::DescriptionLevel level) const override
Definition Target.cpp:4263
lldb::ScriptedHookInterfaceSP m_interface_sp
Definition Target.h:1696
StopHookResult HandleStop(ExecutionContext &exc_ctx, lldb::StreamSP output) override
Definition Target.cpp:4364
Status SetScriptCallback(const ScriptedMetadata &scripted_metadata)
Definition Target.cpp:4327
StopHookScripted(lldb::TargetSP target_sp, lldb::user_id_t uid)
Use CreateStopHook to make a new empty stop hook.
Definition Target.h:1701
void GetSubclassDescription(Stream &s, lldb::DescriptionLevel level) const override
Definition Target.cpp:4392
llvm::StringRef GetScriptClassName() const
Definition Target.cpp:4386
bool GetRunAtInitialStop() const
Definition Target.h:1635
SymbolContextSpecifier * GetSpecifier()
Definition Target.h:1604
void SetSpecifier(SymbolContextSpecifier *specifier)
Definition Target.cpp:4201
virtual StopHookResult HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP output)=0
std::unique_ptr< ThreadSpec > m_thread_spec_up
Definition Target.h:1650
void SetIsActive(bool is_active)
Definition Target.h:1623
void SetSuppressOutput(bool suppress_output)
Definition Target.h:1637
void SetThreadSpecifier(ThreadSpec *specifier)
Definition Target.cpp:4205
ThreadSpec * GetThreadSpecifier()
Definition Target.h:1619
StopHook(const StopHook &rhs)
Definition Target.cpp:4193
bool ExecutionContextPasses(const ExecutionContext &exe_ctx)
Definition Target.cpp:4209
lldb::TargetSP & GetTarget()
Definition Target.h:1598
void SetRunAtInitialStop(bool at_initial_stop)
Definition Target.h:1631
lldb::SymbolContextSpecifierSP m_specifier_sp
Definition Target.h:1649
virtual void GetSubclassDescription(Stream &s, lldb::DescriptionLevel level) const =0
void GetDescription(Stream &s, lldb::DescriptionLevel level) const
Definition Target.cpp:4225
void SetAutoContinue(bool auto_continue)
Definition Target.h:1625
const ModuleList & GetModuleList() const
Definition Target.h:650
void Dump(Stream *s) const override
Definition Target.cpp:5977
static llvm::StringRef GetFlavorString()
Definition Target.cpp:5973
static lldb::TargetSP GetCreatedTargetFromEvent(const Event *event_ptr)
Definition Target.cpp:6006
static ModuleList GetModuleListFromEvent(const Event *event_ptr)
Definition Target.cpp:6015
static const TargetEventData * GetEventDataFromEvent(const Event *event_ptr)
Definition Target.cpp:5987
llvm::StringRef GetFlavor() const override
Definition Target.h:628
const lldb::TargetSP & GetTarget() const
Definition Target.h:644
TargetEventData(const lldb::TargetSP &target_sp)
Definition Target.cpp:5959
TargetEventData(const TargetEventData &)=delete
const lldb::TargetSP & GetCreatedTarget() const
Definition Target.h:646
const TargetEventData & operator=(const TargetEventData &)=delete
static lldb::TargetSP GetTargetFromEvent(const Event *event_ptr)
Definition Target.cpp:5997
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:2692
llvm::Expected< uint32_t > AddScriptedFrameProviderDescriptor(const ScriptedFrameProviderDescriptor &descriptor)
Add or update a scripted frame provider descriptor for this target.
Definition Target.cpp:3891
StopHookCollection m_stop_hooks
Definition Target.h:2129
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:4789
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:2140
lldb::TraceSP GetTrace()
Get the Trace object containing processor trace information of this target.
Definition Target.cpp:3766
PathMappingList & GetImageSearchPathList()
Definition Target.cpp:2701
void FinalizeFileActions(ProcessLaunchInfo &info)
Definition Target.cpp:3973
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:3098
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:3106
ModuleList & GetImages()
Definition Target.h:1249
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:2933
lldb::addr_t GetBreakableLoadAddress(lldb::addr_t addr)
Definition Target.cpp:3113
llvm::StringMap< std::unique_ptr< BreakpointName > > BreakpointNameMap
Definition Target.h:2094
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:4133
bool SetSuppresStopHooks(bool suppress)
Definition Target.h:1953
static void ImageSearchPathsChanged(const PathMappingList &path_list, void *baton)
Definition Target.cpp:2705
llvm::Expected< lldb_private::Address > GetEntryPointAddress()
This method will return the address of the starting function for this binary, e.g.
Definition Target.cpp:3064
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:1933
lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id)
Definition Target.cpp:437
std::shared_ptr< StopHook > StopHookSP
Definition Target.h:1743
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:604
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:3229
void SetTrace(const lldb::TraceSP &trace_sp)
Set the Trace object containing processor trace information of this target.
Definition Target.cpp:3764
BreakpointList & GetBreakpointList(bool internal=false)
Definition Target.cpp:423
uint32_t m_next_frame_provider_id
Definition Target.h:2121
lldb_private::SummaryStatisticsCache & GetSummaryStatisticsCache()
Definition Target.cpp:3581
const llvm::MapVector< uint32_t, ScriptedFrameProviderDescriptor > & GetScriptedFrameProviderDescriptors() const
Get all scripted frame provider descriptors for this target.
Definition Target.cpp:3952
lldb::addr_t GetSectionLoadAddress(const lldb::SectionSP &section_sp)
Definition Target.cpp:6041
llvm::StringRef GetABIName() const
Returns the name of the target's ABI plugin.
Definition Target.cpp:412
SourceManager & GetSourceManager()
Definition Target.cpp:3153
lldb::SearchFilterSP GetSearchFilterForModuleList(const FileSpecList *containingModuleList)
Definition Target.cpp:705
StopHookSP GetStopHookByID(lldb::user_id_t uid)
Definition Target.cpp:3195
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:2156
lldb::user_id_t AddBreakpointResolverOverride(BreakpointResolverOverrideUP override_up)
Add a breakpoint override resolver. This version can't fail.
Definition Target.h:1051
lldb::ProcessSP m_process_sp
Definition Target.h:2109
Debugger & GetDebugger() const
Definition Target.h:1330
lldb::SearchFilterSP m_search_filter_sp
Definition Target.h:2110
PersistentExpressionState * GetPersistentExpressionStateForLanguage(lldb::LanguageType language)
Definition Target.cpp:2783
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:4121
bool m_is_dummy_target
Used to not run stop hooks for expressions.
Definition Target.h:2136
static bool UpdateSignalFromDummy(lldb::UnixSignalsSP signals_sp, const DummySignalElement &element)
Definition Target.cpp:4079
PathMappingList m_image_search_paths
Definition Target.h:2111
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:2694
SectionLoadList & GetSectionLoadList()
Definition Target.h:2213
lldb::addr_t GetPersistentSymbol(ConstString name)
Definition Target.cpp:3044
void PrimeFromDummyTarget(Target &target)
Definition Target.cpp:225
bool RemoveScriptedFrameProviderDescriptor(uint32_t id)
Remove a scripted frame provider descriptor by id.
Definition Target.cpp:3927
lldb::RegisterTypeBuilderSP m_register_type_builder_sp
Definition Target.h:2158
static void SettingsTerminate()
Definition Target.cpp:2895
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:4767
bool ResolveFileAddress(lldb::addr_t load_addr, Address &so_addr)
Definition Target.cpp:3497
bool ClearAllWatchpointHitCounts()
Definition Target.cpp:1508
CompilerType GetRegisterType(const RegisterInfo &reg_info)
Definition Target.cpp:2741
size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len, Status &error)
Definition Target.cpp:2058
void ClearAllLoadedSections()
Definition Target.cpp:3573
std::vector< lldb::TypeSystemSP > GetScratchTypeSystems(bool create_on_demand=true)
Definition Target.cpp:2749
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:2366
void AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name, Status &error)
Definition Target.cpp:853
void DumpSectionLoadList(Stream &s)
Definition Target.cpp:6047
void DeleteCurrentProcess()
Definition Target.cpp:294
BreakpointList m_internal_breakpoint_list
Definition Target.h:2093
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:2397
void DisableAllowedBreakpoints()
Definition Target.cpp:1182
bool SetHookEnabledStateByID(lldb::user_id_t uid, bool enabled)
Definition Target.cpp:4811
bool LoadScriptingResources(std::list< Status > &errors, bool continue_on_error=true)
Definition Target.h:1224
bool SetSectionUnloaded(const lldb::SectionSP &section_sp)
Definition Target.cpp:3551
lldb::TargetSP CalculateTarget() override
Definition Target.cpp:2688
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:2095
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:2119
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:2449
static bool ResetSignalFromDummy(lldb::UnixSignalsSP signals_sp, const DummySignalElement &element)
Definition Target.cpp:4106
Architecture * GetArchitecturePlugin() const
Definition Target.h:1328
llvm::json::Value ReportStatistics(const lldb_private::StatisticsOptions &options)
Get metrics associated with this target in JSON format.
Definition Target.cpp:6033
friend class TargetList
Definition Target.h:586
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:2836
TargetStats & GetStatistics()
Definition Target.h:2183
void EnableAllBreakpoints(bool internal_also=false)
Definition Target.cpp:1189
Status Launch(ProcessLaunchInfo &launch_info, Stream *stream)
Definition Target.cpp:3596
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:2128
llvm::Expected< lldb::TraceSP > CreateTrace()
Create a Trace object for the current target using the using the default supported tracing technology...
Definition Target.cpp:3768
lldb::TraceSP m_trace_sp
An optional lldb_private::Trace object containing processor trace information of this target.
Definition Target.h:2150
lldb::user_id_t GetGloballyUniqueID() const
Get the globally unique ID for this target.
Definition Target.h:686
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:2419
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:3181
WatchpointList m_watchpoint_list
Definition Target.h:2104
BreakpointList m_breakpoint_list
Definition Target.h:2092
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:2126
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:2101
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:3491
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:2317
HookSP GetHookByID(lldb::user_id_t uid)
Definition Target.cpp:4796
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:1069
bool RemoveBreakpointResolverOverride(lldb::user_id_t override_id)
Definition Target.h:1064
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:2714
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:3575
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:3205
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:3216
std::vector< StopHookSP > m_internal_stop_hooks
Definition Target.h:2131
lldb::ExpressionVariableSP GetPersistentVariable(ConstString name)
Definition Target.cpp:3025
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:3159
size_t ReadCStringFromMemory(const Address &addr, std::string &out_str, Status &error, bool force_live_memory=false)
Definition Target.cpp:2227
void SetAllHooksEnabledState(bool enabled)
Definition Target.cpp:4819
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:2078
std::recursive_mutex m_frame_provider_descriptors_mutex
Definition Target.h:2120
lldb::user_id_t m_target_unique_id
The globally unique ID assigned to this target.
Definition Target.h:2142
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:2696
llvm::Expected< lldb::DisassemblerSP > ReadInstructions(const Address &start_addr, uint32_t count, const char *flavor_string=nullptr)
Definition Target.cpp:3119
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:3793
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:2090
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:3585
bool GetSuppressStopHooks()
Definition Target.h:1959
std::string m_label
Definition Target.h:2087
lldb::user_id_t m_stop_hook_next_id
Definition Target.h:2130
static FileSpecList GetDefaultExecutableSearchPaths()
Definition Target.cpp:2897
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:6051
lldb::SearchFilterSP GetSearchFilterForModule(const FileSpec *containingModule)
Definition Target.cpp:687
llvm::StringMapEntry< DummySignalValues > DummySignalElement
Definition Target.h:2021
std::recursive_mutex & GetAPIMutex()
Definition Target.cpp:6023
static llvm::StringRef GetStaticBroadcasterClass()
Definition Target.cpp:175
static FileSpecList GetDefaultDebugFileSearchPaths()
Definition Target.cpp:2901
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:2916
uint32_t m_latest_stop_hook_id
Definition Target.h:2132
void RunModuleHooks(bool is_load)
Definition Target.cpp:4824
std::map< lldb::user_id_t, BreakpointResolverOverrideUP > m_breakpoint_overrides
Definition Target.h:2098
StackFrameRecognizerManager & GetFrameRecognizerManager()
Definition Target.h:1997
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:3240
void ClearSectionLoadList()
Definition Target.cpp:6045
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:2304
lldb::PlatformSP m_platform_sp
The platform for this target.
Definition Target.h:2077
void UndoCreateHook(lldb::user_id_t uid)
Removes the most recently created hook.
Definition Target.cpp:4782
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:2866
FileSpecList GetSafeAutoLoadPaths() const
Get the list of paths that LLDB will consider automatically loading scripting resources from.
Definition Target.cpp:6067
static TargetProperties & GetGlobalProperties()
Definition Target.cpp:3455
Status Install(ProcessLaunchInfo *launch_info)
Definition Target.cpp:3463
HookSP GetHookAtIndex(size_t index)
Definition Target.cpp:4803
lldb::PlatformSP GetPlatform()
Definition Target.h:1973
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:2905
void ResetBreakpointHitCounts()
Resets the hit count of all breakpoints.
Definition Target.cpp:1263
std::unique_ptr< BreakpointResolverOverride > BreakpointResolverOverrideUP
Definition Target.h:1023
const ModuleList & GetImages() const
Get accessor for the images for this process.
Definition Target.h:1247
const ArchSpec & GetArchitecture() const
Definition Target.h:1289
WatchpointList & GetWatchpointList()
Definition Target.h:959
@ eBroadcastBitWatchpointChanged
Definition Target.h:594
@ eBroadcastBitBreakpointChanged
Definition Target.h:591
@ eBroadcastBitNewTargetCreated
Definition Target.h:597
unsigned m_next_persistent_variable_index
Definition Target.h:2141
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:2408
void InvalidateThreadFrameProviders()
Invalidate all potentially cached frame providers for all threads and trigger a stack changed event f...
Definition Target.cpp:3958
TargetStats m_stats
Definition Target.h:2166
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:2145
TypeSystemMap m_scratch_type_system_map
Definition Target.h:2112
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:719
SectionLoadHistory m_section_load_history
Definition Target.h:2091
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:675
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:3532
llvm::StringRef GetTargetSessionName()
Get the target session name for this target.
Definition Target.h:707
const std::string & GetLabel() const
Definition Target.h:688
std::map< lldb::user_id_t, HookSP > HookCollection
Definition Target.h:2138
bool m_valid
This records the last natural stop at which we ran a stop-hook.
Definition Target.h:2134
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:4064
void ClearScriptedFrameProviderDescriptors()
Clear all scripted frame provider descriptors for this target.
Definition Target.cpp:3940
lldb::WatchpointSP m_last_created_watchpoint
Definition Target.h:2105
Status CreateBreakpointsFromFile(const FileSpec &file, BreakpointIDList &new_bps)
Definition Target.cpp:1359
Debugger & m_debugger
Definition Target.h:2076
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:2152
HookCollection m_hooks
Definition Target.h:2139
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:1914
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:2803
ModuleList m_images
The list of images for this process (shared libraries and anything dynamically loaded).
Definition Target.h:2088
lldb::ProcessSP CalculateProcess() override
Definition Target.cpp:2690
void PrintDummySignals(Stream &strm, Args &signals)
Print all the signals set in this target.
Definition Target.cpp:4158
void SetPlatform(const lldb::PlatformSP &platform_sp)
Definition Target.h:1975
bool SetSectionLoadAddress(const lldb::SectionSP &section, lldb::addr_t load_addr, bool warn_multiple=false)
Definition Target.cpp:3502
BreakpointName * FindBreakpointName(llvm::StringRef name, bool can_create, Status &error)
Definition Target.cpp:885
Status Attach(ProcessAttachInfo &attach_info, Stream *stream)
Definition Target.cpp:3799
std::map< lldb::LanguageType, lldb::REPLSP > REPLMap
Definition Target.h:2123
static void SetDefaultArchitecture(const ArchSpec &arch)
Definition Target.cpp:2909
lldb::BreakpointSP m_last_created_breakpoint
Definition Target.h:2103
lldb::WatchpointSP GetLastCreatedWatchpoint()
Definition Target.h:955
bool RemoveStopHookByID(lldb::user_id_t uid)
Definition Target.cpp:3188
friend class Debugger
Definition Target.h:587
lldb::BreakpointSP GetLastCreatedBreakpoint()
Definition Target.h:847
static void SettingsInitialize()
Definition Target.cpp:2893
~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:2085
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:2947
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
@ eJITEngineMCJIT
Definition Target.h:85
@ eJITEngineORC
Definition Target.h:85
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:4872
@ 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:88
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:89
uint64_t user_id_t
Definition lldb-types.h:83
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
Every register is described in detail including its name, alternate name (optional),...
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:2017
UserID(lldb::user_id_t uid=LLDB_INVALID_UID)
Construct with optional user ID.
Definition UserID.h:33