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