Target.h revision 5beb99d65c72cd4a4f7529c4ff8cc04a1a40769d
1//===-- Target.h ------------------------------------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef liblldb_Target_h_ 11#define liblldb_Target_h_ 12 13// C Includes 14// C++ Includes 15 16// Other libraries and framework includes 17// Project includes 18#include "lldb/lldb-public.h" 19#include "lldb/Breakpoint/BreakpointList.h" 20#include "lldb/Breakpoint/BreakpointLocationCollection.h" 21#include "lldb/Core/Broadcaster.h" 22#include "lldb/Core/Event.h" 23#include "lldb/Core/ModuleList.h" 24#include "lldb/Core/UserSettingsController.h" 25#include "lldb/Expression/ClangPersistentVariables.h" 26#include "lldb/Interpreter/NamedOptionValue.h" 27#include "lldb/Symbol/SymbolContext.h" 28#include "lldb/Target/ABI.h" 29#include "lldb/Target/ExecutionContextScope.h" 30#include "lldb/Target/PathMappingList.h" 31#include "lldb/Target/SectionLoadList.h" 32 33#include "lldb/API/SBTarget.h" 34 35namespace lldb_private { 36 37//---------------------------------------------------------------------- 38// TargetInstanceSettings 39//---------------------------------------------------------------------- 40class TargetInstanceSettings : public InstanceSettings 41{ 42public: 43 static OptionEnumValueElement g_dynamic_value_types[]; 44 45 TargetInstanceSettings (UserSettingsController &owner, bool live_instance = true, const char *name = NULL); 46 47 TargetInstanceSettings (const TargetInstanceSettings &rhs); 48 49 virtual 50 ~TargetInstanceSettings (); 51 52 TargetInstanceSettings& 53 operator= (const TargetInstanceSettings &rhs); 54 55 void 56 UpdateInstanceSettingsVariable (const ConstString &var_name, 57 const char *index_value, 58 const char *value, 59 const ConstString &instance_name, 60 const SettingEntry &entry, 61 VarSetOperationType op, 62 Error &err, 63 bool pending); 64 65 bool 66 GetInstanceSettingsValue (const SettingEntry &entry, 67 const ConstString &var_name, 68 StringList &value, 69 Error *err); 70 71 lldb::DynamicValueType 72 GetPreferDynamicValue() 73 { 74 return (lldb::DynamicValueType) g_dynamic_value_types[m_prefer_dynamic_value].value; 75 } 76 77 bool 78 GetSkipPrologue() 79 { 80 return m_skip_prologue; 81 } 82 83 PathMappingList & 84 GetSourcePathMap () 85 { 86 return m_source_map; 87 } 88 89protected: 90 91 void 92 CopyInstanceSettings (const lldb::InstanceSettingsSP &new_settings, 93 bool pending); 94 95 const ConstString 96 CreateInstanceName (); 97 98 OptionValueFileSpec m_expr_prefix_file; 99 lldb::DataBufferSP m_expr_prefix_contents_sp; 100 int m_prefer_dynamic_value; 101 OptionValueBoolean m_skip_prologue; 102 PathMappingList m_source_map; 103 104 105}; 106 107//---------------------------------------------------------------------- 108// Target 109//---------------------------------------------------------------------- 110class Target : 111 public Broadcaster, 112 public ExecutionContextScope, 113 public TargetInstanceSettings 114{ 115public: 116 friend class TargetList; 117 118 //------------------------------------------------------------------ 119 /// Broadcaster event bits definitions. 120 //------------------------------------------------------------------ 121 enum 122 { 123 eBroadcastBitBreakpointChanged = (1 << 0), 124 eBroadcastBitModulesLoaded = (1 << 1), 125 eBroadcastBitModulesUnloaded = (1 << 2) 126 }; 127 128 static void 129 SettingsInitialize (); 130 131 static void 132 SettingsTerminate (); 133 134 static lldb::UserSettingsControllerSP & 135 GetSettingsController (); 136 137 static ArchSpec 138 GetDefaultArchitecture (); 139 140 static void 141 SetDefaultArchitecture (const ArchSpec &arch); 142 143 void 144 UpdateInstanceName (); 145 146 lldb::ModuleSP 147 GetSharedModule (const FileSpec& file_spec, 148 const ArchSpec& arch, 149 const lldb_private::UUID *uuid = NULL, 150 const ConstString *object_name = NULL, 151 off_t object_offset = 0, 152 Error *error_ptr = NULL); 153private: 154 //------------------------------------------------------------------ 155 /// Construct with optional file and arch. 156 /// 157 /// This member is private. Clients must use 158 /// TargetList::CreateTarget(const FileSpec*, const ArchSpec*) 159 /// so all targets can be tracked from the central target list. 160 /// 161 /// @see TargetList::CreateTarget(const FileSpec*, const ArchSpec*) 162 //------------------------------------------------------------------ 163 Target (Debugger &debugger, 164 const ArchSpec &target_arch, 165 const lldb::PlatformSP &platform_sp); 166 167public: 168 ~Target(); 169 170 Mutex & 171 GetAPIMutex () 172 { 173 return m_mutex; 174 } 175 176 void 177 DeleteCurrentProcess (); 178 179 //------------------------------------------------------------------ 180 /// Dump a description of this object to a Stream. 181 /// 182 /// Dump a description of the contents of this object to the 183 /// supplied stream \a s. The dumped content will be only what has 184 /// been loaded or parsed up to this point at which this function 185 /// is called, so this is a good way to see what has been parsed 186 /// in a target. 187 /// 188 /// @param[in] s 189 /// The stream to which to dump the object descripton. 190 //------------------------------------------------------------------ 191 void 192 Dump (Stream *s, lldb::DescriptionLevel description_level); 193 194 const lldb::ProcessSP & 195 CreateProcess (Listener &listener, const char *plugin_name = NULL); 196 197 const lldb::ProcessSP & 198 GetProcessSP () const; 199 200 lldb::TargetSP 201 GetSP(); 202 203 void 204 Destroy(); 205 206 //------------------------------------------------------------------ 207 // This part handles the breakpoints. 208 //------------------------------------------------------------------ 209 210 BreakpointList & 211 GetBreakpointList(bool internal = false); 212 213 const BreakpointList & 214 GetBreakpointList(bool internal = false) const; 215 216 lldb::BreakpointSP 217 GetLastCreatedBreakpoint () 218 { 219 return m_last_created_breakpoint; 220 } 221 222 lldb::BreakpointSP 223 GetBreakpointByID (lldb::break_id_t break_id); 224 225 // Use this to create a file and line breakpoint to a given module or all module it is NULL 226 lldb::BreakpointSP 227 CreateBreakpoint (const FileSpec *containingModule, 228 const FileSpec &file, 229 uint32_t line_no, 230 bool check_inlines, 231 bool internal = false); 232 233 // Use this to create a breakpoint from a load address 234 lldb::BreakpointSP 235 CreateBreakpoint (lldb::addr_t load_addr, 236 bool internal = false); 237 238 // Use this to create Address breakpoints: 239 lldb::BreakpointSP 240 CreateBreakpoint (Address &addr, 241 bool internal = false); 242 243 // Use this to create a function breakpoint by regexp in containingModule, or all modules if it is NULL 244 // When "skip_prologue is set to eLazyBoolCalculate, we use the current target 245 // setting, else we use the values passed in 246 lldb::BreakpointSP 247 CreateBreakpoint (const FileSpec *containingModule, 248 RegularExpression &func_regexp, 249 bool internal = false, 250 LazyBool skip_prologue = eLazyBoolCalculate); 251 252 // Use this to create a function breakpoint by name in containingModule, or all modules if it is NULL 253 // When "skip_prologue is set to eLazyBoolCalculate, we use the current target 254 // setting, else we use the values passed in 255 lldb::BreakpointSP 256 CreateBreakpoint (const FileSpec *containingModule, 257 const char *func_name, 258 uint32_t func_name_type_mask, 259 bool internal = false, 260 LazyBool skip_prologue = eLazyBoolCalculate); 261 262 // Use this to create a general breakpoint: 263 lldb::BreakpointSP 264 CreateBreakpoint (lldb::SearchFilterSP &filter_sp, 265 lldb::BreakpointResolverSP &resolver_sp, 266 bool internal = false); 267 268 void 269 RemoveAllBreakpoints (bool internal_also = false); 270 271 void 272 DisableAllBreakpoints (bool internal_also = false); 273 274 void 275 EnableAllBreakpoints (bool internal_also = false); 276 277 bool 278 DisableBreakpointByID (lldb::break_id_t break_id); 279 280 bool 281 EnableBreakpointByID (lldb::break_id_t break_id); 282 283 bool 284 RemoveBreakpointByID (lldb::break_id_t break_id); 285 286 void 287 ModulesDidLoad (ModuleList &module_list); 288 289 void 290 ModulesDidUnload (ModuleList &module_list); 291 292 293 //------------------------------------------------------------------ 294 /// Get \a load_addr as a callable code load address for this target 295 /// 296 /// Take \a load_addr and potentially add any address bits that are 297 /// needed to make the address callable. For ARM this can set bit 298 /// zero (if it already isn't) if \a load_addr is a thumb function. 299 /// If \a addr_class is set to eAddressClassInvalid, then the address 300 /// adjustment will always happen. If it is set to an address class 301 /// that doesn't have code in it, LLDB_INVALID_ADDRESS will be 302 /// returned. 303 //------------------------------------------------------------------ 304 lldb::addr_t 305 GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class = lldb_private::eAddressClassInvalid) const; 306 307 //------------------------------------------------------------------ 308 /// Get \a load_addr as an opcode for this target. 309 /// 310 /// Take \a load_addr and potentially strip any address bits that are 311 /// needed to make the address point to an opcode. For ARM this can 312 /// clear bit zero (if it already isn't) if \a load_addr is a 313 /// thumb function and load_addr is in code. 314 /// If \a addr_class is set to eAddressClassInvalid, then the address 315 /// adjustment will always happen. If it is set to an address class 316 /// that doesn't have code in it, LLDB_INVALID_ADDRESS will be 317 /// returned. 318 //------------------------------------------------------------------ 319 lldb::addr_t 320 GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class = lldb_private::eAddressClassInvalid) const; 321 322protected: 323 void 324 ModuleAdded (lldb::ModuleSP &module_sp); 325 326 void 327 ModuleUpdated (lldb::ModuleSP &old_module_sp, lldb::ModuleSP &new_module_sp); 328 329public: 330 //------------------------------------------------------------------ 331 /// Gets the module for the main executable. 332 /// 333 /// Each process has a notion of a main executable that is the file 334 /// that will be executed or attached to. Executable files can have 335 /// dependent modules that are discovered from the object files, or 336 /// discovered at runtime as things are dynamically loaded. 337 /// 338 /// @return 339 /// The shared pointer to the executable module which can 340 /// contains a NULL Module object if no executable has been 341 /// set. 342 /// 343 /// @see DynamicLoader 344 /// @see ObjectFile::GetDependentModules (FileSpecList&) 345 /// @see Process::SetExecutableModule(lldb::ModuleSP&) 346 //------------------------------------------------------------------ 347 lldb::ModuleSP 348 GetExecutableModule (); 349 350 Module* 351 GetExecutableModulePointer (); 352 353 //------------------------------------------------------------------ 354 /// Set the main executable module. 355 /// 356 /// Each process has a notion of a main executable that is the file 357 /// that will be executed or attached to. Executable files can have 358 /// dependent modules that are discovered from the object files, or 359 /// discovered at runtime as things are dynamically loaded. 360 /// 361 /// Setting the executable causes any of the current dependant 362 /// image information to be cleared and replaced with the static 363 /// dependent image information found by calling 364 /// ObjectFile::GetDependentModules (FileSpecList&) on the main 365 /// executable and any modules on which it depends. Calling 366 /// Process::GetImages() will return the newly found images that 367 /// were obtained from all of the object files. 368 /// 369 /// @param[in] module_sp 370 /// A shared pointer reference to the module that will become 371 /// the main executable for this process. 372 /// 373 /// @param[in] get_dependent_files 374 /// If \b true then ask the object files to track down any 375 /// known dependent files. 376 /// 377 /// @see ObjectFile::GetDependentModules (FileSpecList&) 378 /// @see Process::GetImages() 379 //------------------------------------------------------------------ 380 void 381 SetExecutableModule (lldb::ModuleSP& module_sp, bool get_dependent_files); 382 383 //------------------------------------------------------------------ 384 /// Get accessor for the images for this process. 385 /// 386 /// Each process has a notion of a main executable that is the file 387 /// that will be executed or attached to. Executable files can have 388 /// dependent modules that are discovered from the object files, or 389 /// discovered at runtime as things are dynamically loaded. After 390 /// a main executable has been set, the images will contain a list 391 /// of all the files that the executable depends upon as far as the 392 /// object files know. These images will usually contain valid file 393 /// virtual addresses only. When the process is launched or attached 394 /// to, the DynamicLoader plug-in will discover where these images 395 /// were loaded in memory and will resolve the load virtual 396 /// addresses is each image, and also in images that are loaded by 397 /// code. 398 /// 399 /// @return 400 /// A list of Module objects in a module list. 401 //------------------------------------------------------------------ 402 ModuleList& 403 GetImages () 404 { 405 return m_images; 406 } 407 408 const ModuleList& 409 GetImages () const 410 { 411 return m_images; 412 } 413 414 ArchSpec & 415 GetArchitecture () 416 { 417 return m_arch; 418 } 419 420 const ArchSpec & 421 GetArchitecture () const 422 { 423 return m_arch; 424 } 425 426 //------------------------------------------------------------------ 427 /// Set the architecture for this target. 428 /// 429 /// If the current target has no Images read in, then this just sets the architecture, which will 430 /// be used to select the architecture of the ExecutableModule when that is set. 431 /// If the current target has an ExecutableModule, then calling SetArchitecture with a different 432 /// architecture from the currently selected one will reset the ExecutableModule to that slice 433 /// of the file backing the ExecutableModule. If the file backing the ExecutableModule does not 434 /// contain a fork of this architecture, then this code will return false, and the architecture 435 /// won't be changed. 436 /// If the input arch_spec is the same as the already set architecture, this is a no-op. 437 /// 438 /// @param[in] arch_spec 439 /// The new architecture. 440 /// 441 /// @return 442 /// \b true if the architecture was successfully set, \bfalse otherwise. 443 //------------------------------------------------------------------ 444 bool 445 SetArchitecture (const ArchSpec &arch_spec); 446 447 Debugger & 448 GetDebugger () 449 { 450 return m_debugger; 451 } 452 453 size_t 454 ReadMemoryFromFileCache (const Address& addr, 455 void *dst, 456 size_t dst_len, 457 Error &error); 458 459 // Reading memory through the target allows us to skip going to the process 460 // for reading memory if possible and it allows us to try and read from 461 // any constant sections in our object files on disk. If you always want 462 // live program memory, read straight from the process. If you possibly 463 // want to read from const sections in object files, read from the target. 464 // This version of ReadMemory will try and read memory from the process 465 // if the process is alive. The order is: 466 // 1 - if (prefer_file_cache == true) then read from object file cache 467 // 2 - if there is a valid process, try and read from its memory 468 // 3 - if (prefer_file_cache == false) then read from object file cache 469 size_t 470 ReadMemory (const Address& addr, 471 bool prefer_file_cache, 472 void *dst, 473 size_t dst_len, 474 Error &error); 475 476 size_t 477 ReadScalarIntegerFromMemory (const Address& addr, 478 bool prefer_file_cache, 479 uint32_t byte_size, 480 bool is_signed, 481 Scalar &scalar, 482 Error &error); 483 484 uint64_t 485 ReadUnsignedIntegerFromMemory (const Address& addr, 486 bool prefer_file_cache, 487 size_t integer_byte_size, 488 uint64_t fail_value, 489 Error &error); 490 491 bool 492 ReadPointerFromMemory (const Address& addr, 493 bool prefer_file_cache, 494 Error &error, 495 Address &pointer_addr); 496 497 SectionLoadList& 498 GetSectionLoadList() 499 { 500 return m_section_load_list; 501 } 502 503 const SectionLoadList& 504 GetSectionLoadList() const 505 { 506 return m_section_load_list; 507 } 508 509 510 //------------------------------------------------------------------ 511 /// Load a module in this target by at the section file addresses 512 /// with an optional constant slide applied to each section. 513 /// 514 /// This function will load all top level sections at their file 515 /// addresses and apply an optional constant slide amount to each 516 /// section. This can be used to easily load a module at the same 517 /// addresses that are contained in the object file (trust that 518 /// the addresses in an object file are the correct load addresses). 519 /// 520 /// @param[in] module 521 /// The module to load. 522 /// 523 /// @param[in] slide 524 /// A constant slide to add to each file address as each section 525 /// is being loaded. 526 /// 527 /// @return 528 /// \b true if loading the module at the specified address 529 /// causes a section to be loaded when it previously wasn't, or 530 /// if a section changes load address. Returns \b false if 531 /// the sections were all already loaded at these addresses. 532 //------------------------------------------------------------------ 533 bool 534 LoadModuleWithSlide (Module *module, lldb::addr_t slide); 535 536 static Target * 537 GetTargetFromContexts (const ExecutionContext *exe_ctx_ptr, 538 const SymbolContext *sc_ptr); 539 540 //------------------------------------------------------------------ 541 // lldb::ExecutionContextScope pure virtual functions 542 //------------------------------------------------------------------ 543 virtual Target * 544 CalculateTarget (); 545 546 virtual Process * 547 CalculateProcess (); 548 549 virtual Thread * 550 CalculateThread (); 551 552 virtual StackFrame * 553 CalculateStackFrame (); 554 555 virtual void 556 CalculateExecutionContext (ExecutionContext &exe_ctx); 557 558 PathMappingList & 559 GetImageSearchPathList (); 560 561 ClangASTContext * 562 GetScratchClangASTContext(); 563 564 const char * 565 GetExpressionPrefixContentsAsCString (); 566 567 // Since expressions results can persist beyond the lifetime of a process, 568 // and the const expression results are available after a process is gone, 569 // we provide a way for expressions to be evaluated from the Target itself. 570 // If an expression is going to be run, then it should have a frame filled 571 // in in th execution context. 572 ExecutionResults 573 EvaluateExpression (const char *expression, 574 StackFrame *frame, 575 bool unwind_on_error, 576 bool keep_in_memory, 577 lldb::DynamicValueType use_dynamic, 578 lldb::ValueObjectSP &result_valobj_sp); 579 580 ClangPersistentVariables & 581 GetPersistentVariables() 582 { 583 return m_persistent_variables; 584 } 585 586 //------------------------------------------------------------------ 587 // Target Stop Hooks 588 //------------------------------------------------------------------ 589 class StopHook : public UserID 590 { 591 public: 592 ~StopHook (); 593 594 StopHook (const StopHook &rhs); 595 596 StringList * 597 GetCommandPointer () 598 { 599 return &m_commands; 600 } 601 602 const StringList & 603 GetCommands() 604 { 605 return m_commands; 606 } 607 608 lldb::TargetSP & 609 GetTarget() 610 { 611 return m_target_sp; 612 } 613 614 void 615 SetCommands (StringList &in_commands) 616 { 617 m_commands = in_commands; 618 } 619 620 // Set the specifier. The stop hook will own the specifier, and is responsible for deleting it when we're done. 621 void 622 SetSpecifier (SymbolContextSpecifier *specifier) 623 { 624 m_specifier_sp.reset (specifier); 625 } 626 627 SymbolContextSpecifier * 628 GetSpecifier () 629 { 630 return m_specifier_sp.get(); 631 } 632 633 // Set the Thread Specifier. The stop hook will own the thread specifier, and is responsible for deleting it when we're done. 634 void 635 SetThreadSpecifier (ThreadSpec *specifier); 636 637 ThreadSpec * 638 GetThreadSpecifier() 639 { 640 return m_thread_spec_ap.get(); 641 } 642 643 bool 644 IsActive() 645 { 646 return m_active; 647 } 648 649 void 650 SetIsActive (bool is_active) 651 { 652 m_active = is_active; 653 } 654 655 void 656 GetDescription (Stream *s, lldb::DescriptionLevel level) const; 657 658 private: 659 lldb::TargetSP m_target_sp; 660 StringList m_commands; 661 lldb::SymbolContextSpecifierSP m_specifier_sp; 662 std::auto_ptr<ThreadSpec> m_thread_spec_ap; 663 bool m_active; 664 665 // Use AddStopHook to make a new empty stop hook. The GetCommandPointer and fill it with commands, 666 // and SetSpecifier to set the specifier shared pointer (can be null, that will match anything.) 667 StopHook (lldb::TargetSP target_sp, lldb::user_id_t uid); 668 friend class Target; 669 }; 670 typedef lldb::SharedPtr<StopHook>::Type StopHookSP; 671 672 // Add an empty stop hook to the Target's stop hook list, and returns a shared pointer to it in new_hook. 673 // Returns the id of the new hook. 674 lldb::user_id_t 675 AddStopHook (StopHookSP &new_hook); 676 677 void 678 RunStopHooks (); 679 680 size_t 681 GetStopHookSize(); 682 683 bool 684 SetSuppresStopHooks (bool suppress) 685 { 686 bool old_value = m_suppress_stop_hooks; 687 m_suppress_stop_hooks = suppress; 688 return old_value; 689 } 690 691 bool 692 GetSuppressStopHooks () 693 { 694 return m_suppress_stop_hooks; 695 } 696 697// StopHookSP & 698// GetStopHookByIndex (size_t index); 699// 700 bool 701 RemoveStopHookByID (lldb::user_id_t uid); 702 703 void 704 RemoveAllStopHooks (); 705 706 StopHookSP 707 GetStopHookByID (lldb::user_id_t uid); 708 709 bool 710 SetStopHookActiveStateByID (lldb::user_id_t uid, bool active_state); 711 712 void 713 SetAllStopHooksActiveState (bool active_state); 714 715 size_t GetNumStopHooks () const 716 { 717 return m_stop_hooks.size(); 718 } 719 720 StopHookSP 721 GetStopHookAtIndex (size_t index) 722 { 723 if (index >= GetNumStopHooks()) 724 return StopHookSP(); 725 StopHookCollection::iterator pos = m_stop_hooks.begin(); 726 727 while (index > 0) 728 { 729 pos++; 730 index--; 731 } 732 return (*pos).second; 733 } 734 735 lldb::PlatformSP 736 GetPlatform () 737 { 738 return m_platform_sp; 739 } 740 741 //------------------------------------------------------------------ 742 // Target::SettingsController 743 //------------------------------------------------------------------ 744 class SettingsController : public UserSettingsController 745 { 746 public: 747 SettingsController (); 748 749 virtual 750 ~SettingsController (); 751 752 bool 753 SetGlobalVariable (const ConstString &var_name, 754 const char *index_value, 755 const char *value, 756 const SettingEntry &entry, 757 const VarSetOperationType op, 758 Error&err); 759 760 bool 761 GetGlobalVariable (const ConstString &var_name, 762 StringList &value, 763 Error &err); 764 765 static SettingEntry global_settings_table[]; 766 static SettingEntry instance_settings_table[]; 767 768 ArchSpec & 769 GetArchitecture () 770 { 771 return m_default_architecture; 772 } 773 protected: 774 775 lldb::InstanceSettingsSP 776 CreateInstanceSettings (const char *instance_name); 777 778 private: 779 780 // Class-wide settings. 781 ArchSpec m_default_architecture; 782 783 DISALLOW_COPY_AND_ASSIGN (SettingsController); 784 }; 785 786 787protected: 788 friend class lldb::SBTarget; 789 790 //------------------------------------------------------------------ 791 // Member variables. 792 //------------------------------------------------------------------ 793 Debugger & m_debugger; 794 lldb::PlatformSP m_platform_sp; ///< The platform for this target. 795 Mutex m_mutex; ///< An API mutex that is used by the lldb::SB* classes make the SB interface thread safe 796 ArchSpec m_arch; 797 ModuleList m_images; ///< The list of images for this process (shared libraries and anything dynamically loaded). 798 SectionLoadList m_section_load_list; 799 BreakpointList m_breakpoint_list; 800 BreakpointList m_internal_breakpoint_list; 801 lldb::BreakpointSP m_last_created_breakpoint; 802 // We want to tightly control the process destruction process so 803 // we can correctly tear down everything that we need to, so the only 804 // class that knows about the process lifespan is this target class. 805 lldb::ProcessSP m_process_sp; 806 lldb::SearchFilterSP m_search_filter_sp; 807 PathMappingList m_image_search_paths; 808 std::auto_ptr<ClangASTContext> m_scratch_ast_context_ap; 809 ClangPersistentVariables m_persistent_variables; ///< These are the persistent variables associated with this process for the expression parser. 810 811 812 typedef std::map<lldb::user_id_t, StopHookSP> StopHookCollection; 813 StopHookCollection m_stop_hooks; 814 lldb::user_id_t m_stop_hook_next_id; 815 bool m_suppress_stop_hooks; 816 817 //------------------------------------------------------------------ 818 // Methods. 819 //------------------------------------------------------------------ 820 lldb::SearchFilterSP 821 GetSearchFilterForModule (const FileSpec *containingModule); 822 823 static void 824 ImageSearchPathsChanged (const PathMappingList &path_list, 825 void *baton); 826 827private: 828 DISALLOW_COPY_AND_ASSIGN (Target); 829}; 830 831} // namespace lldb_private 832 833#endif // liblldb_Target_h_ 834