1 //===-- SBTarget.h ----------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBTarget_h_
11 #define LLDB_SBTarget_h_
15 // Other libraries and framework includes
17 #include "lldb/API/SBAddress.h"
18 #include "lldb/API/SBAttachInfo.h"
19 #include "lldb/API/SBBreakpoint.h"
20 #include "lldb/API/SBBroadcaster.h"
21 #include "lldb/API/SBDefines.h"
22 #include "lldb/API/SBFileSpec.h"
23 #include "lldb/API/SBFileSpecList.h"
24 #include "lldb/API/SBLaunchInfo.h"
25 #include "lldb/API/SBSymbolContextList.h"
26 #include "lldb/API/SBType.h"
27 #include "lldb/API/SBValue.h"
28 #include "lldb/API/SBWatchpoint.h"
34 class LLDB_API SBTarget {
36 //------------------------------------------------------------------
38 //------------------------------------------------------------------
40 eBroadcastBitBreakpointChanged = (1 << 0),
41 eBroadcastBitModulesLoaded = (1 << 1),
42 eBroadcastBitModulesUnloaded = (1 << 2),
43 eBroadcastBitWatchpointChanged = (1 << 3),
44 eBroadcastBitSymbolsLoaded = (1 << 4)
47 //------------------------------------------------------------------
49 //------------------------------------------------------------------
52 SBTarget(const lldb::SBTarget &rhs);
54 SBTarget(const lldb::TargetSP &target_sp);
56 //------------------------------------------------------------------
58 //------------------------------------------------------------------
61 const lldb::SBTarget &operator=(const lldb::SBTarget &rhs);
65 static bool EventIsTargetEvent(const lldb::SBEvent &event);
67 static lldb::SBTarget GetTargetFromEvent(const lldb::SBEvent &event);
69 static uint32_t GetNumModulesFromEvent(const lldb::SBEvent &event);
71 static lldb::SBModule GetModuleAtIndexFromEvent(const uint32_t idx,
72 const lldb::SBEvent &event);
74 static const char *GetBroadcasterClassName();
76 lldb::SBProcess GetProcess();
78 lldb::SBStructuredData GetStatistics();
80 //------------------------------------------------------------------
81 /// Return the platform object associated with the target.
83 /// After return, the platform object should be checked for
87 /// A platform object.
88 //------------------------------------------------------------------
89 lldb::SBPlatform GetPlatform();
91 //------------------------------------------------------------------
92 /// Install any binaries that need to be installed.
94 /// This function does nothing when debugging on the host system.
95 /// When connected to remote platforms, the target's main executable
96 /// and any modules that have their remote install path set will be
97 /// installed on the remote platform. If the main executable doesn't
98 /// have an install location set, it will be installed in the remote
99 /// platform's working directory.
102 /// An error describing anything that went wrong during
104 //------------------------------------------------------------------
107 //------------------------------------------------------------------
108 /// Launch a new process.
110 /// Launch a new process by spawning a new process using the
111 /// target object's executable module's file as the file to launch.
112 /// Arguments are given in \a argv, and the environment variables
113 /// are in \a envp. Standard input and output files can be
114 /// optionally re-directed to \a stdin_path, \a stdout_path, and
117 /// @param[in] listener
118 /// An optional listener that will receive all process events.
119 /// If \a listener is valid then \a listener will listen to all
120 /// process events. If not valid, then this target's debugger
121 /// (SBTarget::GetDebugger()) will listen to all process events.
124 /// The argument array.
127 /// The environment array.
129 /// @param[in] stdin_path
130 /// The path to use when re-directing the STDIN of the new
131 /// process. If all stdXX_path arguments are nullptr, a pseudo
132 /// terminal will be used.
134 /// @param[in] stdout_path
135 /// The path to use when re-directing the STDOUT of the new
136 /// process. If all stdXX_path arguments are nullptr, a pseudo
137 /// terminal will be used.
139 /// @param[in] stderr_path
140 /// The path to use when re-directing the STDERR of the new
141 /// process. If all stdXX_path arguments are nullptr, a pseudo
142 /// terminal will be used.
144 /// @param[in] working_directory
145 /// The working directory to have the child process run in
147 /// @param[in] launch_flags
148 /// Some launch options specified by logical OR'ing
149 /// lldb::LaunchFlags enumeration values together.
151 /// @param[in] stop_at_entry
152 /// If false do not stop the inferior at the entry point.
154 /// @param[out] error
155 /// An error object. Contains the reason if there is some failure.
158 /// A process object for the newly created process.
159 //------------------------------------------------------------------
160 lldb::SBProcess Launch(SBListener &listener, char const **argv,
161 char const **envp, const char *stdin_path,
162 const char *stdout_path, const char *stderr_path,
163 const char *working_directory,
164 uint32_t launch_flags, // See LaunchFlags
165 bool stop_at_entry, lldb::SBError &error);
167 SBProcess LoadCore(const char *core_file);
168 SBProcess LoadCore(const char *core_file, lldb::SBError &error);
170 //------------------------------------------------------------------
171 /// Launch a new process with sensible defaults.
174 /// The argument array.
177 /// The environment array.
179 /// @param[in] working_directory
180 /// The working directory to have the child process run in
182 /// Default: listener
183 /// Set to the target's debugger (SBTarget::GetDebugger())
185 /// Default: launch_flags
186 /// Empty launch flags
188 /// Default: stdin_path
189 /// Default: stdout_path
190 /// Default: stderr_path
191 /// A pseudo terminal will be used.
194 /// A process object for the newly created process.
195 //------------------------------------------------------------------
196 SBProcess LaunchSimple(const char **argv, const char **envp,
197 const char *working_directory);
199 SBProcess Launch(SBLaunchInfo &launch_info, SBError &error);
201 SBProcess Attach(SBAttachInfo &attach_info, SBError &error);
203 //------------------------------------------------------------------
204 /// Attach to process with pid.
206 /// @param[in] listener
207 /// An optional listener that will receive all process events.
208 /// If \a listener is valid then \a listener will listen to all
209 /// process events. If not valid, then this target's debugger
210 /// (SBTarget::GetDebugger()) will listen to all process events.
213 /// The process ID to attach to.
215 /// @param[out] error
216 /// An error explaining what went wrong if attach fails.
219 /// A process object for the attached process.
220 //------------------------------------------------------------------
221 lldb::SBProcess AttachToProcessWithID(SBListener &listener, lldb::pid_t pid,
222 lldb::SBError &error);
224 //------------------------------------------------------------------
225 /// Attach to process with name.
227 /// @param[in] listener
228 /// An optional listener that will receive all process events.
229 /// If \a listener is valid then \a listener will listen to all
230 /// process events. If not valid, then this target's debugger
231 /// (SBTarget::GetDebugger()) will listen to all process events.
234 /// Basename of process to attach to.
236 /// @param[in] wait_for
237 /// If true wait for a new instance of 'name' to be launched.
239 /// @param[out] error
240 /// An error explaining what went wrong if attach fails.
243 /// A process object for the attached process.
244 //------------------------------------------------------------------
245 lldb::SBProcess AttachToProcessWithName(SBListener &listener,
246 const char *name, bool wait_for,
247 lldb::SBError &error);
249 //------------------------------------------------------------------
250 /// Connect to a remote debug server with url.
252 /// @param[in] listener
253 /// An optional listener that will receive all process events.
254 /// If \a listener is valid then \a listener will listen to all
255 /// process events. If not valid, then this target's debugger
256 /// (SBTarget::GetDebugger()) will listen to all process events.
259 /// The url to connect to, e.g., 'connect://localhost:12345'.
261 /// @param[in] plugin_name
262 /// The plugin name to be used; can be nullptr.
264 /// @param[out] error
265 /// An error explaining what went wrong if the connect fails.
268 /// A process object for the connected process.
269 //------------------------------------------------------------------
270 lldb::SBProcess ConnectRemote(SBListener &listener, const char *url,
271 const char *plugin_name, SBError &error);
273 lldb::SBFileSpec GetExecutable();
275 bool AddModule(lldb::SBModule &module);
277 lldb::SBModule AddModule(const char *path, const char *triple,
280 lldb::SBModule AddModule(const char *path, const char *triple,
281 const char *uuid_cstr, const char *symfile);
283 lldb::SBModule AddModule(const SBModuleSpec &module_spec);
285 uint32_t GetNumModules() const;
287 lldb::SBModule GetModuleAtIndex(uint32_t idx);
289 bool RemoveModule(lldb::SBModule module);
291 lldb::SBDebugger GetDebugger() const;
293 lldb::SBModule FindModule(const lldb::SBFileSpec &file_spec);
295 //------------------------------------------------------------------
296 /// Find compile units related to *this target and passed source
299 /// @param[in] sb_file_spec
300 /// A lldb::SBFileSpec object that contains source file
304 /// A lldb::SBSymbolContextList that gets filled in with all of
305 /// the symbol contexts for all the matches.
306 //------------------------------------------------------------------
307 lldb::SBSymbolContextList
308 FindCompileUnits(const lldb::SBFileSpec &sb_file_spec);
310 lldb::ByteOrder GetByteOrder();
312 uint32_t GetAddressByteSize();
314 const char *GetTriple();
316 //------------------------------------------------------------------
317 /// Architecture data byte width accessor
320 /// The size in 8-bit (host) bytes of a minimum addressable
321 /// unit from the Architecture's data bus
322 //------------------------------------------------------------------
323 uint32_t GetDataByteSize();
325 //------------------------------------------------------------------
326 /// Architecture code byte width accessor
329 /// The size in 8-bit (host) bytes of a minimum addressable
330 /// unit from the Architecture's code bus
331 //------------------------------------------------------------------
332 uint32_t GetCodeByteSize();
334 //------------------------------------------------------------------
335 /// Set the base load address for a module section.
337 /// @param[in] section
338 /// The section whose base load address will be set within this
341 /// @param[in] section_base_addr
342 /// The base address for the section.
345 /// An error to indicate success, fail, and any reason for
347 //------------------------------------------------------------------
348 lldb::SBError SetSectionLoadAddress(lldb::SBSection section,
349 lldb::addr_t section_base_addr);
351 //------------------------------------------------------------------
352 /// Clear the base load address for a module section.
354 /// @param[in] section
355 /// The section whose base load address will be cleared within
359 /// An error to indicate success, fail, and any reason for
361 //------------------------------------------------------------------
362 lldb::SBError ClearSectionLoadAddress(lldb::SBSection section);
364 //------------------------------------------------------------------
365 /// Slide all file addresses for all module sections so that \a module
366 /// appears to loaded at these slide addresses.
368 /// When you need all sections within a module to be loaded at a
369 /// rigid slide from the addresses found in the module object file,
370 /// this function will allow you to easily and quickly slide all
373 /// @param[in] module
374 /// The module to load.
376 /// @param[in] sections_offset
377 /// An offset that will be applied to all section file addresses
378 /// (the virtual addresses found in the object file itself).
381 /// An error to indicate success, fail, and any reason for
383 //------------------------------------------------------------------
384 lldb::SBError SetModuleLoadAddress(lldb::SBModule module,
385 int64_t sections_offset);
387 //------------------------------------------------------------------
388 /// Clear the section base load addresses for all sections in a module.
390 /// @param[in] module
391 /// The module to unload.
394 /// An error to indicate success, fail, and any reason for
396 //------------------------------------------------------------------
397 lldb::SBError ClearModuleLoadAddress(lldb::SBModule module);
399 //------------------------------------------------------------------
400 /// Find functions by name.
403 /// The name of the function we are looking for.
405 /// @param[in] name_type_mask
406 /// A logical OR of one or more FunctionNameType enum bits that
407 /// indicate what kind of names should be used when doing the
408 /// lookup. Bits include fully qualified names, base names,
409 /// C++ methods, or ObjC selectors.
410 /// See FunctionNameType for more details.
413 /// A lldb::SBSymbolContextList that gets filled in with all of
414 /// the symbol contexts for all the matches.
415 //------------------------------------------------------------------
416 lldb::SBSymbolContextList
417 FindFunctions(const char *name,
418 uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
420 //------------------------------------------------------------------
421 /// Find global and static variables by name.
424 /// The name of the global or static variable we are looking
427 /// @param[in] max_matches
428 /// Allow the number of matches to be limited to \a max_matches.
431 /// A list of matched variables in an SBValueList.
432 //------------------------------------------------------------------
433 lldb::SBValueList FindGlobalVariables(const char *name, uint32_t max_matches);
435 //------------------------------------------------------------------
436 /// Find the first global (or static) variable by name.
439 /// The name of the global or static variable we are looking
443 /// An SBValue that gets filled in with the found variable (if any).
444 //------------------------------------------------------------------
445 lldb::SBValue FindFirstGlobalVariable(const char *name);
447 //------------------------------------------------------------------
448 /// Find global and static variables by pattern.
451 /// The pattern to search for global or static variables
453 /// @param[in] max_matches
454 /// Allow the number of matches to be limited to \a max_matches.
456 /// @param[in] matchtype
457 /// The match type to use.
460 /// A list of matched variables in an SBValueList.
461 //------------------------------------------------------------------
462 lldb::SBValueList FindGlobalVariables(const char *name, uint32_t max_matches,
463 MatchType matchtype);
465 //------------------------------------------------------------------
466 /// Find global functions by their name with pattern matching.
469 /// The pattern to search for global or static variables
471 /// @param[in] max_matches
472 /// Allow the number of matches to be limited to \a max_matches.
474 /// @param[in] matchtype
475 /// The match type to use.
478 /// A list of matched variables in an SBValueList.
479 //------------------------------------------------------------------
480 lldb::SBSymbolContextList FindGlobalFunctions(const char *name,
481 uint32_t max_matches,
482 MatchType matchtype);
486 //------------------------------------------------------------------
487 /// Resolve a current file address into a section offset address.
489 /// @param[in] file_addr
490 /// The file address to resolve.
493 /// An SBAddress which will be valid if...
494 //------------------------------------------------------------------
495 lldb::SBAddress ResolveFileAddress(lldb::addr_t file_addr);
497 //------------------------------------------------------------------
498 /// Resolve a current load address into a section offset address.
500 /// @param[in] vm_addr
501 /// A virtual address from the current process state that is to
502 /// be translated into a section offset address.
505 /// An SBAddress which will be valid if \a vm_addr was
506 /// successfully resolved into a section offset address, or an
507 /// invalid SBAddress if \a vm_addr doesn't resolve to a section
509 //------------------------------------------------------------------
510 lldb::SBAddress ResolveLoadAddress(lldb::addr_t vm_addr);
512 //------------------------------------------------------------------
513 /// Resolve a current load address into a section offset address
514 /// using the process stop ID to identify a time in the past.
516 /// @param[in] stop_id
517 /// Each time a process stops, the process stop ID integer gets
518 /// incremented. These stop IDs are used to identify past times
519 /// and can be used in history objects as a cheap way to store
520 /// the time at which the sample was taken. Specifying
521 /// UINT32_MAX will always resolve the address using the
522 /// currently loaded sections.
524 /// @param[in] vm_addr
525 /// A virtual address from the current process state that is to
526 /// be translated into a section offset address.
529 /// An SBAddress which will be valid if \a vm_addr was
530 /// successfully resolved into a section offset address, or an
531 /// invalid SBAddress if \a vm_addr doesn't resolve to a section
533 //------------------------------------------------------------------
534 lldb::SBAddress ResolvePastLoadAddress(uint32_t stop_id,
535 lldb::addr_t vm_addr);
537 SBSymbolContext ResolveSymbolContextForAddress(const SBAddress &addr,
538 uint32_t resolve_scope);
540 //------------------------------------------------------------------
541 /// Read target memory. If a target process is running then memory
542 /// is read from here. Otherwise the memory is read from the object
543 /// files. For a target whose bytes are sized as a multiple of host
544 /// bytes, the data read back will preserve the target's byte order.
547 /// A target address to read from.
550 /// The buffer to read memory into.
553 /// The maximum number of host bytes to read in the buffer passed
556 /// @param[out] error
557 /// Status information is written here if the memory read fails.
560 /// The amount of data read in host bytes.
561 //------------------------------------------------------------------
562 size_t ReadMemory(const SBAddress addr, void *buf, size_t size,
563 lldb::SBError &error);
565 lldb::SBBreakpoint BreakpointCreateByLocation(const char *file,
569 BreakpointCreateByLocation(const lldb::SBFileSpec &file_spec, uint32_t line);
572 BreakpointCreateByLocation(const lldb::SBFileSpec &file_spec, uint32_t line,
573 lldb::addr_t offset);
576 BreakpointCreateByLocation(const lldb::SBFileSpec &file_spec, uint32_t line,
577 lldb::addr_t offset, SBFileSpecList &module_list);
579 lldb::SBBreakpoint BreakpointCreateByName(const char *symbol_name,
580 const char *module_name = nullptr);
582 // This version uses name_type_mask = eFunctionNameTypeAuto
584 BreakpointCreateByName(const char *symbol_name,
585 const SBFileSpecList &module_list,
586 const SBFileSpecList &comp_unit_list);
588 lldb::SBBreakpoint BreakpointCreateByName(
589 const char *symbol_name,
591 name_type_mask, // Logical OR one or more FunctionNameType enum bits
592 const SBFileSpecList &module_list,
593 const SBFileSpecList &comp_unit_list);
595 lldb::SBBreakpoint BreakpointCreateByName(
596 const char *symbol_name,
598 name_type_mask, // Logical OR one or more FunctionNameType enum bits
599 lldb::LanguageType symbol_language,
600 const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list);
602 lldb::SBBreakpoint BreakpointCreateByNames(
603 const char *symbol_name[], uint32_t num_names,
605 name_type_mask, // Logical OR one or more FunctionNameType enum bits
606 const SBFileSpecList &module_list,
607 const SBFileSpecList &comp_unit_list);
609 lldb::SBBreakpoint BreakpointCreateByNames(
610 const char *symbol_name[], uint32_t num_names,
612 name_type_mask, // Logical OR one or more FunctionNameType enum bits
613 lldb::LanguageType symbol_language,
614 const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list);
616 lldb::SBBreakpoint BreakpointCreateByNames(
617 const char *symbol_name[], uint32_t num_names,
619 name_type_mask, // Logical OR one or more FunctionNameType enum bits
620 lldb::LanguageType symbol_language,
621 lldb::addr_t offset, const SBFileSpecList &module_list,
622 const SBFileSpecList &comp_unit_list);
624 lldb::SBBreakpoint BreakpointCreateByRegex(const char *symbol_name_regex,
625 const char *module_name = nullptr);
628 BreakpointCreateByRegex(const char *symbol_name_regex,
629 const SBFileSpecList &module_list,
630 const SBFileSpecList &comp_unit_list);
632 lldb::SBBreakpoint BreakpointCreateByRegex(
633 const char *symbol_name_regex, lldb::LanguageType symbol_language,
634 const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list);
637 BreakpointCreateBySourceRegex(const char *source_regex,
638 const SBFileSpec &source_file,
639 const char *module_name = nullptr);
642 BreakpointCreateBySourceRegex(const char *source_regex,
643 const SBFileSpecList &module_list,
644 const SBFileSpecList &source_file);
646 lldb::SBBreakpoint BreakpointCreateBySourceRegex(
647 const char *source_regex, const SBFileSpecList &module_list,
648 const SBFileSpecList &source_file, const SBStringList &func_names);
650 lldb::SBBreakpoint BreakpointCreateForException(lldb::LanguageType language,
651 bool catch_bp, bool throw_bp);
653 lldb::SBBreakpoint BreakpointCreateByAddress(addr_t address);
655 lldb::SBBreakpoint BreakpointCreateBySBAddress(SBAddress &address);
657 //------------------------------------------------------------------
658 /// Read breakpoints from source_file and return the newly created
659 /// breakpoints in bkpt_list.
661 /// @param[in] source_file
662 /// The file from which to read the breakpoints.
664 /// @param[out] new_bps
665 /// A list of the newly created breakpoints.
668 /// An SBError detailing any errors in reading in the breakpoints.
669 //------------------------------------------------------------------
670 lldb::SBError BreakpointsCreateFromFile(SBFileSpec &source_file,
671 SBBreakpointList &new_bps);
673 //------------------------------------------------------------------
674 /// Read breakpoints from source_file and return the newly created
675 /// breakpoints in bkpt_list.
677 /// @param[in] source_file
678 /// The file from which to read the breakpoints.
680 /// @param[in] matching_names
681 /// Only read in breakpoints whose names match one of the names in this
684 /// @param[out] new_bps
685 /// A list of the newly created breakpoints.
688 /// An SBError detailing any errors in reading in the breakpoints.
689 //------------------------------------------------------------------
690 lldb::SBError BreakpointsCreateFromFile(SBFileSpec &source_file,
691 SBStringList &matching_names,
692 SBBreakpointList &new_bps);
694 //------------------------------------------------------------------
695 /// Write breakpoints to dest_file.
697 /// @param[in] dest_file
698 /// The file to which to write the breakpoints.
701 /// An SBError detailing any errors in writing in the breakpoints.
702 //------------------------------------------------------------------
703 lldb::SBError BreakpointsWriteToFile(SBFileSpec &dest_file);
705 //------------------------------------------------------------------
706 /// Write breakpoints listed in bkpt_list to dest_file.
708 /// @param[in] dest_file
709 /// The file to which to write the breakpoints.
711 /// @param[in] bkpt_list
712 /// Only write breakpoints from this list.
714 /// @param[in] append
715 /// If \btrue, append the breakpoints in bkpt_list to the others
716 /// serialized in dest_file. If dest_file doesn't exist, then a new
717 /// file will be created and the breakpoints in bkpt_list written to it.
720 /// An SBError detailing any errors in writing in the breakpoints.
721 //------------------------------------------------------------------
722 lldb::SBError BreakpointsWriteToFile(SBFileSpec &dest_file,
723 SBBreakpointList &bkpt_list,
724 bool append = false);
726 uint32_t GetNumBreakpoints() const;
728 lldb::SBBreakpoint GetBreakpointAtIndex(uint32_t idx) const;
730 bool BreakpointDelete(break_id_t break_id);
732 lldb::SBBreakpoint FindBreakpointByID(break_id_t break_id);
734 // Finds all breakpoints by name, returning the list in bkpt_list. Returns
735 // false if the name is not a valid breakpoint name, true otherwise.
736 bool FindBreakpointsByName(const char *name, SBBreakpointList &bkpt_list);
738 void GetBreakpointNames(SBStringList &names);
740 void DeleteBreakpointName(const char *name);
742 bool EnableAllBreakpoints();
744 bool DisableAllBreakpoints();
746 bool DeleteAllBreakpoints();
748 uint32_t GetNumWatchpoints() const;
750 lldb::SBWatchpoint GetWatchpointAtIndex(uint32_t idx) const;
752 bool DeleteWatchpoint(lldb::watch_id_t watch_id);
754 lldb::SBWatchpoint FindWatchpointByID(lldb::watch_id_t watch_id);
756 lldb::SBWatchpoint WatchAddress(lldb::addr_t addr, size_t size, bool read,
757 bool write, SBError &error);
759 bool EnableAllWatchpoints();
761 bool DisableAllWatchpoints();
763 bool DeleteAllWatchpoints();
765 lldb::SBBroadcaster GetBroadcaster() const;
767 lldb::SBType FindFirstType(const char *type);
769 lldb::SBTypeList FindTypes(const char *type);
771 lldb::SBType GetBasicType(lldb::BasicType type);
773 lldb::SBValue CreateValueFromAddress(const char *name, lldb::SBAddress addr,
776 lldb::SBValue CreateValueFromData(const char *name, lldb::SBData data,
779 lldb::SBValue CreateValueFromExpression(const char *name, const char *expr);
781 SBSourceManager GetSourceManager();
783 lldb::SBInstructionList ReadInstructions(lldb::SBAddress base_addr,
786 lldb::SBInstructionList ReadInstructions(lldb::SBAddress base_addr,
788 const char *flavor_string);
790 lldb::SBInstructionList GetInstructions(lldb::SBAddress base_addr,
791 const void *buf, size_t size);
793 // The "WithFlavor" is necessary to keep SWIG from getting confused about
794 // overloaded arguments when using the buf + size -> Python Object magic.
796 lldb::SBInstructionList GetInstructionsWithFlavor(lldb::SBAddress base_addr,
797 const char *flavor_string,
801 lldb::SBInstructionList GetInstructions(lldb::addr_t base_addr,
802 const void *buf, size_t size);
804 lldb::SBInstructionList GetInstructionsWithFlavor(lldb::addr_t base_addr,
805 const char *flavor_string,
809 lldb::SBSymbolContextList FindSymbols(const char *name,
810 lldb::SymbolType type = eSymbolTypeAny);
812 bool operator==(const lldb::SBTarget &rhs) const;
814 bool operator!=(const lldb::SBTarget &rhs) const;
816 bool GetDescription(lldb::SBStream &description,
817 lldb::DescriptionLevel description_level);
819 lldb::SBValue EvaluateExpression(const char *expr);
821 lldb::SBValue EvaluateExpression(const char *expr,
822 const SBExpressionOptions &options);
824 lldb::addr_t GetStackRedZoneSize();
826 lldb::SBLaunchInfo GetLaunchInfo() const;
828 void SetLaunchInfo(const lldb::SBLaunchInfo &launch_info);
831 friend class SBAddress;
832 friend class SBBlock;
833 friend class SBBreakpointList;
834 friend class SBBreakpointNameImpl;
835 friend class SBDebugger;
836 friend class SBExecutionContext;
837 friend class SBFunction;
838 friend class SBInstruction;
839 friend class SBModule;
840 friend class SBProcess;
841 friend class SBSection;
842 friend class SBSourceManager;
843 friend class SBSymbol;
844 friend class SBValue;
846 //------------------------------------------------------------------
847 // Constructors are private, use static Target::Create function to create an
848 // instance of this class.
849 //------------------------------------------------------------------
851 lldb::TargetSP GetSP() const;
853 void SetSP(const lldb::TargetSP &target_sp);
856 lldb::TargetSP m_opaque_sp;
861 #endif // LLDB_SBTarget_h_