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