]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBTarget.h
Update lldb to upstream trunk r242221.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / API / SBTarget.h
1 //===-- SBTarget.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 LLDB_SBTarget_h_
11 #define LLDB_SBTarget_h_
12
13 #include "lldb/API/SBDefines.h"
14 #include "lldb/API/SBAddress.h"
15 #include "lldb/API/SBAttachInfo.h"
16 #include "lldb/API/SBBroadcaster.h"
17 #include "lldb/API/SBFileSpec.h"
18 #include "lldb/API/SBFileSpecList.h"
19 #include "lldb/API/SBLaunchInfo.h"
20 #include "lldb/API/SBSymbolContextList.h"
21 #include "lldb/API/SBType.h"
22 #include "lldb/API/SBValue.h"
23 #include "lldb/API/SBWatchpoint.h"
24
25 namespace lldb {
26
27 class SBPlatform;
28
29 class LLDB_API SBTarget
30 {
31 public:
32     //------------------------------------------------------------------
33     // Broadcaster bits.
34     //------------------------------------------------------------------
35     enum
36     {
37         eBroadcastBitBreakpointChanged  = (1 << 0),
38         eBroadcastBitModulesLoaded      = (1 << 1),
39         eBroadcastBitModulesUnloaded    = (1 << 2),
40         eBroadcastBitWatchpointChanged  = (1 << 3),
41         eBroadcastBitSymbolsLoaded      = (1 << 4)
42     };
43
44     //------------------------------------------------------------------
45     // Constructors
46     //------------------------------------------------------------------
47     SBTarget ();
48
49     SBTarget (const lldb::SBTarget& rhs);
50
51     SBTarget (const lldb::TargetSP& target_sp);
52     
53     const lldb::SBTarget&
54     operator = (const lldb::SBTarget& rhs);
55
56     //------------------------------------------------------------------
57     // Destructor
58     //------------------------------------------------------------------
59     ~SBTarget();
60
61     bool
62     IsValid() const;
63
64     static bool
65     EventIsTargetEvent (const lldb::SBEvent &event);
66
67     static lldb::SBTarget
68     GetTargetFromEvent (const lldb::SBEvent &event);
69     
70     static uint32_t
71     GetNumModulesFromEvent (const lldb::SBEvent &event);
72
73     static lldb::SBModule
74     GetModuleAtIndexFromEvent (const uint32_t idx, const lldb::SBEvent &event);
75
76     static const char *
77     GetBroadcasterClassName ();
78
79     lldb::SBProcess
80     GetProcess ();
81
82     //------------------------------------------------------------------
83     /// Return the platform object associated with the target.
84     ///
85     /// After return, the platform object should be checked for
86     /// validity.
87     ///
88     /// @return
89     ///     A platform object.
90     //------------------------------------------------------------------
91     lldb::SBPlatform
92     GetPlatform ();
93
94     //------------------------------------------------------------------
95     /// Install any binaries that need to be installed.
96     ///
97     /// This function does nothing when debugging on the host system.
98     /// When connected to remote platforms, the target's main executable
99     /// and any modules that have their remote install path set will be
100     /// installed on the remote platform. If the main executable doesn't
101     /// have an install location set, it will be installed in the remote
102     /// platform's working directory.
103     ///
104     /// @return
105     ///     An error describing anything that went wrong during
106     ///     installation.
107     //------------------------------------------------------------------
108     SBError
109     Install();
110     
111     //------------------------------------------------------------------
112     /// Launch a new process.
113     ///
114     /// Launch a new process by spawning a new process using the
115     /// target object's executable module's file as the file to launch.
116     /// Arguments are given in \a argv, and the environment variables
117     /// are in \a envp. Standard input and output files can be
118     /// optionally re-directed to \a stdin_path, \a stdout_path, and
119     /// \a stderr_path.
120     ///
121     /// @param[in] listener
122     ///     An optional listener that will receive all process events.
123     ///     If \a listener is valid then \a listener will listen to all
124     ///     process events. If not valid, then this target's debugger
125     ///     (SBTarget::GetDebugger()) will listen to all process events. 
126     ///
127     /// @param[in] argv
128     ///     The argument array.
129     ///
130     /// @param[in] envp
131     ///     The environment array.
132     ///
133     /// @param[in] launch_flags
134     ///     Flags to modify the launch (@see lldb::LaunchFlags)
135     ///
136     /// @param[in] stdin_path
137     ///     The path to use when re-directing the STDIN of the new
138     ///     process. If all stdXX_path arguments are NULL, a pseudo
139     ///     terminal will be used.
140     ///
141     /// @param[in] stdout_path
142     ///     The path to use when re-directing the STDOUT of the new
143     ///     process. If all stdXX_path arguments are NULL, a pseudo
144     ///     terminal will be used.
145     ///
146     /// @param[in] stderr_path
147     ///     The path to use when re-directing the STDERR of the new
148     ///     process. If all stdXX_path arguments are NULL, a pseudo
149     ///     terminal will be used.
150     ///
151     /// @param[in] working_directory
152     ///     The working directory to have the child process run in
153     ///
154     /// @param[in] launch_flags
155     ///     Some launch options specified by logical OR'ing 
156     ///     lldb::LaunchFlags enumeration values together.
157     ///
158     /// @param[in] stop_at_entry
159     ///     If false do not stop the inferior at the entry point.
160     ///
161     /// @param[out] error
162     ///     An error object. Contains the reason if there is some failure.
163     ///
164     /// @return
165     ///      A process object for the newly created process.
166     //------------------------------------------------------------------
167     lldb::SBProcess
168     Launch (SBListener &listener, 
169             char const **argv,
170             char const **envp,
171             const char *stdin_path,
172             const char *stdout_path,
173             const char *stderr_path,
174             const char *working_directory,
175             uint32_t launch_flags,   // See LaunchFlags
176             bool stop_at_entry,
177             lldb::SBError& error);
178             
179     
180     //------------------------------------------------------------------
181     /// Launch a new process with sensible defaults.
182     ///
183     /// @param[in] argv
184     ///     The argument array.
185     ///
186     /// @param[in] envp
187     ///     The environment array.
188     ///
189     /// @param[in] working_directory
190     ///     The working directory to have the child process run in
191     ///
192     /// Default: listener
193     ///     Set to the target's debugger (SBTarget::GetDebugger())
194     ///
195     /// Default: launch_flags
196     ///     Empty launch flags
197     ///
198     /// Default: stdin_path
199     /// Default: stdout_path
200     /// Default: stderr_path
201     ///     A pseudo terminal will be used.
202     ///
203     /// @return
204     ///      A process object for the newly created process.
205     //------------------------------------------------------------------
206     SBProcess
207     LaunchSimple (const char **argv, 
208                   const char **envp,
209                   const char *working_directory);
210     
211     SBProcess
212     Launch (SBLaunchInfo &launch_info, SBError& error);
213     
214     SBProcess
215     LoadCore (const char *core_file);
216
217     SBProcess
218     Attach (SBAttachInfo &attach_info, SBError& error);
219
220     //------------------------------------------------------------------
221     /// Attach to process with pid.
222     ///
223     /// @param[in] listener
224     ///     An optional listener that will receive all process events.
225     ///     If \a listener is valid then \a listener will listen to all
226     ///     process events. If not valid, then this target's debugger
227     ///     (SBTarget::GetDebugger()) will listen to all process events.
228     ///
229     /// @param[in] pid
230     ///     The process ID to attach to.
231     ///
232     /// @param[out] error
233     ///     An error explaining what went wrong if attach fails.
234     ///
235     /// @return
236     ///      A process object for the attached process.
237     //------------------------------------------------------------------
238     lldb::SBProcess
239     AttachToProcessWithID (SBListener &listener,
240                            lldb::pid_t pid,
241                            lldb::SBError& error);
242
243 #if defined(__APPLE__)
244     // We need to keep this around for a build or two since Xcode links
245     // to the 32 bit version of this function. We will take it out soon.
246     lldb::SBProcess
247     AttachToProcessWithID (SBListener &listener,
248                            ::pid_t pid,           // 32 bit int process ID
249                            lldb::SBError& error); // DEPRECATED 
250 #endif
251     //------------------------------------------------------------------
252     /// Attach to process with name.
253     ///
254     /// @param[in] listener
255     ///     An optional listener that will receive all process events.
256     ///     If \a listener is valid then \a listener will listen to all
257     ///     process events. If not valid, then this target's debugger
258     ///     (SBTarget::GetDebugger()) will listen to all process events.
259     ///
260     /// @param[in] name
261     ///     Basename of process to attach to.
262     ///
263     /// @param[in] wait_for
264     ///     If true wait for a new instance of 'name' to be launched.
265     ///
266     /// @param[out] error
267     ///     An error explaining what went wrong if attach fails.
268     ///
269     /// @return
270     ///      A process object for the attached process.
271     //------------------------------------------------------------------
272     lldb::SBProcess
273     AttachToProcessWithName (SBListener &listener,
274                              const char *name,
275                              bool wait_for,
276                              lldb::SBError& error);
277
278     //------------------------------------------------------------------
279     /// Connect to a remote debug server with url.
280     ///
281     /// @param[in] listener
282     ///     An optional listener that will receive all process events.
283     ///     If \a listener is valid then \a listener will listen to all
284     ///     process events. If not valid, then this target's debugger
285     ///     (SBTarget::GetDebugger()) will listen to all process events.
286     ///
287     /// @param[in] url
288     ///     The url to connect to, e.g., 'connect://localhost:12345'.
289     ///
290     /// @param[in] plugin_name
291     ///     The plugin name to be used; can be NULL.
292     ///
293     /// @param[out] error
294     ///     An error explaining what went wrong if the connect fails.
295     ///
296     /// @return
297     ///      A process object for the connected process.
298     //------------------------------------------------------------------
299     lldb::SBProcess
300     ConnectRemote (SBListener &listener,
301                    const char *url,
302                    const char *plugin_name,
303                    SBError& error);
304     
305     lldb::SBFileSpec
306     GetExecutable ();
307
308     bool
309     AddModule (lldb::SBModule &module);
310
311     lldb::SBModule
312     AddModule (const char *path,
313                const char *triple,
314                const char *uuid);
315
316     lldb::SBModule
317     AddModule (const char *path,
318                const char *triple,
319                const char *uuid_cstr,
320                const char *symfile);
321     
322     lldb::SBModule
323     AddModule (const SBModuleSpec &module_spec);
324
325     uint32_t
326     GetNumModules () const;
327
328     lldb::SBModule
329     GetModuleAtIndex (uint32_t idx);
330
331     bool
332     RemoveModule (lldb::SBModule module);
333
334     lldb::SBDebugger
335     GetDebugger() const;
336
337     lldb::SBModule
338     FindModule (const lldb::SBFileSpec &file_spec);
339
340     lldb::ByteOrder
341     GetByteOrder ();
342
343     uint32_t
344     GetAddressByteSize();
345
346     const char *
347     GetTriple ();
348
349     //------------------------------------------------------------------
350     /// Architecture data byte width accessor
351     ///
352     /// @return
353     /// The size in 8-bit (host) bytes of a minimum addressable
354     /// unit from the Architecture's data bus
355     //------------------------------------------------------------------
356     uint32_t
357     GetDataByteSize ();
358
359     //------------------------------------------------------------------
360     /// Architecture code byte width accessor
361     ///
362     /// @return
363     /// The size in 8-bit (host) bytes of a minimum addressable
364     /// unit from the Architecture's code bus
365     //------------------------------------------------------------------
366     uint32_t
367     GetCodeByteSize ();
368
369     //------------------------------------------------------------------
370     /// Set the base load address for a module section.
371     ///
372     /// @param[in] section
373     ///     The section whose base load address will be set within this
374     ///     target.
375     ///
376     /// @param[in] section_base_addr
377     ///     The base address for the section.
378     ///
379     /// @return
380     ///      An error to indicate success, fail, and any reason for 
381     ///     failure.
382     //------------------------------------------------------------------
383     lldb::SBError
384     SetSectionLoadAddress (lldb::SBSection section,
385                            lldb::addr_t section_base_addr);
386     
387     //------------------------------------------------------------------
388     /// Clear the base load address for a module section.
389     ///
390     /// @param[in] section
391     ///     The section whose base load address will be cleared within
392     ///     this target.
393     ///
394     /// @return
395     ///      An error to indicate success, fail, and any reason for 
396     ///     failure.
397     //------------------------------------------------------------------
398     lldb::SBError
399     ClearSectionLoadAddress (lldb::SBSection section);
400     
401     //------------------------------------------------------------------
402     /// Slide all file addresses for all module sections so that \a module
403     /// appears to loaded at these slide addresses.
404     /// 
405     /// When you need all sections within a module to be loaded at a 
406     /// rigid slide from the addresses found in the module object file,
407     /// this function will allow you to easily and quickly slide all
408     /// module sections.
409     ///
410     /// @param[in] module
411     ///     The module to load.
412     ///
413     /// @param[in] sections_offset
414     ///     An offset that will be applied to all section file addresses
415     ///     (the virtual addresses found in the object file itself).
416     ///
417     /// @return
418     ///     An error to indicate success, fail, and any reason for 
419     ///     failure.
420     //------------------------------------------------------------------
421     lldb::SBError
422     SetModuleLoadAddress (lldb::SBModule module,
423                           int64_t sections_offset);
424     
425
426     //------------------------------------------------------------------
427     /// Clear the section base load addresses for all sections in a module.
428     /// 
429     /// @param[in] module
430     ///     The module to unload.
431     ///
432     /// @return
433     ///     An error to indicate success, fail, and any reason for 
434     ///     failure.
435     //------------------------------------------------------------------
436     lldb::SBError
437     ClearModuleLoadAddress (lldb::SBModule module);
438
439     //------------------------------------------------------------------
440     /// Find functions by name.
441     ///
442     /// @param[in] name
443     ///     The name of the function we are looking for.
444     ///
445     /// @param[in] name_type_mask
446     ///     A logical OR of one or more FunctionNameType enum bits that
447     ///     indicate what kind of names should be used when doing the
448     ///     lookup. Bits include fully qualified names, base names,
449     ///     C++ methods, or ObjC selectors. 
450     ///     See FunctionNameType for more details.
451     ///
452     /// @return
453     ///     A lldb::SBSymbolContextList that gets filled in with all of 
454     ///     the symbol contexts for all the matches.
455     //------------------------------------------------------------------
456     lldb::SBSymbolContextList
457     FindFunctions (const char *name, 
458                    uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
459
460     //------------------------------------------------------------------
461     /// Find global and static variables by name.
462     ///
463     /// @param[in] name
464     ///     The name of the global or static variable we are looking
465     ///     for.
466     ///
467     /// @param[in] max_matches
468     ///     Allow the number of matches to be limited to \a max_matches.
469     ///
470     /// @return
471     ///     A list of matched variables in an SBValueList.
472     //------------------------------------------------------------------
473     lldb::SBValueList
474     FindGlobalVariables (const char *name, 
475                          uint32_t max_matches);
476
477     //------------------------------------------------------------------
478     /// Find the first global (or static) variable by name.
479     ///
480     /// @param[in] name
481     ///     The name of the global or static variable we are looking
482     ///     for.
483     ///
484     /// @return
485     ///     An SBValue that gets filled in with the found variable (if any).
486     //------------------------------------------------------------------
487     lldb::SBValue
488     FindFirstGlobalVariable (const char* name);
489
490     //------------------------------------------------------------------
491     /// Find global and static variables by pattern.
492     ///
493     /// @param[in] name
494     ///     The pattern to search for global or static variables
495     ///
496     /// @param[in] max_matches
497     ///     Allow the number of matches to be limited to \a max_matches.
498     /// 
499     /// @param[in] matchtype
500     ///     The match type to use.    
501     ///
502     /// @return
503     ///     A list of matched variables in an SBValueList.
504     //------------------------------------------------------------------
505     lldb::SBValueList
506         FindGlobalVariables(const char *name,
507                             uint32_t max_matches,
508                             MatchType matchtype);
509     
510     //------------------------------------------------------------------
511     /// Find global functions by their name with pattern matching.
512     ///
513     /// @param[in] name
514     ///     The pattern to search for global or static variables
515     ///
516     /// @param[in] max_matches
517     ///     Allow the number of matches to be limited to \a max_matches.
518     /// 
519     /// @param[in] matchtype
520     ///     The match type to use.    
521     ///
522     /// @return
523     ///     A list of matched variables in an SBValueList.
524     //------------------------------------------------------------------
525     lldb::SBSymbolContextList
526         FindGlobalFunctions(const char *name,
527                            uint32_t max_matches,
528                            MatchType matchtype);
529
530     void
531     Clear ();
532
533     //------------------------------------------------------------------
534     /// Resolve a current file address into a section offset address.
535     ///
536     /// @param[in] file_addr
537     ///
538     /// @return
539     ///     An SBAddress which will be valid if...
540     //------------------------------------------------------------------
541     lldb::SBAddress
542     ResolveFileAddress (lldb::addr_t file_addr);
543
544     //------------------------------------------------------------------
545     /// Resolve a current load address into a section offset address.
546     ///
547     /// @param[in] vm_addr
548     ///     A virtual address from the current process state that is to
549     ///     be translated into a section offset address.
550     ///
551     /// @return
552     ///     An SBAddress which will be valid if \a vm_addr was
553     ///     successfully resolved into a section offset address, or an
554     ///     invalid SBAddress if \a vm_addr doesn't resolve to a section
555     ///     in a module.
556     //------------------------------------------------------------------
557     lldb::SBAddress
558     ResolveLoadAddress (lldb::addr_t vm_addr);
559
560     //------------------------------------------------------------------
561     /// Resolve a current load address into a section offset address
562     /// using the process stop ID to identify a time in the past.
563     ///
564     /// @param[in] stop_id
565     ///     Each time a process stops, the process stop ID integer gets
566     ///     incremented. These stop IDs are used to identify past times
567     ///     and can be used in history objects as a cheap way to store
568     ///     the time at which the sample was taken. Specifying
569     ///     UINT32_MAX will always resolve the address using the
570     ///     currently loaded sections.
571     ///
572     /// @param[in] vm_addr
573     ///     A virtual address from the current process state that is to
574     ///     be translated into a section offset address.
575     ///
576     /// @return
577     ///     An SBAddress which will be valid if \a vm_addr was
578     ///     successfully resolved into a section offset address, or an
579     ///     invalid SBAddress if \a vm_addr doesn't resolve to a section
580     ///     in a module.
581     //------------------------------------------------------------------
582     lldb::SBAddress
583     ResolvePastLoadAddress (uint32_t stop_id, lldb::addr_t vm_addr);
584
585     SBSymbolContext
586     ResolveSymbolContextForAddress (const SBAddress& addr, 
587                                     uint32_t resolve_scope);
588
589     //------------------------------------------------------------------
590     /// Read target memory. If a target process is running then memory  
591     /// is read from here. Otherwise the memory is read from the object
592     /// files. For a target whose bytes are sized as a multiple of host
593     /// bytes, the data read back will preserve the target's byte order.
594     ///
595     /// @param[in] addr
596     ///     A target address to read from. 
597     ///
598     /// @param[out] buf
599     ///     The buffer to read memory into. 
600     ///
601     /// @param[in] size
602     ///     The maximum number of host bytes to read in the buffer passed
603     ///     into this call
604     ///
605     /// @param[out] error
606     ///     Error information is written here if the memory read fails.
607     ///
608     /// @return
609     ///     The amount of data read in host bytes.
610     //------------------------------------------------------------------
611     size_t
612     ReadMemory (const SBAddress addr, void *buf, size_t size, lldb::SBError &error);
613
614     lldb::SBBreakpoint
615     BreakpointCreateByLocation (const char *file, uint32_t line);
616
617     lldb::SBBreakpoint
618     BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line);
619
620     lldb::SBBreakpoint
621     BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL);
622
623     // This version uses name_type_mask = eFunctionNameTypeAuto
624     lldb::SBBreakpoint
625     BreakpointCreateByName (const char *symbol_name, 
626                             const SBFileSpecList &module_list, 
627                             const SBFileSpecList &comp_unit_list);
628
629     lldb::SBBreakpoint
630     BreakpointCreateByName (const char *symbol_name,
631                             uint32_t name_type_mask,           // Logical OR one or more FunctionNameType enum bits
632                             const SBFileSpecList &module_list, 
633                             const SBFileSpecList &comp_unit_list);
634
635     lldb::SBBreakpoint
636     BreakpointCreateByNames (const char *symbol_name[],
637                              uint32_t num_names,
638                              uint32_t name_type_mask,           // Logical OR one or more FunctionNameType enum bits
639                              const SBFileSpecList &module_list,
640                              const SBFileSpecList &comp_unit_list);
641
642     lldb::SBBreakpoint
643     BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = NULL);
644     
645     lldb::SBBreakpoint
646     BreakpointCreateByRegex (const char *symbol_name_regex, 
647                              const SBFileSpecList &module_list, 
648                              const SBFileSpecList &comp_unit_list);
649     
650     lldb::SBBreakpoint
651     BreakpointCreateBySourceRegex (const char *source_regex, 
652                                    const SBFileSpec &source_file,
653                                    const char *module_name = NULL);
654
655     lldb::SBBreakpoint
656     BreakpointCreateBySourceRegex (const char *source_regex,
657                                    const SBFileSpecList &module_list,
658                                    const SBFileSpecList &source_file);
659     
660     lldb::SBBreakpoint
661     BreakpointCreateForException  (lldb::LanguageType language,
662                                    bool catch_bp,
663                                    bool throw_bp);
664
665     lldb::SBBreakpoint
666     BreakpointCreateByAddress (addr_t address);
667
668     uint32_t
669     GetNumBreakpoints () const;
670
671     lldb::SBBreakpoint
672     GetBreakpointAtIndex (uint32_t idx) const;
673
674     bool
675     BreakpointDelete (break_id_t break_id);
676
677     lldb::SBBreakpoint
678     FindBreakpointByID (break_id_t break_id);
679
680     bool
681     EnableAllBreakpoints ();
682
683     bool
684     DisableAllBreakpoints ();
685
686     bool
687     DeleteAllBreakpoints ();
688
689     uint32_t
690     GetNumWatchpoints () const;
691
692     lldb::SBWatchpoint
693     GetWatchpointAtIndex (uint32_t idx) const;
694
695     bool
696     DeleteWatchpoint (lldb::watch_id_t watch_id);
697
698     lldb::SBWatchpoint
699     FindWatchpointByID (lldb::watch_id_t watch_id);
700
701     lldb::SBWatchpoint
702     WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write, SBError& error);
703
704     bool
705     EnableAllWatchpoints ();
706
707     bool
708     DisableAllWatchpoints ();
709
710     bool
711     DeleteAllWatchpoints ();
712
713     lldb::SBBroadcaster
714     GetBroadcaster () const;
715     
716     lldb::SBType
717     FindFirstType (const char* type);
718     
719     lldb::SBTypeList
720     FindTypes (const char* type);
721     
722     lldb::SBType
723     GetBasicType(lldb::BasicType type);
724     
725     lldb::SBValue
726     CreateValueFromAddress (const char *name, lldb::SBAddress addr, lldb::SBType type);
727
728     lldb::SBValue
729     CreateValueFromData (const char *name, lldb::SBData data, lldb::SBType type);
730
731     lldb::SBValue
732     CreateValueFromExpression (const char *name, const char* expr);
733     
734     SBSourceManager
735     GetSourceManager();
736     
737     lldb::SBInstructionList
738     ReadInstructions (lldb::SBAddress base_addr, uint32_t count);
739
740     lldb::SBInstructionList
741     ReadInstructions (lldb::SBAddress base_addr, uint32_t count, const char *flavor_string);
742
743     lldb::SBInstructionList
744     GetInstructions (lldb::SBAddress base_addr, const void *buf, size_t size);
745     
746     // The "WithFlavor" is necessary to keep SWIG from getting confused about overloaded arguments when
747     // using the buf + size -> Python Object magic.
748     
749     lldb::SBInstructionList
750     GetInstructionsWithFlavor (lldb::SBAddress base_addr,  const char *flavor_string, const void *buf, size_t size);
751     
752     lldb::SBInstructionList
753     GetInstructions (lldb::addr_t base_addr, const void *buf, size_t size);
754
755     lldb::SBInstructionList
756     GetInstructionsWithFlavor (lldb::addr_t base_addr, const char *flavor_string, const void *buf, size_t size);
757
758     lldb::SBSymbolContextList
759     FindSymbols (const char *name,
760                  lldb::SymbolType type = eSymbolTypeAny);
761
762     bool
763     operator == (const lldb::SBTarget &rhs) const;
764
765     bool
766     operator != (const lldb::SBTarget &rhs) const;
767
768     bool
769     GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level);
770
771     lldb::SBValue
772     EvaluateExpression (const char *expr);
773
774     lldb::SBValue
775     EvaluateExpression (const char *expr, const SBExpressionOptions &options);
776
777     lldb::addr_t
778     GetStackRedZoneSize();
779
780     lldb::SBLaunchInfo
781     GetLaunchInfo () const;
782
783     void
784     SetLaunchInfo (const lldb::SBLaunchInfo &launch_info);
785     
786 protected:
787     friend class SBAddress;
788     friend class SBBlock;
789     friend class SBDebugger;
790     friend class SBExecutionContext;
791     friend class SBFunction;
792     friend class SBInstruction;
793     friend class SBModule;
794     friend class SBProcess;
795     friend class SBSection;
796     friend class SBSourceManager;
797     friend class SBSymbol;
798     friend class SBValue;
799
800     //------------------------------------------------------------------
801     // Constructors are private, use static Target::Create function to
802     // create an instance of this class.
803     //------------------------------------------------------------------
804
805     lldb::TargetSP
806     GetSP () const;
807
808     void
809     SetSP (const lldb::TargetSP& target_sp);
810
811
812 private:
813     //------------------------------------------------------------------
814     // For Target only
815     //------------------------------------------------------------------
816
817     lldb::TargetSP m_opaque_sp;
818 };
819
820 } // namespace lldb
821
822 #endif  // LLDB_SBTarget_h_