File indexing completed on 2026-05-10 08:42:55
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_TARGET_TARGET_H
0010 #define LLDB_TARGET_TARGET_H
0011
0012 #include <list>
0013 #include <map>
0014 #include <memory>
0015 #include <string>
0016 #include <vector>
0017
0018 #include "lldb/Breakpoint/BreakpointList.h"
0019 #include "lldb/Breakpoint/BreakpointName.h"
0020 #include "lldb/Breakpoint/WatchpointList.h"
0021 #include "lldb/Core/Architecture.h"
0022 #include "lldb/Core/Disassembler.h"
0023 #include "lldb/Core/ModuleList.h"
0024 #include "lldb/Core/StructuredDataImpl.h"
0025 #include "lldb/Core/UserSettingsController.h"
0026 #include "lldb/Expression/Expression.h"
0027 #include "lldb/Host/ProcessLaunchInfo.h"
0028 #include "lldb/Symbol/TypeSystem.h"
0029 #include "lldb/Target/ExecutionContextScope.h"
0030 #include "lldb/Target/PathMappingList.h"
0031 #include "lldb/Target/SectionLoadHistory.h"
0032 #include "lldb/Target/Statistics.h"
0033 #include "lldb/Target/ThreadSpec.h"
0034 #include "lldb/Utility/ArchSpec.h"
0035 #include "lldb/Utility/Broadcaster.h"
0036 #include "lldb/Utility/LLDBAssert.h"
0037 #include "lldb/Utility/RealpathPrefixes.h"
0038 #include "lldb/Utility/Timeout.h"
0039 #include "lldb/lldb-public.h"
0040 #include "llvm/ADT/StringRef.h"
0041
0042 namespace lldb_private {
0043
0044 OptionEnumValues GetDynamicValueTypes();
0045
0046 enum InlineStrategy {
0047 eInlineBreakpointsNever = 0,
0048 eInlineBreakpointsHeaders,
0049 eInlineBreakpointsAlways
0050 };
0051
0052 enum LoadScriptFromSymFile {
0053 eLoadScriptFromSymFileTrue,
0054 eLoadScriptFromSymFileFalse,
0055 eLoadScriptFromSymFileWarn
0056 };
0057
0058 enum LoadCWDlldbinitFile {
0059 eLoadCWDlldbinitTrue,
0060 eLoadCWDlldbinitFalse,
0061 eLoadCWDlldbinitWarn
0062 };
0063
0064 enum ImportStdModule {
0065 eImportStdModuleFalse,
0066 eImportStdModuleFallback,
0067 eImportStdModuleTrue,
0068 };
0069
0070 enum DynamicClassInfoHelper {
0071 eDynamicClassInfoHelperAuto,
0072 eDynamicClassInfoHelperRealizedClassesStruct,
0073 eDynamicClassInfoHelperCopyRealizedClassList,
0074 eDynamicClassInfoHelperGetRealizedClassList,
0075 };
0076
0077 class TargetExperimentalProperties : public Properties {
0078 public:
0079 TargetExperimentalProperties();
0080 };
0081
0082 class TargetProperties : public Properties {
0083 public:
0084 TargetProperties(Target *target);
0085
0086 ~TargetProperties() override;
0087
0088 ArchSpec GetDefaultArchitecture() const;
0089
0090 void SetDefaultArchitecture(const ArchSpec &arch);
0091
0092 bool GetMoveToNearestCode() const;
0093
0094 lldb::DynamicValueType GetPreferDynamicValue() const;
0095
0096 bool SetPreferDynamicValue(lldb::DynamicValueType d);
0097
0098 bool GetPreloadSymbols() const;
0099
0100 void SetPreloadSymbols(bool b);
0101
0102 bool GetDisableASLR() const;
0103
0104 void SetDisableASLR(bool b);
0105
0106 bool GetInheritTCC() const;
0107
0108 void SetInheritTCC(bool b);
0109
0110 bool GetDetachOnError() const;
0111
0112 void SetDetachOnError(bool b);
0113
0114 bool GetDisableSTDIO() const;
0115
0116 void SetDisableSTDIO(bool b);
0117
0118 llvm::StringRef GetLaunchWorkingDirectory() const;
0119
0120 const char *GetDisassemblyFlavor() const;
0121
0122 const char *GetDisassemblyCPU() const;
0123
0124 const char *GetDisassemblyFeatures() const;
0125
0126 InlineStrategy GetInlineStrategy() const;
0127
0128 RealpathPrefixes GetSourceRealpathPrefixes() const;
0129
0130 llvm::StringRef GetArg0() const;
0131
0132 void SetArg0(llvm::StringRef arg);
0133
0134 bool GetRunArguments(Args &args) const;
0135
0136 void SetRunArguments(const Args &args);
0137
0138
0139
0140 Environment GetEnvironment() const;
0141
0142
0143 Environment GetInheritedEnvironment() const;
0144
0145
0146 Environment GetTargetEnvironment() const;
0147
0148 void SetEnvironment(Environment env);
0149
0150 bool GetSkipPrologue() const;
0151
0152 PathMappingList &GetSourcePathMap() const;
0153
0154 PathMappingList &GetObjectPathMap() const;
0155
0156 bool GetAutoSourceMapRelative() const;
0157
0158 FileSpecList GetExecutableSearchPaths();
0159
0160 void AppendExecutableSearchPaths(const FileSpec &);
0161
0162 FileSpecList GetDebugFileSearchPaths();
0163
0164 FileSpecList GetClangModuleSearchPaths();
0165
0166 bool GetEnableAutoImportClangModules() const;
0167
0168 ImportStdModule GetImportStdModule() const;
0169
0170 DynamicClassInfoHelper GetDynamicClassInfoHelper() const;
0171
0172 bool GetEnableAutoApplyFixIts() const;
0173
0174 uint64_t GetNumberOfRetriesWithFixits() const;
0175
0176 bool GetEnableNotifyAboutFixIts() const;
0177
0178 FileSpec GetSaveJITObjectsDir() const;
0179
0180 bool GetEnableSyntheticValue() const;
0181
0182 bool ShowHexVariableValuesWithLeadingZeroes() const;
0183
0184 uint32_t GetMaxZeroPaddingInFloatFormat() const;
0185
0186 uint32_t GetMaximumNumberOfChildrenToDisplay() const;
0187
0188
0189
0190
0191
0192
0193
0194
0195 std::pair<uint32_t, bool> GetMaximumDepthOfChildrenToDisplay() const;
0196
0197 uint32_t GetMaximumSizeOfStringSummary() const;
0198
0199 uint32_t GetMaximumMemReadSize() const;
0200
0201 FileSpec GetStandardInputPath() const;
0202 FileSpec GetStandardErrorPath() const;
0203 FileSpec GetStandardOutputPath() const;
0204
0205 void SetStandardInputPath(llvm::StringRef path);
0206 void SetStandardOutputPath(llvm::StringRef path);
0207 void SetStandardErrorPath(llvm::StringRef path);
0208
0209 void SetStandardInputPath(const char *path) = delete;
0210 void SetStandardOutputPath(const char *path) = delete;
0211 void SetStandardErrorPath(const char *path) = delete;
0212
0213 bool GetBreakpointsConsultPlatformAvoidList();
0214
0215 SourceLanguage GetLanguage() const;
0216
0217 llvm::StringRef GetExpressionPrefixContents();
0218
0219 uint64_t GetExprErrorLimit() const;
0220
0221 uint64_t GetExprAllocAddress() const;
0222
0223 uint64_t GetExprAllocSize() const;
0224
0225 uint64_t GetExprAllocAlign() const;
0226
0227 bool GetUseHexImmediates() const;
0228
0229 bool GetUseFastStepping() const;
0230
0231 bool GetDisplayExpressionsInCrashlogs() const;
0232
0233 LoadScriptFromSymFile GetLoadScriptFromSymbolFile() const;
0234
0235 LoadCWDlldbinitFile GetLoadCWDlldbinitFile() const;
0236
0237 Disassembler::HexImmediateStyle GetHexImmediateStyle() const;
0238
0239 MemoryModuleLoadLevel GetMemoryModuleLoadLevel() const;
0240
0241 bool GetUserSpecifiedTrapHandlerNames(Args &args) const;
0242
0243 void SetUserSpecifiedTrapHandlerNames(const Args &args);
0244
0245 bool GetDisplayRuntimeSupportValues() const;
0246
0247 void SetDisplayRuntimeSupportValues(bool b);
0248
0249 bool GetDisplayRecognizedArguments() const;
0250
0251 void SetDisplayRecognizedArguments(bool b);
0252
0253 const ProcessLaunchInfo &GetProcessLaunchInfo() const;
0254
0255 void SetProcessLaunchInfo(const ProcessLaunchInfo &launch_info);
0256
0257 bool GetInjectLocalVariables(ExecutionContext *exe_ctx) const;
0258
0259 bool GetUseDIL(ExecutionContext *exe_ctx) const;
0260
0261 void SetUseDIL(ExecutionContext *exe_ctx, bool b);
0262
0263 void SetRequireHardwareBreakpoints(bool b);
0264
0265 bool GetRequireHardwareBreakpoints() const;
0266
0267 bool GetAutoInstallMainExecutable() const;
0268
0269 void UpdateLaunchInfoFromProperties();
0270
0271 void SetDebugUtilityExpression(bool debug);
0272
0273 bool GetDebugUtilityExpression() const;
0274
0275 private:
0276 std::optional<bool>
0277 GetExperimentalPropertyValue(size_t prop_idx,
0278 ExecutionContext *exe_ctx = nullptr) const;
0279
0280
0281 void Arg0ValueChangedCallback();
0282 void RunArgsValueChangedCallback();
0283 void EnvVarsValueChangedCallback();
0284 void InputPathValueChangedCallback();
0285 void OutputPathValueChangedCallback();
0286 void ErrorPathValueChangedCallback();
0287 void DetachOnErrorValueChangedCallback();
0288 void DisableASLRValueChangedCallback();
0289 void InheritTCCValueChangedCallback();
0290 void DisableSTDIOValueChangedCallback();
0291
0292
0293 void CheckJITObjectsDir();
0294
0295 Environment ComputeEnvironment() const;
0296
0297
0298 ProcessLaunchInfo m_launch_info;
0299 std::unique_ptr<TargetExperimentalProperties> m_experimental_properties_up;
0300 Target *m_target;
0301 };
0302
0303 class EvaluateExpressionOptions {
0304 public:
0305
0306
0307
0308
0309 #if defined(_MSC_VER)
0310 #pragma warning(push)
0311 #pragma warning(disable : 4268)
0312 #endif
0313 static constexpr std::chrono::milliseconds default_timeout{500};
0314 #if defined(_MSC_VER)
0315 #pragma warning(pop)
0316 #endif
0317
0318 static constexpr ExecutionPolicy default_execution_policy =
0319 eExecutionPolicyOnlyWhenNeeded;
0320
0321 EvaluateExpressionOptions() = default;
0322
0323 ExecutionPolicy GetExecutionPolicy() const { return m_execution_policy; }
0324
0325 void SetExecutionPolicy(ExecutionPolicy policy = eExecutionPolicyAlways) {
0326 m_execution_policy = policy;
0327 }
0328
0329 SourceLanguage GetLanguage() const { return m_language; }
0330
0331 void SetLanguage(lldb::LanguageType language_type) {
0332 m_language = SourceLanguage(language_type);
0333 }
0334
0335
0336
0337
0338 void SetLanguage(uint16_t name, uint32_t version) {
0339 m_language = SourceLanguage(name, version);
0340 }
0341
0342 bool DoesCoerceToId() const { return m_coerce_to_id; }
0343
0344 const char *GetPrefix() const {
0345 return (m_prefix.empty() ? nullptr : m_prefix.c_str());
0346 }
0347
0348 void SetPrefix(const char *prefix) {
0349 if (prefix && prefix[0])
0350 m_prefix = prefix;
0351 else
0352 m_prefix.clear();
0353 }
0354
0355 void SetCoerceToId(bool coerce = true) { m_coerce_to_id = coerce; }
0356
0357 bool DoesUnwindOnError() const { return m_unwind_on_error; }
0358
0359 void SetUnwindOnError(bool unwind = false) { m_unwind_on_error = unwind; }
0360
0361 bool DoesIgnoreBreakpoints() const { return m_ignore_breakpoints; }
0362
0363 void SetIgnoreBreakpoints(bool ignore = false) {
0364 m_ignore_breakpoints = ignore;
0365 }
0366
0367 bool DoesKeepInMemory() const { return m_keep_in_memory; }
0368
0369 void SetKeepInMemory(bool keep = true) { m_keep_in_memory = keep; }
0370
0371 lldb::DynamicValueType GetUseDynamic() const { return m_use_dynamic; }
0372
0373 void
0374 SetUseDynamic(lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget) {
0375 m_use_dynamic = dynamic;
0376 }
0377
0378 const Timeout<std::micro> &GetTimeout() const { return m_timeout; }
0379
0380 void SetTimeout(const Timeout<std::micro> &timeout) { m_timeout = timeout; }
0381
0382 const Timeout<std::micro> &GetOneThreadTimeout() const {
0383 return m_one_thread_timeout;
0384 }
0385
0386 void SetOneThreadTimeout(const Timeout<std::micro> &timeout) {
0387 m_one_thread_timeout = timeout;
0388 }
0389
0390 bool GetTryAllThreads() const { return m_try_others; }
0391
0392 void SetTryAllThreads(bool try_others = true) { m_try_others = try_others; }
0393
0394 bool GetStopOthers() const { return m_stop_others; }
0395
0396 void SetStopOthers(bool stop_others = true) { m_stop_others = stop_others; }
0397
0398 bool GetDebug() const { return m_debug; }
0399
0400 void SetDebug(bool b) {
0401 m_debug = b;
0402 if (m_debug)
0403 m_generate_debug_info = true;
0404 }
0405
0406 bool GetGenerateDebugInfo() const { return m_generate_debug_info; }
0407
0408 void SetGenerateDebugInfo(bool b) { m_generate_debug_info = b; }
0409
0410 bool GetColorizeErrors() const { return m_ansi_color_errors; }
0411
0412 void SetColorizeErrors(bool b) { m_ansi_color_errors = b; }
0413
0414 bool GetTrapExceptions() const { return m_trap_exceptions; }
0415
0416 void SetTrapExceptions(bool b) { m_trap_exceptions = b; }
0417
0418 bool GetREPLEnabled() const { return m_repl; }
0419
0420 void SetREPLEnabled(bool b) { m_repl = b; }
0421
0422 void SetCancelCallback(lldb::ExpressionCancelCallback callback, void *baton) {
0423 m_cancel_callback_baton = baton;
0424 m_cancel_callback = callback;
0425 }
0426
0427 bool InvokeCancelCallback(lldb::ExpressionEvaluationPhase phase) const {
0428 return ((m_cancel_callback != nullptr)
0429 ? m_cancel_callback(phase, m_cancel_callback_baton)
0430 : false);
0431 }
0432
0433
0434
0435 void SetPoundLine(const char *path, uint32_t line) const {
0436 if (path && path[0]) {
0437 m_pound_line_file = path;
0438 m_pound_line_line = line;
0439 } else {
0440 m_pound_line_file.clear();
0441 m_pound_line_line = 0;
0442 }
0443 }
0444
0445 const char *GetPoundLineFilePath() const {
0446 return (m_pound_line_file.empty() ? nullptr : m_pound_line_file.c_str());
0447 }
0448
0449 uint32_t GetPoundLineLine() const { return m_pound_line_line; }
0450
0451 void SetSuppressPersistentResult(bool b) { m_suppress_persistent_result = b; }
0452
0453 bool GetSuppressPersistentResult() const {
0454 return m_suppress_persistent_result;
0455 }
0456
0457 void SetAutoApplyFixIts(bool b) { m_auto_apply_fixits = b; }
0458
0459 bool GetAutoApplyFixIts() const { return m_auto_apply_fixits; }
0460
0461 void SetRetriesWithFixIts(uint64_t number_of_retries) {
0462 m_retries_with_fixits = number_of_retries;
0463 }
0464
0465 uint64_t GetRetriesWithFixIts() const { return m_retries_with_fixits; }
0466
0467 bool IsForUtilityExpr() const { return m_running_utility_expression; }
0468
0469 void SetIsForUtilityExpr(bool b) { m_running_utility_expression = b; }
0470
0471 private:
0472 ExecutionPolicy m_execution_policy = default_execution_policy;
0473 SourceLanguage m_language;
0474 std::string m_prefix;
0475 bool m_coerce_to_id = false;
0476 bool m_unwind_on_error = true;
0477 bool m_ignore_breakpoints = false;
0478 bool m_keep_in_memory = false;
0479 bool m_try_others = true;
0480 bool m_stop_others = true;
0481 bool m_debug = false;
0482 bool m_trap_exceptions = true;
0483 bool m_repl = false;
0484 bool m_generate_debug_info = false;
0485 bool m_ansi_color_errors = false;
0486 bool m_suppress_persistent_result = false;
0487 bool m_auto_apply_fixits = true;
0488 uint64_t m_retries_with_fixits = 1;
0489
0490
0491 bool m_running_utility_expression = false;
0492
0493 lldb::DynamicValueType m_use_dynamic = lldb::eNoDynamicValues;
0494 Timeout<std::micro> m_timeout = default_timeout;
0495 Timeout<std::micro> m_one_thread_timeout = std::nullopt;
0496 lldb::ExpressionCancelCallback m_cancel_callback = nullptr;
0497 void *m_cancel_callback_baton = nullptr;
0498
0499
0500
0501 mutable std::string m_pound_line_file;
0502 mutable uint32_t m_pound_line_line = 0;
0503 };
0504
0505
0506 class Target : public std::enable_shared_from_this<Target>,
0507 public TargetProperties,
0508 public Broadcaster,
0509 public ExecutionContextScope,
0510 public ModuleList::Notifier {
0511 public:
0512 friend class TargetList;
0513 friend class Debugger;
0514
0515
0516 enum {
0517 eBroadcastBitBreakpointChanged = (1 << 0),
0518 eBroadcastBitModulesLoaded = (1 << 1),
0519 eBroadcastBitModulesUnloaded = (1 << 2),
0520 eBroadcastBitWatchpointChanged = (1 << 3),
0521 eBroadcastBitSymbolsLoaded = (1 << 4),
0522 eBroadcastBitSymbolsChanged = (1 << 5),
0523 };
0524
0525
0526
0527 static llvm::StringRef GetStaticBroadcasterClass();
0528
0529 llvm::StringRef GetBroadcasterClass() const override {
0530 return GetStaticBroadcasterClass();
0531 }
0532
0533
0534
0535 class TargetEventData : public EventData {
0536 public:
0537 TargetEventData(const lldb::TargetSP &target_sp);
0538
0539 TargetEventData(const lldb::TargetSP &target_sp,
0540 const ModuleList &module_list);
0541
0542 ~TargetEventData() override;
0543
0544 static llvm::StringRef GetFlavorString();
0545
0546 llvm::StringRef GetFlavor() const override {
0547 return TargetEventData::GetFlavorString();
0548 }
0549
0550 void Dump(Stream *s) const override;
0551
0552 static const TargetEventData *GetEventDataFromEvent(const Event *event_ptr);
0553
0554 static lldb::TargetSP GetTargetFromEvent(const Event *event_ptr);
0555
0556 static ModuleList GetModuleListFromEvent(const Event *event_ptr);
0557
0558 const lldb::TargetSP &GetTarget() const { return m_target_sp; }
0559
0560 const ModuleList &GetModuleList() const { return m_module_list; }
0561
0562 private:
0563 lldb::TargetSP m_target_sp;
0564 ModuleList m_module_list;
0565
0566 TargetEventData(const TargetEventData &) = delete;
0567 const TargetEventData &operator=(const TargetEventData &) = delete;
0568 };
0569
0570 ~Target() override;
0571
0572 static void SettingsInitialize();
0573
0574 static void SettingsTerminate();
0575
0576 static FileSpecList GetDefaultExecutableSearchPaths();
0577
0578 static FileSpecList GetDefaultDebugFileSearchPaths();
0579
0580 static ArchSpec GetDefaultArchitecture();
0581
0582 static void SetDefaultArchitecture(const ArchSpec &arch);
0583
0584 bool IsDummyTarget() const { return m_is_dummy_target; }
0585
0586 const std::string &GetLabel() const { return m_label; }
0587
0588
0589
0590
0591
0592
0593
0594
0595 llvm::Error SetLabel(llvm::StringRef label);
0596
0597
0598
0599
0600
0601
0602
0603
0604
0605
0606
0607
0608
0609
0610
0611
0612
0613
0614
0615
0616
0617
0618
0619
0620
0621
0622
0623
0624
0625
0626
0627
0628 lldb::ModuleSP GetOrCreateModule(const ModuleSpec &module_spec, bool notify,
0629 Status *error_ptr = nullptr);
0630
0631
0632
0633 static TargetProperties &GetGlobalProperties();
0634
0635 std::recursive_mutex &GetAPIMutex();
0636
0637 void DeleteCurrentProcess();
0638
0639 void CleanupProcess();
0640
0641
0642
0643
0644
0645
0646
0647
0648
0649
0650
0651 void Dump(Stream *s, lldb::DescriptionLevel description_level);
0652
0653
0654
0655 const lldb::ProcessSP &CreateProcess(lldb::ListenerSP listener_sp,
0656 llvm::StringRef plugin_name,
0657 const FileSpec *crash_file,
0658 bool can_connect);
0659
0660 const lldb::ProcessSP &GetProcessSP() const;
0661
0662 bool IsValid() { return m_valid; }
0663
0664 void Destroy();
0665
0666 Status Launch(ProcessLaunchInfo &launch_info,
0667 Stream *stream);
0668
0669 Status Attach(ProcessAttachInfo &attach_info,
0670 Stream *stream);
0671
0672
0673
0674 BreakpointList &GetBreakpointList(bool internal = false);
0675
0676 const BreakpointList &GetBreakpointList(bool internal = false) const;
0677
0678 lldb::BreakpointSP GetLastCreatedBreakpoint() {
0679 return m_last_created_breakpoint;
0680 }
0681
0682 lldb::BreakpointSP GetBreakpointByID(lldb::break_id_t break_id);
0683
0684 lldb::BreakpointSP CreateBreakpointAtUserEntry(Status &error);
0685
0686
0687
0688 lldb::BreakpointSP CreateBreakpoint(const FileSpecList *containingModules,
0689 const FileSpec &file, uint32_t line_no,
0690 uint32_t column, lldb::addr_t offset,
0691 LazyBool check_inlines,
0692 LazyBool skip_prologue, bool internal,
0693 bool request_hardware,
0694 LazyBool move_to_nearest_code);
0695
0696
0697
0698
0699 lldb::BreakpointSP CreateSourceRegexBreakpoint(
0700 const FileSpecList *containingModules,
0701 const FileSpecList *source_file_list,
0702 const std::unordered_set<std::string> &function_names,
0703 RegularExpression source_regex, bool internal, bool request_hardware,
0704 LazyBool move_to_nearest_code);
0705
0706
0707 lldb::BreakpointSP CreateBreakpoint(lldb::addr_t load_addr, bool internal,
0708 bool request_hardware);
0709
0710
0711 lldb::BreakpointSP CreateAddressInModuleBreakpoint(lldb::addr_t file_addr,
0712 bool internal,
0713 const FileSpec &file_spec,
0714 bool request_hardware);
0715
0716
0717 lldb::BreakpointSP CreateBreakpoint(const Address &addr, bool internal,
0718 bool request_hardware);
0719
0720
0721
0722
0723
0724 lldb::BreakpointSP CreateFuncRegexBreakpoint(
0725 const FileSpecList *containingModules,
0726 const FileSpecList *containingSourceFiles, RegularExpression func_regexp,
0727 lldb::LanguageType requested_language, LazyBool skip_prologue,
0728 bool internal, bool request_hardware);
0729
0730
0731
0732
0733
0734
0735 lldb::BreakpointSP CreateBreakpoint(
0736 const FileSpecList *containingModules,
0737 const FileSpecList *containingSourceFiles, const char *func_name,
0738 lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language,
0739 lldb::addr_t offset, LazyBool skip_prologue, bool internal,
0740 bool request_hardware);
0741
0742 lldb::BreakpointSP
0743 CreateExceptionBreakpoint(enum lldb::LanguageType language, bool catch_bp,
0744 bool throw_bp, bool internal,
0745 Args *additional_args = nullptr,
0746 Status *additional_args_error = nullptr);
0747
0748 lldb::BreakpointSP CreateScriptedBreakpoint(
0749 const llvm::StringRef class_name, const FileSpecList *containingModules,
0750 const FileSpecList *containingSourceFiles, bool internal,
0751 bool request_hardware, StructuredData::ObjectSP extra_args_sp,
0752 Status *creation_error = nullptr);
0753
0754
0755
0756
0757
0758
0759 lldb::BreakpointSP CreateBreakpoint(
0760 const FileSpecList *containingModules,
0761 const FileSpecList *containingSourceFiles, const char *func_names[],
0762 size_t num_names, lldb::FunctionNameType func_name_type_mask,
0763 lldb::LanguageType language, lldb::addr_t offset, LazyBool skip_prologue,
0764 bool internal, bool request_hardware);
0765
0766 lldb::BreakpointSP
0767 CreateBreakpoint(const FileSpecList *containingModules,
0768 const FileSpecList *containingSourceFiles,
0769 const std::vector<std::string> &func_names,
0770 lldb::FunctionNameType func_name_type_mask,
0771 lldb::LanguageType language, lldb::addr_t m_offset,
0772 LazyBool skip_prologue, bool internal,
0773 bool request_hardware);
0774
0775
0776 lldb::BreakpointSP CreateBreakpoint(lldb::SearchFilterSP &filter_sp,
0777 lldb::BreakpointResolverSP &resolver_sp,
0778 bool internal, bool request_hardware,
0779 bool resolve_indirect_symbols);
0780
0781
0782 lldb::WatchpointSP CreateWatchpoint(lldb::addr_t addr, size_t size,
0783 const CompilerType *type, uint32_t kind,
0784 Status &error);
0785
0786 lldb::WatchpointSP GetLastCreatedWatchpoint() {
0787 return m_last_created_watchpoint;
0788 }
0789
0790 WatchpointList &GetWatchpointList() { return m_watchpoint_list; }
0791
0792
0793 void AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name,
0794 Status &error);
0795
0796 void AddNameToBreakpoint(lldb::BreakpointSP &bp_sp, llvm::StringRef name,
0797 Status &error);
0798
0799 void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, ConstString name);
0800
0801 BreakpointName *FindBreakpointName(ConstString name, bool can_create,
0802 Status &error);
0803
0804 void DeleteBreakpointName(ConstString name);
0805
0806 void ConfigureBreakpointName(BreakpointName &bp_name,
0807 const BreakpointOptions &options,
0808 const BreakpointName::Permissions &permissions);
0809 void ApplyNameToBreakpoints(BreakpointName &bp_name);
0810
0811 void AddBreakpointName(std::unique_ptr<BreakpointName> bp_name);
0812
0813 void GetBreakpointNames(std::vector<std::string> &names);
0814
0815
0816 void RemoveAllBreakpoints(bool internal_also = false);
0817
0818
0819 void RemoveAllowedBreakpoints();
0820
0821 void DisableAllBreakpoints(bool internal_also = false);
0822
0823 void DisableAllowedBreakpoints();
0824
0825 void EnableAllBreakpoints(bool internal_also = false);
0826
0827 void EnableAllowedBreakpoints();
0828
0829 bool DisableBreakpointByID(lldb::break_id_t break_id);
0830
0831 bool EnableBreakpointByID(lldb::break_id_t break_id);
0832
0833 bool RemoveBreakpointByID(lldb::break_id_t break_id);
0834
0835
0836 void ResetBreakpointHitCounts();
0837
0838
0839
0840
0841 bool RemoveAllWatchpoints(bool end_to_end = true);
0842
0843 bool DisableAllWatchpoints(bool end_to_end = true);
0844
0845 bool EnableAllWatchpoints(bool end_to_end = true);
0846
0847 bool ClearAllWatchpointHitCounts();
0848
0849 bool ClearAllWatchpointHistoricValues();
0850
0851 bool IgnoreAllWatchpoints(uint32_t ignore_count);
0852
0853 bool DisableWatchpointByID(lldb::watch_id_t watch_id);
0854
0855 bool EnableWatchpointByID(lldb::watch_id_t watch_id);
0856
0857 bool RemoveWatchpointByID(lldb::watch_id_t watch_id);
0858
0859 bool IgnoreWatchpointByID(lldb::watch_id_t watch_id, uint32_t ignore_count);
0860
0861 Status SerializeBreakpointsToFile(const FileSpec &file,
0862 const BreakpointIDList &bp_ids,
0863 bool append);
0864
0865 Status CreateBreakpointsFromFile(const FileSpec &file,
0866 BreakpointIDList &new_bps);
0867
0868 Status CreateBreakpointsFromFile(const FileSpec &file,
0869 std::vector<std::string> &names,
0870 BreakpointIDList &new_bps);
0871
0872
0873
0874
0875
0876
0877
0878
0879
0880
0881 lldb::addr_t GetCallableLoadAddress(
0882 lldb::addr_t load_addr,
0883 AddressClass addr_class = AddressClass::eInvalid) const;
0884
0885
0886
0887
0888
0889
0890
0891
0892
0893
0894
0895 lldb::addr_t
0896 GetOpcodeLoadAddress(lldb::addr_t load_addr,
0897 AddressClass addr_class = AddressClass::eInvalid) const;
0898
0899
0900
0901
0902
0903
0904 lldb::addr_t GetBreakableLoadAddress(lldb::addr_t addr);
0905
0906 void ModulesDidLoad(ModuleList &module_list);
0907
0908 void ModulesDidUnload(ModuleList &module_list, bool delete_locations);
0909
0910 void SymbolsDidLoad(ModuleList &module_list);
0911
0912 void ClearModules(bool delete_locations);
0913
0914
0915
0916
0917
0918
0919
0920
0921
0922
0923 void DidExec();
0924
0925
0926
0927
0928
0929
0930
0931
0932
0933
0934
0935
0936
0937
0938
0939
0940 lldb::ModuleSP GetExecutableModule();
0941
0942 Module *GetExecutableModulePointer();
0943
0944
0945
0946
0947
0948
0949
0950
0951
0952
0953
0954
0955
0956
0957
0958
0959
0960
0961
0962
0963
0964
0965
0966
0967
0968
0969 void SetExecutableModule(
0970 lldb::ModuleSP &module_sp,
0971 LoadDependentFiles load_dependent_files = eLoadDependentsDefault);
0972
0973 bool LoadScriptingResources(std::list<Status> &errors,
0974 Stream &feedback_stream,
0975 bool continue_on_error = true) {
0976 return m_images.LoadScriptingResourcesInTarget(
0977 this, errors, feedback_stream, continue_on_error);
0978 }
0979
0980
0981
0982
0983
0984
0985
0986
0987
0988
0989
0990
0991
0992
0993
0994
0995
0996
0997 const ModuleList &GetImages() const { return m_images; }
0998
0999 ModuleList &GetImages() { return m_images; }
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016 bool ModuleIsExcludedForUnconstrainedSearches(const FileSpec &module_spec);
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036 bool
1037 ModuleIsExcludedForUnconstrainedSearches(const lldb::ModuleSP &module_sp);
1038
1039 const ArchSpec &GetArchitecture() const { return m_arch.GetSpec(); }
1040
1041
1042 llvm::StringRef GetABIName() const;
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073 bool SetArchitecture(const ArchSpec &arch_spec, bool set_platform = false,
1074 bool merge = true);
1075
1076 bool MergeArchitecture(const ArchSpec &arch_spec);
1077
1078 Architecture *GetArchitecturePlugin() const { return m_arch.GetPlugin(); }
1079
1080 Debugger &GetDebugger() { return m_debugger; }
1081
1082 size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len,
1083 Status &error);
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098 virtual size_t ReadMemory(const Address &addr, void *dst, size_t dst_len,
1099 Status &error, bool force_live_memory = false,
1100 lldb::addr_t *load_addr_ptr = nullptr);
1101
1102 size_t ReadCStringFromMemory(const Address &addr, std::string &out_str,
1103 Status &error, bool force_live_memory = false);
1104
1105 size_t ReadCStringFromMemory(const Address &addr, char *dst,
1106 size_t dst_max_len, Status &result_error,
1107 bool force_live_memory = false);
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136 size_t ReadStringFromMemory(const Address &addr, char *dst, size_t max_bytes,
1137 Status &error, size_t type_width,
1138 bool force_live_memory = true);
1139
1140 size_t ReadScalarIntegerFromMemory(const Address &addr, uint32_t byte_size,
1141 bool is_signed, Scalar &scalar,
1142 Status &error,
1143 bool force_live_memory = false);
1144
1145 uint64_t ReadUnsignedIntegerFromMemory(const Address &addr,
1146 size_t integer_byte_size,
1147 uint64_t fail_value, Status &error,
1148 bool force_live_memory = false);
1149
1150 bool ReadPointerFromMemory(const Address &addr, Status &error,
1151 Address &pointer_addr,
1152 bool force_live_memory = false);
1153
1154 bool HasLoadedSections();
1155
1156 lldb::addr_t GetSectionLoadAddress(const lldb::SectionSP §ion_sp);
1157
1158 void ClearSectionLoadList();
1159
1160 void DumpSectionLoadList(Stream &s);
1161
1162 static Target *GetTargetFromContexts(const ExecutionContext *exe_ctx_ptr,
1163 const SymbolContext *sc_ptr);
1164
1165
1166 lldb::TargetSP CalculateTarget() override;
1167
1168 lldb::ProcessSP CalculateProcess() override;
1169
1170 lldb::ThreadSP CalculateThread() override;
1171
1172 lldb::StackFrameSP CalculateStackFrame() override;
1173
1174 void CalculateExecutionContext(ExecutionContext &exe_ctx) override;
1175
1176 PathMappingList &GetImageSearchPathList();
1177
1178 llvm::Expected<lldb::TypeSystemSP>
1179 GetScratchTypeSystemForLanguage(lldb::LanguageType language,
1180 bool create_on_demand = true);
1181
1182 std::vector<lldb::TypeSystemSP>
1183 GetScratchTypeSystems(bool create_on_demand = true);
1184
1185 PersistentExpressionState *
1186 GetPersistentExpressionStateForLanguage(lldb::LanguageType language);
1187
1188
1189
1190
1191
1192 UserExpression *
1193 GetUserExpressionForLanguage(llvm::StringRef expr, llvm::StringRef prefix,
1194 SourceLanguage language,
1195 Expression::ResultType desired_type,
1196 const EvaluateExpressionOptions &options,
1197 ValueObject *ctx_obj, Status &error);
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207 FunctionCaller *GetFunctionCallerForLanguage(lldb::LanguageType language,
1208 const CompilerType &return_type,
1209 const Address &function_address,
1210 const ValueList &arg_value_list,
1211 const char *name, Status &error);
1212
1213
1214 llvm::Expected<std::unique_ptr<UtilityFunction>>
1215 CreateUtilityFunction(std::string expression, std::string name,
1216 lldb::LanguageType language, ExecutionContext &exe_ctx);
1217
1218
1219
1220 Status Install(ProcessLaunchInfo *launch_info);
1221
1222 bool ResolveFileAddress(lldb::addr_t load_addr, Address &so_addr);
1223
1224 bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr,
1225 uint32_t stop_id = SectionLoadHistory::eStopIDNow,
1226 bool allow_section_end = false);
1227
1228 bool SetSectionLoadAddress(const lldb::SectionSP §ion,
1229 lldb::addr_t load_addr,
1230 bool warn_multiple = false);
1231
1232 size_t UnloadModuleSections(const lldb::ModuleSP &module_sp);
1233
1234 size_t UnloadModuleSections(const ModuleList &module_list);
1235
1236 bool SetSectionUnloaded(const lldb::SectionSP §ion_sp);
1237
1238 bool SetSectionUnloaded(const lldb::SectionSP §ion_sp,
1239 lldb::addr_t load_addr);
1240
1241 void ClearAllLoadedSections();
1242
1243 lldb_private::SummaryStatisticsSP GetSummaryStatisticsSPForProviderName(
1244 lldb_private::TypeSummaryImpl &summary_provider);
1245 lldb_private::SummaryStatisticsCache &GetSummaryStatisticsCache();
1246
1247
1248
1249
1250
1251
1252 void SetTrace(const lldb::TraceSP &trace_sp);
1253
1254
1255
1256
1257
1258
1259 lldb::TraceSP GetTrace();
1260
1261
1262
1263
1264
1265
1266
1267 llvm::Expected<lldb::TraceSP> CreateTrace();
1268
1269
1270
1271 llvm::Expected<lldb::TraceSP> GetTraceOrCreate();
1272
1273
1274
1275
1276
1277
1278 lldb::ExpressionResults EvaluateExpression(
1279 llvm::StringRef expression, ExecutionContextScope *exe_scope,
1280 lldb::ValueObjectSP &result_valobj_sp,
1281 const EvaluateExpressionOptions &options = EvaluateExpressionOptions(),
1282 std::string *fixed_expression = nullptr, ValueObject *ctx_obj = nullptr);
1283
1284 lldb::ExpressionVariableSP GetPersistentVariable(ConstString name);
1285
1286 lldb::addr_t GetPersistentSymbol(ConstString name);
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304 llvm::Expected<lldb_private::Address> GetEntryPointAddress();
1305
1306 CompilerType GetRegisterType(const std::string &name,
1307 const lldb_private::RegisterFlags &flags,
1308 uint32_t byte_size);
1309
1310
1311 class StopHook : public UserID {
1312 public:
1313 StopHook(const StopHook &rhs);
1314 virtual ~StopHook() = default;
1315
1316 enum class StopHookKind : uint32_t { CommandBased = 0, ScriptBased };
1317 enum class StopHookResult : uint32_t {
1318 KeepStopped = 0,
1319 RequestContinue,
1320 AlreadyContinued
1321 };
1322
1323 lldb::TargetSP &GetTarget() { return m_target_sp; }
1324
1325
1326
1327 void SetSpecifier(SymbolContextSpecifier *specifier);
1328
1329 SymbolContextSpecifier *GetSpecifier() { return m_specifier_sp.get(); }
1330
1331 bool ExecutionContextPasses(const ExecutionContext &exe_ctx);
1332
1333
1334
1335
1336
1337 virtual StopHookResult HandleStop(ExecutionContext &exe_ctx,
1338 lldb::StreamSP output) = 0;
1339
1340
1341
1342 void SetThreadSpecifier(ThreadSpec *specifier);
1343
1344 ThreadSpec *GetThreadSpecifier() { return m_thread_spec_up.get(); }
1345
1346 bool IsActive() { return m_active; }
1347
1348 void SetIsActive(bool is_active) { m_active = is_active; }
1349
1350 void SetAutoContinue(bool auto_continue) {
1351 m_auto_continue = auto_continue;
1352 }
1353
1354 bool GetAutoContinue() const { return m_auto_continue; }
1355
1356 void GetDescription(Stream &s, lldb::DescriptionLevel level) const;
1357 virtual void GetSubclassDescription(Stream &s,
1358 lldb::DescriptionLevel level) const = 0;
1359
1360 protected:
1361 lldb::TargetSP m_target_sp;
1362 lldb::SymbolContextSpecifierSP m_specifier_sp;
1363 std::unique_ptr<ThreadSpec> m_thread_spec_up;
1364 bool m_active = true;
1365 bool m_auto_continue = false;
1366
1367 StopHook(lldb::TargetSP target_sp, lldb::user_id_t uid);
1368 };
1369
1370 class StopHookCommandLine : public StopHook {
1371 public:
1372 ~StopHookCommandLine() override = default;
1373
1374 StringList &GetCommands() { return m_commands; }
1375 void SetActionFromString(const std::string &strings);
1376 void SetActionFromStrings(const std::vector<std::string> &strings);
1377
1378 StopHookResult HandleStop(ExecutionContext &exc_ctx,
1379 lldb::StreamSP output_sp) override;
1380 void GetSubclassDescription(Stream &s,
1381 lldb::DescriptionLevel level) const override;
1382
1383 private:
1384 StringList m_commands;
1385
1386
1387
1388 StopHookCommandLine(lldb::TargetSP target_sp, lldb::user_id_t uid)
1389 : StopHook(target_sp, uid) {}
1390 friend class Target;
1391 };
1392
1393 class StopHookScripted : public StopHook {
1394 public:
1395 ~StopHookScripted() override = default;
1396 StopHookResult HandleStop(ExecutionContext &exc_ctx,
1397 lldb::StreamSP output) override;
1398
1399 Status SetScriptCallback(std::string class_name,
1400 StructuredData::ObjectSP extra_args_sp);
1401
1402 void GetSubclassDescription(Stream &s,
1403 lldb::DescriptionLevel level) const override;
1404
1405 private:
1406 std::string m_class_name;
1407
1408
1409 StructuredDataImpl m_extra_args;
1410 lldb::ScriptedStopHookInterfaceSP m_interface_sp;
1411
1412
1413
1414
1415 StopHookScripted(lldb::TargetSP target_sp, lldb::user_id_t uid)
1416 : StopHook(target_sp, uid) {}
1417 friend class Target;
1418 };
1419
1420 typedef std::shared_ptr<StopHook> StopHookSP;
1421
1422
1423
1424 StopHookSP CreateStopHook(StopHook::StopHookKind kind);
1425
1426
1427
1428 void UndoCreateStopHook(lldb::user_id_t uid);
1429
1430
1431
1432 bool RunStopHooks();
1433
1434 size_t GetStopHookSize();
1435
1436 bool SetSuppresStopHooks(bool suppress) {
1437 bool old_value = m_suppress_stop_hooks;
1438 m_suppress_stop_hooks = suppress;
1439 return old_value;
1440 }
1441
1442 bool GetSuppressStopHooks() { return m_suppress_stop_hooks; }
1443
1444 bool RemoveStopHookByID(lldb::user_id_t uid);
1445
1446 void RemoveAllStopHooks();
1447
1448 StopHookSP GetStopHookByID(lldb::user_id_t uid);
1449
1450 bool SetStopHookActiveStateByID(lldb::user_id_t uid, bool active_state);
1451
1452 void SetAllStopHooksActiveState(bool active_state);
1453
1454 size_t GetNumStopHooks() const { return m_stop_hooks.size(); }
1455
1456 StopHookSP GetStopHookAtIndex(size_t index) {
1457 if (index >= GetNumStopHooks())
1458 return StopHookSP();
1459 StopHookCollection::iterator pos = m_stop_hooks.begin();
1460
1461 while (index > 0) {
1462 pos++;
1463 index--;
1464 }
1465 return (*pos).second;
1466 }
1467
1468 lldb::PlatformSP GetPlatform() { return m_platform_sp; }
1469
1470 void SetPlatform(const lldb::PlatformSP &platform_sp) {
1471 m_platform_sp = platform_sp;
1472 }
1473
1474 SourceManager &GetSourceManager();
1475
1476
1477 lldb::SearchFilterSP
1478 GetSearchFilterForModule(const FileSpec *containingModule);
1479
1480 lldb::SearchFilterSP
1481 GetSearchFilterForModuleList(const FileSpecList *containingModuleList);
1482
1483 lldb::SearchFilterSP
1484 GetSearchFilterForModuleAndCUList(const FileSpecList *containingModules,
1485 const FileSpecList *containingSourceFiles);
1486
1487 lldb::REPLSP GetREPL(Status &err, lldb::LanguageType language,
1488 const char *repl_options, bool can_create);
1489
1490 void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp);
1491
1492 StackFrameRecognizerManager &GetFrameRecognizerManager() {
1493 return *m_frame_recognizer_manager_up;
1494 }
1495
1496 void SaveScriptedLaunchInfo(lldb_private::ProcessInfo &process_info);
1497
1498
1499
1500
1501 protected:
1502 struct DummySignalValues {
1503 LazyBool pass = eLazyBoolCalculate;
1504 LazyBool notify = eLazyBoolCalculate;
1505 LazyBool stop = eLazyBoolCalculate;
1506 DummySignalValues(LazyBool pass, LazyBool notify, LazyBool stop)
1507 : pass(pass), notify(notify), stop(stop) {}
1508 DummySignalValues() = default;
1509 };
1510 using DummySignalElement = llvm::StringMapEntry<DummySignalValues>;
1511 static bool UpdateSignalFromDummy(lldb::UnixSignalsSP signals_sp,
1512 const DummySignalElement &element);
1513 static bool ResetSignalFromDummy(lldb::UnixSignalsSP signals_sp,
1514 const DummySignalElement &element);
1515
1516 public:
1517
1518
1519
1520 void AddDummySignal(llvm::StringRef name, LazyBool pass, LazyBool print,
1521 LazyBool stop);
1522
1523
1524
1525 void UpdateSignalsFromDummy(lldb::UnixSignalsSP signals_sp,
1526 lldb::StreamSP warning_stream_sp);
1527
1528
1529
1530 void ClearDummySignals(Args &signal_names);
1531
1532 void PrintDummySignals(Stream &strm, Args &signals);
1533
1534 protected:
1535
1536
1537 void NotifyModuleAdded(const ModuleList &module_list,
1538 const lldb::ModuleSP &module_sp) override;
1539
1540 void NotifyModuleRemoved(const ModuleList &module_list,
1541 const lldb::ModuleSP &module_sp) override;
1542
1543 void NotifyModuleUpdated(const ModuleList &module_list,
1544 const lldb::ModuleSP &old_module_sp,
1545 const lldb::ModuleSP &new_module_sp) override;
1546
1547 void NotifyWillClearList(const ModuleList &module_list) override;
1548
1549 void NotifyModulesRemoved(lldb_private::ModuleList &module_list) override;
1550
1551 class Arch {
1552 public:
1553 explicit Arch(const ArchSpec &spec);
1554 const Arch &operator=(const ArchSpec &spec);
1555
1556 const ArchSpec &GetSpec() const { return m_spec; }
1557 Architecture *GetPlugin() const { return m_plugin_up.get(); }
1558
1559 private:
1560 ArchSpec m_spec;
1561 std::unique_ptr<Architecture> m_plugin_up;
1562 };
1563
1564
1565 Debugger &m_debugger;
1566 lldb::PlatformSP m_platform_sp;
1567 std::recursive_mutex m_mutex;
1568
1569
1570
1571
1572
1573
1574 std::recursive_mutex m_private_mutex;
1575 Arch m_arch;
1576 std::string m_label;
1577 ModuleList m_images;
1578
1579 SummaryStatisticsCache m_summary_statistics_cache;
1580 SectionLoadHistory m_section_load_history;
1581 BreakpointList m_breakpoint_list;
1582 BreakpointList m_internal_breakpoint_list;
1583 using BreakpointNameList =
1584 std::map<ConstString, std::unique_ptr<BreakpointName>>;
1585 BreakpointNameList m_breakpoint_names;
1586
1587 lldb::BreakpointSP m_last_created_breakpoint;
1588 WatchpointList m_watchpoint_list;
1589 lldb::WatchpointSP m_last_created_watchpoint;
1590
1591
1592
1593 lldb::ProcessSP m_process_sp;
1594 lldb::SearchFilterSP m_search_filter_sp;
1595 PathMappingList m_image_search_paths;
1596 TypeSystemMap m_scratch_type_system_map;
1597
1598 typedef std::map<lldb::LanguageType, lldb::REPLSP> REPLMap;
1599 REPLMap m_repl_map;
1600
1601 lldb::SourceManagerUP m_source_manager_up;
1602
1603 typedef std::map<lldb::user_id_t, StopHookSP> StopHookCollection;
1604 StopHookCollection m_stop_hooks;
1605 lldb::user_id_t m_stop_hook_next_id;
1606 uint32_t m_latest_stop_hook_id;
1607
1608 bool m_valid;
1609 bool m_suppress_stop_hooks;
1610 bool m_is_dummy_target;
1611 unsigned m_next_persistent_variable_index = 0;
1612
1613
1614 lldb::TraceSP m_trace_sp;
1615
1616 lldb::StackFrameRecognizerManagerUP m_frame_recognizer_manager_up;
1617
1618
1619
1620 llvm::StringMap<DummySignalValues> m_dummy_signals;
1621
1622 static void ImageSearchPathsChanged(const PathMappingList &path_list,
1623 void *baton);
1624
1625
1626 private:
1627
1628 TargetStats m_stats;
1629
1630 public:
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640 llvm::json::Value
1641 ReportStatistics(const lldb_private::StatisticsOptions &options);
1642
1643 void ResetStatistics();
1644
1645 TargetStats &GetStatistics() { return m_stats; }
1646
1647 protected:
1648
1649
1650
1651
1652
1653
1654
1655 Target(Debugger &debugger, const ArchSpec &target_arch,
1656 const lldb::PlatformSP &platform_sp, bool is_dummy_target);
1657
1658
1659 bool ProcessIsValid();
1660
1661
1662 void PrimeFromDummyTarget(Target &target);
1663
1664 void AddBreakpoint(lldb::BreakpointSP breakpoint_sp, bool internal);
1665
1666 void FinalizeFileActions(ProcessLaunchInfo &info);
1667
1668
1669
1670 lldb::addr_t GetReasonableReadSize(const Address &addr);
1671
1672 Target(const Target &) = delete;
1673 const Target &operator=(const Target &) = delete;
1674
1675 SectionLoadList &GetSectionLoadList() {
1676 return m_section_load_history.GetCurrentSectionLoadList();
1677 }
1678 };
1679
1680 }
1681
1682 #endif