1359575Sdim//===-- SWIG Interface for SBTarget -----------------------------*- C++ -*-===//
2359575Sdim//
3359575Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4359575Sdim// See https://llvm.org/LICENSE.txt for license information.
5359575Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6359575Sdim//
7359575Sdim//===----------------------------------------------------------------------===//
8359575Sdim
9359575Sdimnamespace lldb {
10359575Sdim
11359575Sdim%feature("docstring",
12359575Sdim"Represents the target program running under the debugger.
13359575Sdim
14359575SdimSBTarget supports module, breakpoint, and watchpoint iterations. For example,
15359575Sdim
16359575Sdim    for m in target.module_iter():
17359575Sdim        print m
18359575Sdim
19359575Sdimproduces:
20359575Sdim
21359575Sdim(x86_64) /Volumes/data/lldb/svn/trunk/test/python_api/lldbutil/iter/a.out
22359575Sdim(x86_64) /usr/lib/dyld
23359575Sdim(x86_64) /usr/lib/libstdc++.6.dylib
24359575Sdim(x86_64) /usr/lib/libSystem.B.dylib
25359575Sdim(x86_64) /usr/lib/system/libmathCommon.A.dylib
26359575Sdim(x86_64) /usr/lib/libSystem.B.dylib(__commpage)
27359575Sdim
28359575Sdimand,
29359575Sdim
30359575Sdim    for b in target.breakpoint_iter():
31359575Sdim        print b
32359575Sdim
33359575Sdimproduces:
34359575Sdim
35359575SdimSBBreakpoint: id = 1, file ='main.cpp', line = 66, locations = 1
36359575SdimSBBreakpoint: id = 2, file ='main.cpp', line = 85, locations = 1
37359575Sdim
38359575Sdimand,
39359575Sdim
40359575Sdim    for wp_loc in target.watchpoint_iter():
41359575Sdim        print wp_loc
42359575Sdim
43359575Sdimproduces:
44359575Sdim
45359575SdimWatchpoint 1: addr = 0x1034ca048 size = 4 state = enabled type = rw
46359575Sdim    declare @ '/Volumes/data/lldb/svn/trunk/test/python_api/watchpoint/main.c:12'
47359575Sdim    hw_index = 0  hit_count = 2     ignore_count = 0"
48359575Sdim) SBTarget;
49359575Sdimclass SBTarget
50359575Sdim{
51359575Sdimpublic:
52359575Sdim    //------------------------------------------------------------------
53359575Sdim    // Broadcaster bits.
54359575Sdim    //------------------------------------------------------------------
55359575Sdim    enum
56359575Sdim    {
57359575Sdim        eBroadcastBitBreakpointChanged  = (1 << 0),
58359575Sdim        eBroadcastBitModulesLoaded      = (1 << 1),
59359575Sdim        eBroadcastBitModulesUnloaded    = (1 << 2),
60359575Sdim        eBroadcastBitWatchpointChanged  = (1 << 3),
61359575Sdim        eBroadcastBitSymbolsLoaded      = (1 << 4)
62359575Sdim    };
63359575Sdim
64359575Sdim    //------------------------------------------------------------------
65359575Sdim    // Constructors
66359575Sdim    //------------------------------------------------------------------
67359575Sdim    SBTarget ();
68359575Sdim
69359575Sdim    SBTarget (const lldb::SBTarget& rhs);
70359575Sdim
71359575Sdim    //------------------------------------------------------------------
72359575Sdim    // Destructor
73359575Sdim    //------------------------------------------------------------------
74359575Sdim    ~SBTarget();
75359575Sdim
76359575Sdim    static const char *
77359575Sdim    GetBroadcasterClassName ();
78359575Sdim
79359575Sdim    bool
80359575Sdim    IsValid() const;
81359575Sdim
82359575Sdim    explicit operator bool() const;
83359575Sdim
84359575Sdim    static bool
85359575Sdim    EventIsTargetEvent (const lldb::SBEvent &event);
86359575Sdim
87359575Sdim    static lldb::SBTarget
88359575Sdim    GetTargetFromEvent (const lldb::SBEvent &event);
89359575Sdim
90359575Sdim    static uint32_t
91359575Sdim    GetNumModulesFromEvent (const lldb::SBEvent &event);
92359575Sdim
93359575Sdim    static lldb::SBModule
94359575Sdim    GetModuleAtIndexFromEvent (const uint32_t idx, const lldb::SBEvent &event);
95359575Sdim
96359575Sdim    lldb::SBProcess
97359575Sdim    GetProcess ();
98359575Sdim
99359575Sdim
100359575Sdim    %feature("docstring", "
101359575Sdim    Return the platform object associated with the target.
102359575Sdim
103359575Sdim    After return, the platform object should be checked for
104359575Sdim    validity.
105359575Sdim
106359575Sdim    @return
107359575Sdim        A platform object.") GetPlatform;
108359575Sdim    lldb::SBPlatform
109359575Sdim    GetPlatform ();
110359575Sdim
111359575Sdim    %feature("docstring", "
112359575Sdim    Install any binaries that need to be installed.
113359575Sdim
114359575Sdim    This function does nothing when debugging on the host system.
115359575Sdim    When connected to remote platforms, the target's main executable
116359575Sdim    and any modules that have their install path set will be
117359575Sdim    installed on the remote platform. If the main executable doesn't
118359575Sdim    have an install location set, it will be installed in the remote
119359575Sdim    platform's working directory.
120359575Sdim
121359575Sdim    @return
122359575Sdim        An error describing anything that went wrong during
123359575Sdim        installation.") Install;
124359575Sdim    lldb::SBError
125359575Sdim    Install();
126359575Sdim
127359575Sdim    %feature("docstring", "
128359575Sdim    Launch a new process.
129359575Sdim
130359575Sdim    Launch a new process by spawning a new process using the
131359575Sdim    target object's executable module's file as the file to launch.
132359575Sdim    Arguments are given in argv, and the environment variables
133359575Sdim    are in envp. Standard input and output files can be
134359575Sdim    optionally re-directed to stdin_path, stdout_path, and
135359575Sdim    stderr_path.
136359575Sdim
137359575Sdim    @param[in] listener
138359575Sdim        An optional listener that will receive all process events.
139359575Sdim        If listener is valid then listener will listen to all
140359575Sdim        process events. If not valid, then this target's debugger
141359575Sdim        (SBTarget::GetDebugger()) will listen to all process events.
142359575Sdim
143359575Sdim    @param[in] argv
144359575Sdim        The argument array.
145359575Sdim
146359575Sdim    @param[in] envp
147359575Sdim        The environment array.
148359575Sdim
149359575Sdim    @param[in] launch_flags
150359575Sdim        Flags to modify the launch (@see lldb::LaunchFlags)
151359575Sdim
152359575Sdim    @param[in] stdin_path
153359575Sdim        The path to use when re-directing the STDIN of the new
154359575Sdim        process. If all stdXX_path arguments are NULL, a pseudo
155359575Sdim        terminal will be used.
156359575Sdim
157359575Sdim    @param[in] stdout_path
158359575Sdim        The path to use when re-directing the STDOUT of the new
159359575Sdim        process. If all stdXX_path arguments are NULL, a pseudo
160359575Sdim        terminal will be used.
161359575Sdim
162359575Sdim    @param[in] stderr_path
163359575Sdim        The path to use when re-directing the STDERR of the new
164359575Sdim        process. If all stdXX_path arguments are NULL, a pseudo
165359575Sdim        terminal will be used.
166359575Sdim
167359575Sdim    @param[in] working_directory
168359575Sdim        The working directory to have the child process run in
169359575Sdim
170359575Sdim    @param[in] launch_flags
171359575Sdim        Some launch options specified by logical OR'ing
172359575Sdim        lldb::LaunchFlags enumeration values together.
173359575Sdim
174359575Sdim    @param[in] stop_at_entry
175359575Sdim        If false do not stop the inferior at the entry point.
176359575Sdim
177359575Sdim    @param[out]
178359575Sdim        An error object. Contains the reason if there is some failure.
179359575Sdim
180359575Sdim    @return
181359575Sdim         A process object for the newly created process.
182359575Sdim
183359575Sdim    For example,
184359575Sdim
185359575Sdim        process = target.Launch(self.dbg.GetListener(), None, None,
186359575Sdim                                None, '/tmp/stdout.txt', None,
187359575Sdim                                None, 0, False, error)
188359575Sdim
189359575Sdim    launches a new process by passing nothing for both the args and the envs
190359575Sdim    and redirect the standard output of the inferior to the /tmp/stdout.txt
191359575Sdim    file. It does not specify a working directory so that the debug server
192359575Sdim    will use its idea of what the current working directory is for the
193359575Sdim    inferior. Also, we ask the debugger not to stop the inferior at the
194359575Sdim    entry point. If no breakpoint is specified for the inferior, it should
195359575Sdim    run to completion if no user interaction is required.") Launch;
196359575Sdim    lldb::SBProcess
197359575Sdim    Launch (SBListener &listener,
198359575Sdim            char const **argv,
199359575Sdim            char const **envp,
200359575Sdim            const char *stdin_path,
201359575Sdim            const char *stdout_path,
202359575Sdim            const char *stderr_path,
203359575Sdim            const char *working_directory,
204359575Sdim            uint32_t launch_flags,   // See LaunchFlags
205359575Sdim            bool stop_at_entry,
206359575Sdim            lldb::SBError& error);
207359575Sdim
208359575Sdim    %feature("docstring", "
209359575Sdim    Launch a new process with sensible defaults.
210359575Sdim
211359575Sdim    @param[in] argv
212359575Sdim        The argument array.
213359575Sdim
214359575Sdim    @param[in] envp
215359575Sdim        The environment array.
216359575Sdim
217359575Sdim    @param[in] working_directory
218359575Sdim        The working directory to have the child process run in
219359575Sdim
220359575Sdim    Default: listener
221359575Sdim        Set to the target's debugger (SBTarget::GetDebugger())
222359575Sdim
223359575Sdim    Default: launch_flags
224359575Sdim        Empty launch flags
225359575Sdim
226359575Sdim    Default: stdin_path
227359575Sdim    Default: stdout_path
228359575Sdim    Default: stderr_path
229359575Sdim        A pseudo terminal will be used.
230359575Sdim
231359575Sdim    @return
232359575Sdim         A process object for the newly created process.
233359575Sdim
234359575Sdim    For example,
235359575Sdim
236359575Sdim        process = target.LaunchSimple(['X', 'Y', 'Z'], None, os.getcwd())
237359575Sdim
238359575Sdim    launches a new process by passing 'X', 'Y', 'Z' as the args to the
239359575Sdim    executable.") LaunchSimple;
240359575Sdim    lldb::SBProcess
241359575Sdim    LaunchSimple (const char **argv,
242359575Sdim                  const char **envp,
243359575Sdim                  const char *working_directory);
244359575Sdim
245359575Sdim    lldb::SBProcess
246359575Sdim    Launch (lldb::SBLaunchInfo &launch_info, lldb::SBError& error);
247359575Sdim
248359575Sdim    %feature("docstring", "
249359575Sdim    Load a core file
250359575Sdim
251359575Sdim    @param[in] core_file
252359575Sdim        File path of the core dump.
253359575Sdim
254359575Sdim    @param[out] error
255359575Sdim        An error explaining what went wrong if the operation fails.
256359575Sdim        (Optional)
257359575Sdim
258359575Sdim    @return
259359575Sdim         A process object for the newly created core file.
260359575Sdim
261359575Sdim    For example,
262359575Sdim
263359575Sdim        process = target.LoadCore('./a.out.core')
264359575Sdim
265359575Sdim    loads a new core file and returns the process object.") LoadCore;
266359575Sdim    lldb::SBProcess
267359575Sdim    LoadCore(const char *core_file);
268359575Sdim
269359575Sdim    lldb::SBProcess
270359575Sdim    LoadCore(const char *core_file, lldb::SBError &error);
271359575Sdim
272359575Sdim    lldb::SBProcess
273359575Sdim    Attach(lldb::SBAttachInfo &attach_info, lldb::SBError& error);
274359575Sdim
275359575Sdim    %feature("docstring", "
276359575Sdim    Attach to process with pid.
277359575Sdim
278359575Sdim    @param[in] listener
279359575Sdim        An optional listener that will receive all process events.
280359575Sdim        If listener is valid then listener will listen to all
281359575Sdim        process events. If not valid, then this target's debugger
282359575Sdim        (SBTarget::GetDebugger()) will listen to all process events.
283359575Sdim
284359575Sdim    @param[in] pid
285359575Sdim        The process ID to attach to.
286359575Sdim
287359575Sdim    @param[out]
288359575Sdim        An error explaining what went wrong if attach fails.
289359575Sdim
290359575Sdim    @return
291359575Sdim         A process object for the attached process.") AttachToProcessWithID;
292359575Sdim    lldb::SBProcess
293359575Sdim    AttachToProcessWithID (SBListener &listener,
294359575Sdim                           lldb::pid_t pid,
295359575Sdim                           lldb::SBError& error);
296359575Sdim
297359575Sdim    %feature("docstring", "
298359575Sdim    Attach to process with name.
299359575Sdim
300359575Sdim    @param[in] listener
301359575Sdim        An optional listener that will receive all process events.
302359575Sdim        If listener is valid then listener will listen to all
303359575Sdim        process events. If not valid, then this target's debugger
304359575Sdim        (SBTarget::GetDebugger()) will listen to all process events.
305359575Sdim
306359575Sdim    @param[in] name
307359575Sdim        Basename of process to attach to.
308359575Sdim
309359575Sdim    @param[in] wait_for
310359575Sdim        If true wait for a new instance of 'name' to be launched.
311359575Sdim
312359575Sdim    @param[out]
313359575Sdim        An error explaining what went wrong if attach fails.
314359575Sdim
315359575Sdim    @return
316359575Sdim         A process object for the attached process.") AttachToProcessWithName;
317359575Sdim    lldb::SBProcess
318359575Sdim    AttachToProcessWithName (SBListener &listener,
319359575Sdim                             const char *name,
320359575Sdim                             bool wait_for,
321359575Sdim                             lldb::SBError& error);
322359575Sdim
323359575Sdim    %feature("docstring", "
324359575Sdim    Connect to a remote debug server with url.
325359575Sdim
326359575Sdim    @param[in] listener
327359575Sdim        An optional listener that will receive all process events.
328359575Sdim        If listener is valid then listener will listen to all
329359575Sdim        process events. If not valid, then this target's debugger
330359575Sdim        (SBTarget::GetDebugger()) will listen to all process events.
331359575Sdim
332359575Sdim    @param[in] url
333359575Sdim        The url to connect to, e.g., 'connect://localhost:12345'.
334359575Sdim
335359575Sdim    @param[in] plugin_name
336359575Sdim        The plugin name to be used; can be NULL.
337359575Sdim
338359575Sdim    @param[out]
339359575Sdim        An error explaining what went wrong if the connect fails.
340359575Sdim
341359575Sdim    @return
342359575Sdim         A process object for the connected process.") ConnectRemote;
343359575Sdim    lldb::SBProcess
344359575Sdim    ConnectRemote (SBListener &listener,
345359575Sdim                   const char *url,
346359575Sdim                   const char *plugin_name,
347359575Sdim                   SBError& error);
348359575Sdim
349359575Sdim    lldb::SBFileSpec
350359575Sdim    GetExecutable ();
351359575Sdim
352359575Sdim    %feature("docstring", "
353359575Sdim    Append the path mapping (from -> to) to the target's paths mapping list.") AppendImageSearchPath;
354359575Sdim    void
355359575Sdim    AppendImageSearchPath (const char *from,
356359575Sdim                           const char *to,
357359575Sdim                           SBError &error);
358359575Sdim
359359575Sdim    bool
360359575Sdim    AddModule (lldb::SBModule &module);
361359575Sdim
362359575Sdim    lldb::SBModule
363359575Sdim    AddModule (const char *path,
364359575Sdim               const char *triple,
365359575Sdim               const char *uuid);
366359575Sdim
367359575Sdim    lldb::SBModule
368359575Sdim    AddModule (const char *path,
369359575Sdim               const char *triple,
370359575Sdim               const char *uuid_cstr,
371359575Sdim               const char *symfile);
372359575Sdim
373359575Sdim    lldb::SBModule
374359575Sdim    AddModule (const SBModuleSpec &module_spec);
375359575Sdim
376359575Sdim    uint32_t
377359575Sdim    GetNumModules () const;
378359575Sdim
379359575Sdim    lldb::SBModule
380359575Sdim    GetModuleAtIndex (uint32_t idx);
381359575Sdim
382359575Sdim    bool
383359575Sdim    RemoveModule (lldb::SBModule module);
384359575Sdim
385359575Sdim    lldb::SBDebugger
386359575Sdim    GetDebugger() const;
387359575Sdim
388359575Sdim    lldb::SBModule
389359575Sdim    FindModule (const lldb::SBFileSpec &file_spec);
390359575Sdim
391359575Sdim    %feature("docstring", "
392359575Sdim    Find compile units related to *this target and passed source
393359575Sdim    file.
394359575Sdim
395359575Sdim    @param[in] sb_file_spec
396359575Sdim        A lldb::SBFileSpec object that contains source file
397359575Sdim        specification.
398359575Sdim
399359575Sdim    @return
400359575Sdim        A lldb::SBSymbolContextList that gets filled in with all of
401359575Sdim        the symbol contexts for all the matches.") FindCompileUnits;
402359575Sdim    lldb::SBSymbolContextList
403359575Sdim    FindCompileUnits (const lldb::SBFileSpec &sb_file_spec);
404359575Sdim
405359575Sdim    lldb::ByteOrder
406359575Sdim    GetByteOrder ();
407359575Sdim
408359575Sdim    uint32_t
409359575Sdim    GetAddressByteSize();
410359575Sdim
411359575Sdim    const char *
412359575Sdim    GetTriple ();
413359575Sdim
414359575Sdim    %feature("docstring", "
415359575Sdim    Architecture data byte width accessor
416359575Sdim
417359575Sdim    @return
418359575Sdim    The size in 8-bit (host) bytes of a minimum addressable
419359575Sdim    unit from the Architecture's data bus") GetDataByteSize;
420359575Sdim    uint32_t
421359575Sdim    GetDataByteSize ();
422359575Sdim
423359575Sdim    %feature("docstring", "
424359575Sdim    Architecture code byte width accessor
425359575Sdim
426359575Sdim    @return
427359575Sdim    The size in 8-bit (host) bytes of a minimum addressable
428359575Sdim    unit from the Architecture's code bus") GetCodeByteSize;
429359575Sdim    uint32_t
430359575Sdim    GetCodeByteSize ();
431359575Sdim
432359575Sdim    lldb::SBError
433359575Sdim    SetSectionLoadAddress (lldb::SBSection section,
434359575Sdim                           lldb::addr_t section_base_addr);
435359575Sdim
436359575Sdim    lldb::SBError
437359575Sdim    ClearSectionLoadAddress (lldb::SBSection section);
438359575Sdim
439359575Sdim    lldb::SBError
440359575Sdim    SetModuleLoadAddress (lldb::SBModule module,
441359575Sdim                          int64_t sections_offset);
442359575Sdim
443359575Sdim    lldb::SBError
444359575Sdim    ClearModuleLoadAddress (lldb::SBModule module);
445359575Sdim
446359575Sdim    %feature("docstring", "
447359575Sdim    Find functions by name.
448359575Sdim
449359575Sdim    @param[in] name
450359575Sdim        The name of the function we are looking for.
451359575Sdim
452359575Sdim    @param[in] name_type_mask
453359575Sdim        A logical OR of one or more FunctionNameType enum bits that
454359575Sdim        indicate what kind of names should be used when doing the
455359575Sdim        lookup. Bits include fully qualified names, base names,
456359575Sdim        C++ methods, or ObjC selectors.
457359575Sdim        See FunctionNameType for more details.
458359575Sdim
459359575Sdim    @return
460359575Sdim        A lldb::SBSymbolContextList that gets filled in with all of
461359575Sdim        the symbol contexts for all the matches.") FindFunctions;
462359575Sdim    lldb::SBSymbolContextList
463359575Sdim    FindFunctions (const char *name,
464359575Sdim                   uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
465359575Sdim
466359575Sdim    lldb::SBType
467359575Sdim    FindFirstType (const char* type);
468359575Sdim
469359575Sdim    lldb::SBTypeList
470359575Sdim    FindTypes (const char* type);
471359575Sdim
472359575Sdim    lldb::SBType
473359575Sdim    GetBasicType(lldb::BasicType type);
474359575Sdim
475359575Sdim    lldb::SBSourceManager
476359575Sdim    GetSourceManager ();
477359575Sdim
478359575Sdim    %feature("docstring", "
479359575Sdim    Find global and static variables by name.
480359575Sdim
481359575Sdim    @param[in] name
482359575Sdim        The name of the global or static variable we are looking
483359575Sdim        for.
484359575Sdim
485359575Sdim    @param[in] max_matches
486359575Sdim        Allow the number of matches to be limited to max_matches.
487359575Sdim
488359575Sdim    @return
489359575Sdim        A list of matched variables in an SBValueList.") FindGlobalVariables;
490359575Sdim    lldb::SBValueList
491359575Sdim    FindGlobalVariables (const char *name,
492359575Sdim                         uint32_t max_matches);
493359575Sdim
494359575Sdim     %feature("docstring", "
495359575Sdim    Find the first global (or static) variable by name.
496359575Sdim
497359575Sdim    @param[in] name
498359575Sdim        The name of the global or static variable we are looking
499359575Sdim        for.
500359575Sdim
501359575Sdim    @return
502359575Sdim        An SBValue that gets filled in with the found variable (if any).") FindFirstGlobalVariable;
503359575Sdim    lldb::SBValue
504359575Sdim    FindFirstGlobalVariable (const char* name);
505359575Sdim
506359575Sdim
507359575Sdim    lldb::SBValueList
508359575Sdim    FindGlobalVariables(const char *name,
509359575Sdim                        uint32_t max_matches,
510359575Sdim                        MatchType matchtype);
511359575Sdim
512359575Sdim    lldb::SBSymbolContextList
513359575Sdim    FindGlobalFunctions(const char *name,
514359575Sdim                        uint32_t max_matches,
515359575Sdim                        MatchType matchtype);
516359575Sdim
517359575Sdim    void
518359575Sdim    Clear ();
519359575Sdim
520359575Sdim     %feature("docstring", "
521359575Sdim    Resolve a current file address into a section offset address.
522359575Sdim
523359575Sdim    @param[in] file_addr
524359575Sdim
525359575Sdim    @return
526359575Sdim        An SBAddress which will be valid if...") ResolveFileAddress;
527359575Sdim    lldb::SBAddress
528359575Sdim    ResolveFileAddress (lldb::addr_t file_addr);
529359575Sdim
530359575Sdim    lldb::SBAddress
531359575Sdim    ResolveLoadAddress (lldb::addr_t vm_addr);
532359575Sdim
533359575Sdim    lldb::SBAddress
534359575Sdim    ResolvePastLoadAddress (uint32_t stop_id, lldb::addr_t vm_addr);
535359575Sdim
536359575Sdim    SBSymbolContext
537359575Sdim    ResolveSymbolContextForAddress (const SBAddress& addr,
538359575Sdim                                    uint32_t resolve_scope);
539359575Sdim
540359575Sdim     %feature("docstring", "
541359575Sdim    Read target memory. If a target process is running then memory
542359575Sdim    is read from here. Otherwise the memory is read from the object
543359575Sdim    files. For a target whose bytes are sized as a multiple of host
544359575Sdim    bytes, the data read back will preserve the target's byte order.
545359575Sdim
546359575Sdim    @param[in] addr
547359575Sdim        A target address to read from.
548359575Sdim
549359575Sdim    @param[out] buf
550359575Sdim        The buffer to read memory into.
551359575Sdim
552359575Sdim    @param[in] size
553359575Sdim        The maximum number of host bytes to read in the buffer passed
554359575Sdim        into this call
555359575Sdim
556359575Sdim    @param[out] error
557359575Sdim        Error information is written here if the memory read fails.
558359575Sdim
559359575Sdim    @return
560359575Sdim        The amount of data read in host bytes.") ReadMemory;
561359575Sdim    size_t
562359575Sdim    ReadMemory (const SBAddress addr, void *buf, size_t size, lldb::SBError &error);
563359575Sdim
564359575Sdim    lldb::SBBreakpoint
565359575Sdim    BreakpointCreateByLocation (const char *file, uint32_t line);
566359575Sdim
567359575Sdim    lldb::SBBreakpoint
568359575Sdim    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line);
569359575Sdim
570359575Sdim    lldb::SBBreakpoint
571359575Sdim    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line, lldb::addr_t offset);
572359575Sdim
573359575Sdim    lldb::SBBreakpoint
574359575Sdim    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line,
575359575Sdim                                lldb::addr_t offset, SBFileSpecList &module_list);
576359575Sdim
577359575Sdim    lldb::SBBreakpoint
578359575Sdim    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line,
579359575Sdim                                uint32_t column, lldb::addr_t offset,
580359575Sdim                                SBFileSpecList &module_list);
581359575Sdim
582359575Sdim    lldb::SBBreakpoint
583359575Sdim    BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL);
584359575Sdim
585359575Sdim    lldb::SBBreakpoint
586359575Sdim    BreakpointCreateByName (const char *symbol_name,
587359575Sdim                            uint32_t func_name_type,           // Logical OR one or more FunctionNameType enum bits
588359575Sdim                            const SBFileSpecList &module_list,
589359575Sdim                            const SBFileSpecList &comp_unit_list);
590359575Sdim
591359575Sdim    lldb::SBBreakpoint
592359575Sdim    BreakpointCreateByName (const char *symbol_name,
593359575Sdim                            uint32_t func_name_type,           // Logical OR one or more FunctionNameType enum bits
594359575Sdim                            lldb::LanguageType symbol_language,
595359575Sdim                            const SBFileSpecList &module_list,
596359575Sdim                            const SBFileSpecList &comp_unit_list);
597359575Sdim
598359575Sdim#ifdef SWIGPYTHON
599359575Sdim%typemap(in) (const char **symbol_name, uint32_t num_names) {
600359575Sdim  using namespace lldb_private;
601359575Sdim  /* Check if is a list  */
602359575Sdim  if (PythonList::Check($input)) {
603359575Sdim    PythonList list(PyRefType::Borrowed, $input);
604359575Sdim    $2 = list.GetSize();
605359575Sdim    int i = 0;
606359575Sdim    $1 = (char**)malloc(($2+1)*sizeof(char*));
607359575Sdim    for (i = 0; i < $2; i++) {
608359575Sdim      PythonString py_str = list.GetItemAtIndex(i).AsType<PythonString>();
609359575Sdim      if (!py_str.IsAllocated()) {
610359575Sdim        PyErr_SetString(PyExc_TypeError,"list must contain strings and blubby");
611359575Sdim        free($1);
612359575Sdim        return nullptr;
613359575Sdim      }
614359575Sdim
615359575Sdim      $1[i] = const_cast<char*>(py_str.GetString().data());
616359575Sdim    }
617359575Sdim    $1[i] = 0;
618359575Sdim  } else if ($input == Py_None) {
619359575Sdim    $1 =  NULL;
620359575Sdim  } else {
621359575Sdim    PyErr_SetString(PyExc_TypeError,"not a list");
622359575Sdim    return NULL;
623359575Sdim  }
624359575Sdim}
625359575Sdim#endif
626359575Sdim
627359575Sdim    lldb::SBBreakpoint
628359575Sdim    BreakpointCreateByNames (const char **symbol_name,
629359575Sdim                             uint32_t num_names,
630359575Sdim                             uint32_t name_type_mask,           // Logical OR one or more FunctionNameType enum bits
631359575Sdim                             const SBFileSpecList &module_list,
632359575Sdim                             const SBFileSpecList &comp_unit_list);
633359575Sdim
634359575Sdim    lldb::SBBreakpoint
635359575Sdim    BreakpointCreateByNames (const char **symbol_name,
636359575Sdim                             uint32_t num_names,
637359575Sdim                             uint32_t name_type_mask,           // Logical OR one or more FunctionNameType enum bits
638359575Sdim                             lldb::LanguageType symbol_language,
639359575Sdim                             const SBFileSpecList &module_list,
640359575Sdim                             const SBFileSpecList &comp_unit_list);
641359575Sdim
642359575Sdim    lldb::SBBreakpoint
643359575Sdim    BreakpointCreateByNames (const char **symbol_name,
644359575Sdim                             uint32_t num_names,
645359575Sdim                             uint32_t name_type_mask,           // Logical OR one or more FunctionNameType enum bits
646359575Sdim                             lldb::LanguageType symbol_language,
647359575Sdim                             lldb::addr_t offset,
648359575Sdim                             const SBFileSpecList &module_list,
649359575Sdim                             const SBFileSpecList &comp_unit_list);
650359575Sdim
651359575Sdim    lldb::SBBreakpoint
652359575Sdim    BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = NULL);
653359575Sdim
654359575Sdim    lldb::SBBreakpoint
655359575Sdim    BreakpointCreateByRegex (const char *symbol_name_regex,
656359575Sdim                             lldb::LanguageType symbol_language,
657359575Sdim                             const SBFileSpecList &module_list,
658359575Sdim                             const SBFileSpecList &comp_unit_list);
659359575Sdim
660359575Sdim    lldb::SBBreakpoint
661359575Sdim    BreakpointCreateBySourceRegex (const char *source_regex, const lldb::SBFileSpec &source_file, const char *module_name = NULL);
662359575Sdim
663359575Sdim    lldb::SBBreakpoint
664359575Sdim    BreakpointCreateBySourceRegex (const char *source_regex, const lldb::SBFileSpecList &module_list, const lldb::SBFileSpecList &file_list);
665359575Sdim
666359575Sdim    lldb::SBBreakpoint
667359575Sdim    BreakpointCreateBySourceRegex (const char *source_regex,
668359575Sdim                                   const SBFileSpecList &module_list,
669359575Sdim                                   const SBFileSpecList &source_file,
670359575Sdim                                   const SBStringList  &func_names);
671359575Sdim
672359575Sdim    lldb::SBBreakpoint
673359575Sdim    BreakpointCreateForException  (lldb::LanguageType language,
674359575Sdim                                   bool catch_bp,
675359575Sdim                                   bool throw_bp);
676359575Sdim
677359575Sdim    lldb::SBBreakpoint
678359575Sdim    BreakpointCreateByAddress (addr_t address);
679359575Sdim
680359575Sdim    lldb::SBBreakpoint
681359575Sdim    BreakpointCreateBySBAddress (SBAddress &sb_address);
682359575Sdim
683359575Sdim    %feature("docstring", "
684359575Sdim    Create a breakpoint using a scripted resolver.
685359575Sdim
686359575Sdim    @param[in] class_name
687359575Sdim       This is the name of the class that implements a scripted resolver.
688359575Sdim       The class should have the following signature:
689359575Sdim       class Resolver:
690359575Sdim           def __init__(self, bkpt, extra_args):
691359575Sdim               # bkpt - the breakpoint for which this is the resolver.  When
692359575Sdim               # the resolver finds an interesting address, call AddLocation
693359575Sdim               # on this breakpoint to add it.
694359575Sdim               #
695359575Sdim               # extra_args - an SBStructuredData that can be used to
696359575Sdim               # parametrize this instance.  Same as the extra_args passed
697359575Sdim               # to BreakpointCreateFromScript.
698359575Sdim
699359575Sdim           def __get_depth__ (self):
700359575Sdim               # This is optional, but if defined, you should return the
701359575Sdim               # depth at which you want the callback to be called.  The
702359575Sdim               # available options are:
703359575Sdim               #    lldb.eSearchDepthModule
704359575Sdim               #    lldb.eSearchDepthCompUnit
705359575Sdim               # The default if you don't implement this method is
706359575Sdim               # eSearchDepthModule.
707359575Sdim
708359575Sdim           def __callback__(self, sym_ctx):
709359575Sdim               # sym_ctx - an SBSymbolContext that is the cursor in the
710359575Sdim               # search through the program to resolve breakpoints.
711359575Sdim               # The sym_ctx will be filled out to the depth requested in
712359575Sdim               # __get_depth__.
713359575Sdim               # Look in this sym_ctx for new breakpoint locations,
714359575Sdim               # and if found use bkpt.AddLocation to add them.
715359575Sdim               # Note, you will only get called for modules/compile_units that
716359575Sdim               # pass the SearchFilter provided by the module_list & file_list
717359575Sdim               # passed into BreakpointCreateFromScript.
718359575Sdim
719359575Sdim           def get_short_help(self):
720359575Sdim               # Optional, but if implemented return a short string that will
721359575Sdim               # be printed at the beginning of the break list output for the
722359575Sdim               # breakpoint.
723359575Sdim
724359575Sdim    @param[in] extra_args
725359575Sdim       This is an SBStructuredData object that will get passed to the
726359575Sdim       constructor of the class in class_name.  You can use this to
727359575Sdim       reuse the same class, parametrizing it with entries from this
728359575Sdim       dictionary.
729359575Sdim
730359575Sdim    @param module_list
731359575Sdim       If this is non-empty, this will be used as the module filter in the
732359575Sdim       SearchFilter created for this breakpoint.
733359575Sdim
734359575Sdim    @param file_list
735359575Sdim       If this is non-empty, this will be used as the comp unit filter in the
736359575Sdim       SearchFilter created for this breakpoint.
737359575Sdim
738359575Sdim    @return
739359575Sdim        An SBBreakpoint that will set locations based on the logic in the
740359575Sdim        resolver's search callback.") BreakpointCreateFromScript;
741359575Sdim    lldb::SBBreakpoint BreakpointCreateFromScript(
742359575Sdim      const char *class_name,
743359575Sdim      SBStructuredData &extra_args,
744359575Sdim      const SBFileSpecList &module_list,
745359575Sdim      const SBFileSpecList &file_list,
746359575Sdim      bool request_hardware = false);
747359575Sdim
748359575Sdim    uint32_t
749359575Sdim    GetNumBreakpoints () const;
750359575Sdim
751359575Sdim    lldb::SBBreakpoint
752359575Sdim    GetBreakpointAtIndex (uint32_t idx) const;
753359575Sdim
754359575Sdim    bool
755359575Sdim    BreakpointDelete (break_id_t break_id);
756359575Sdim
757359575Sdim    lldb::SBBreakpoint
758359575Sdim    FindBreakpointByID (break_id_t break_id);
759359575Sdim
760359575Sdim
761359575Sdim    bool FindBreakpointsByName(const char *name, SBBreakpointList &bkpt_list);
762359575Sdim
763359575Sdim    void DeleteBreakpointName(const char *name);
764359575Sdim
765359575Sdim    void GetBreakpointNames(SBStringList &names);
766359575Sdim
767359575Sdim    bool
768359575Sdim    EnableAllBreakpoints ();
769359575Sdim
770359575Sdim    bool
771359575Sdim    DisableAllBreakpoints ();
772359575Sdim
773359575Sdim    bool
774359575Sdim    DeleteAllBreakpoints ();
775359575Sdim
776359575Sdim     %feature("docstring", "
777359575Sdim    Read breakpoints from source_file and return the newly created
778359575Sdim    breakpoints in bkpt_list.
779359575Sdim
780359575Sdim    @param[in] source_file
781359575Sdim       The file from which to read the breakpoints
782359575Sdim
783359575Sdim    @param[out] bkpt_list
784359575Sdim       A list of the newly created breakpoints.
785359575Sdim
786359575Sdim    @return
787359575Sdim        An SBError detailing any errors in reading in the breakpoints.") BreakpointsCreateFromFile;
788359575Sdim    lldb::SBError
789359575Sdim    BreakpointsCreateFromFile(SBFileSpec &source_file,
790359575Sdim                              SBBreakpointList &bkpt_list);
791359575Sdim
792359575Sdim     %feature("docstring", "
793359575Sdim    Read breakpoints from source_file and return the newly created
794359575Sdim    breakpoints in bkpt_list.
795359575Sdim
796359575Sdim    @param[in] source_file
797359575Sdim       The file from which to read the breakpoints
798359575Sdim
799359575Sdim    @param[in] matching_names
800359575Sdim       Only read in breakpoints whose names match one of the names in this
801359575Sdim       list.
802359575Sdim
803359575Sdim    @param[out] bkpt_list
804359575Sdim       A list of the newly created breakpoints.
805359575Sdim
806359575Sdim    @return
807359575Sdim        An SBError detailing any errors in reading in the breakpoints.") BreakpointsCreateFromFile;
808359575Sdim    lldb::SBError BreakpointsCreateFromFile(SBFileSpec &source_file,
809359575Sdim                                          SBStringList &matching_names,
810359575Sdim                                          SBBreakpointList &new_bps);
811359575Sdim
812359575Sdim     %feature("docstring", "
813359575Sdim    Write breakpoints to dest_file.
814359575Sdim
815359575Sdim    @param[in] dest_file
816359575Sdim       The file to which to write the breakpoints.
817359575Sdim
818359575Sdim    @return
819359575Sdim        An SBError detailing any errors in writing in the breakpoints.") BreakpointsCreateFromFile;
820359575Sdim    lldb::SBError
821359575Sdim    BreakpointsWriteToFile(SBFileSpec &dest_file);
822359575Sdim
823359575Sdim     %feature("docstring", "
824359575Sdim    Write breakpoints listed in bkpt_list to dest_file.
825359575Sdim
826359575Sdim    @param[in] dest_file
827359575Sdim       The file to which to write the breakpoints.
828359575Sdim
829359575Sdim    @param[in] bkpt_list
830359575Sdim       Only write breakpoints from this list.
831359575Sdim
832359575Sdim    @param[in] append
833359575Sdim       If true, append the breakpoints in bkpt_list to the others
834359575Sdim       serialized in dest_file.  If dest_file doesn't exist, then a new
835359575Sdim       file will be created and the breakpoints in bkpt_list written to it.
836359575Sdim
837359575Sdim    @return
838359575Sdim        An SBError detailing any errors in writing in the breakpoints.") BreakpointsCreateFromFile;
839359575Sdim    lldb::SBError
840359575Sdim    BreakpointsWriteToFile(SBFileSpec &dest_file,
841359575Sdim                           SBBreakpointList &bkpt_list,
842359575Sdim                           bool append = false);
843359575Sdim
844359575Sdim    uint32_t
845359575Sdim    GetNumWatchpoints () const;
846359575Sdim
847359575Sdim    lldb::SBWatchpoint
848359575Sdim    GetWatchpointAtIndex (uint32_t idx) const;
849359575Sdim
850359575Sdim    bool
851359575Sdim    DeleteWatchpoint (lldb::watch_id_t watch_id);
852359575Sdim
853359575Sdim    lldb::SBWatchpoint
854359575Sdim    FindWatchpointByID (lldb::watch_id_t watch_id);
855359575Sdim
856359575Sdim    bool
857359575Sdim    EnableAllWatchpoints ();
858359575Sdim
859359575Sdim    bool
860359575Sdim    DisableAllWatchpoints ();
861359575Sdim
862359575Sdim    bool
863359575Sdim    DeleteAllWatchpoints ();
864359575Sdim
865359575Sdim    lldb::SBWatchpoint
866359575Sdim    WatchAddress (lldb::addr_t addr,
867359575Sdim                  size_t size,
868359575Sdim                  bool read,
869359575Sdim                  bool write,
870359575Sdim                  SBError &error);
871359575Sdim
872359575Sdim
873359575Sdim    lldb::SBBroadcaster
874359575Sdim    GetBroadcaster () const;
875359575Sdim
876359575Sdim     %feature("docstring", "
877359575Sdim    Create an SBValue with the given name by treating the memory starting at addr as an entity of type.
878359575Sdim
879359575Sdim    @param[in] name
880359575Sdim        The name of the resultant SBValue
881359575Sdim
882359575Sdim    @param[in] addr
883359575Sdim        The address of the start of the memory region to be used.
884359575Sdim
885359575Sdim    @param[in] type
886359575Sdim        The type to use to interpret the memory starting at addr.
887359575Sdim
888359575Sdim    @return
889359575Sdim        An SBValue of the given type, may be invalid if there was an error reading
890359575Sdim        the underlying memory.") CreateValueFromAddress;
891359575Sdim    lldb::SBValue
892359575Sdim    CreateValueFromAddress (const char *name, lldb::SBAddress addr, lldb::SBType type);
893359575Sdim
894359575Sdim    lldb::SBValue
895359575Sdim    CreateValueFromData (const char *name, lldb::SBData data, lldb::SBType type);
896359575Sdim
897359575Sdim    lldb::SBValue
898359575Sdim    CreateValueFromExpression (const char *name, const char* expr);
899359575Sdim
900359575Sdim    %feature("docstring", "
901359575Sdim    Disassemble a specified number of instructions starting at an address.
902359575Sdim    Parameters:
903359575Sdim       base_addr       -- the address to start disassembly from
904359575Sdim       count           -- the number of instructions to disassemble
905359575Sdim       flavor_string   -- may be 'intel' or 'att' on x86 targets to specify that style of disassembly
906359575Sdim    Returns an SBInstructionList.")
907359575Sdim    ReadInstructions;
908359575Sdim    lldb::SBInstructionList
909359575Sdim    ReadInstructions (lldb::SBAddress base_addr, uint32_t count);
910359575Sdim
911359575Sdim    lldb::SBInstructionList
912359575Sdim    ReadInstructions (lldb::SBAddress base_addr, uint32_t count, const char *flavor_string);
913359575Sdim
914359575Sdim    %feature("docstring", "
915359575Sdim    Disassemble the bytes in a buffer and return them in an SBInstructionList.
916359575Sdim    Parameters:
917359575Sdim       base_addr -- used for symbolicating the offsets in the byte stream when disassembling
918359575Sdim       buf       -- bytes to be disassembled
919359575Sdim       size      -- (C++) size of the buffer
920359575Sdim    Returns an SBInstructionList.")
921359575Sdim    GetInstructions;
922359575Sdim    lldb::SBInstructionList
923359575Sdim    GetInstructions (lldb::SBAddress base_addr, const void *buf, size_t size);
924359575Sdim
925359575Sdim    %feature("docstring", "
926359575Sdim    Disassemble the bytes in a buffer and return them in an SBInstructionList, with a supplied flavor.
927359575Sdim    Parameters:
928359575Sdim       base_addr -- used for symbolicating the offsets in the byte stream when disassembling
929359575Sdim       flavor    -- may be 'intel' or 'att' on x86 targets to specify that style of disassembly
930359575Sdim       buf       -- bytes to be disassembled
931359575Sdim       size      -- (C++) size of the buffer
932359575Sdim    Returns an SBInstructionList.")
933359575Sdim    GetInstructionsWithFlavor;
934359575Sdim    lldb::SBInstructionList
935359575Sdim    GetInstructionsWithFlavor (lldb::SBAddress base_addr, const char *flavor_string, const void *buf, size_t size);
936359575Sdim
937359575Sdim    lldb::SBSymbolContextList
938359575Sdim    FindSymbols (const char *name, lldb::SymbolType type = eSymbolTypeAny);
939359575Sdim
940359575Sdim    bool
941359575Sdim    GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level);
942359575Sdim
943359575Sdim    lldb::addr_t
944359575Sdim    GetStackRedZoneSize();
945359575Sdim
946359575Sdim    lldb::SBLaunchInfo
947359575Sdim    GetLaunchInfo () const;
948359575Sdim
949359575Sdim    void
950359575Sdim    SetLaunchInfo (const lldb::SBLaunchInfo &launch_info);
951359575Sdim
952359575Sdim    void SetCollectingStats(bool v);
953359575Sdim
954359575Sdim    bool GetCollectingStats();
955359575Sdim
956359575Sdim    lldb::SBStructuredData GetStatistics();
957359575Sdim
958359575Sdim    bool
959359575Sdim    operator == (const lldb::SBTarget &rhs) const;
960359575Sdim
961359575Sdim    bool
962359575Sdim    operator != (const lldb::SBTarget &rhs) const;
963359575Sdim
964359575Sdim    lldb::SBValue
965359575Sdim    EvaluateExpression (const char *expr);
966359575Sdim
967359575Sdim    lldb::SBValue
968359575Sdim    EvaluateExpression (const char *expr, const lldb::SBExpressionOptions &options);
969359575Sdim
970359575Sdim    STRING_EXTENSION_LEVEL(SBTarget, lldb::eDescriptionLevelBrief)
971359575Sdim
972359575Sdim#ifdef SWIGPYTHON
973359575Sdim    %pythoncode %{
974359575Sdim        class modules_access(object):
975359575Sdim            '''A helper object that will lazily hand out lldb.SBModule objects for a target when supplied an index, or by full or partial path.'''
976359575Sdim            def __init__(self, sbtarget):
977359575Sdim                self.sbtarget = sbtarget
978359575Sdim
979359575Sdim            def __len__(self):
980359575Sdim                if self.sbtarget:
981359575Sdim                    return int(self.sbtarget.GetNumModules())
982359575Sdim                return 0
983359575Sdim
984359575Sdim            def __getitem__(self, key):
985359575Sdim                num_modules = self.sbtarget.GetNumModules()
986359575Sdim                if type(key) is int:
987359575Sdim                    if key < num_modules:
988359575Sdim                        return self.sbtarget.GetModuleAtIndex(key)
989359575Sdim                elif type(key) is str:
990359575Sdim                    if key.find('/') == -1:
991359575Sdim                        for idx in range(num_modules):
992359575Sdim                            module = self.sbtarget.GetModuleAtIndex(idx)
993359575Sdim                            if module.file.basename == key:
994359575Sdim                                return module
995359575Sdim                    else:
996359575Sdim                        for idx in range(num_modules):
997359575Sdim                            module = self.sbtarget.GetModuleAtIndex(idx)
998359575Sdim                            if module.file.fullpath == key:
999359575Sdim                                return module
1000359575Sdim                    # See if the string is a UUID
1001359575Sdim                    try:
1002359575Sdim                        the_uuid = uuid.UUID(key)
1003359575Sdim                        if the_uuid:
1004359575Sdim                            for idx in range(num_modules):
1005359575Sdim                                module = self.sbtarget.GetModuleAtIndex(idx)
1006359575Sdim                                if module.uuid == the_uuid:
1007359575Sdim                                    return module
1008359575Sdim                    except:
1009359575Sdim                        return None
1010359575Sdim                elif type(key) is uuid.UUID:
1011359575Sdim                    for idx in range(num_modules):
1012359575Sdim                        module = self.sbtarget.GetModuleAtIndex(idx)
1013359575Sdim                        if module.uuid == key:
1014359575Sdim                            return module
1015359575Sdim                elif type(key) is re.SRE_Pattern:
1016359575Sdim                    matching_modules = []
1017359575Sdim                    for idx in range(num_modules):
1018359575Sdim                        module = self.sbtarget.GetModuleAtIndex(idx)
1019359575Sdim                        re_match = key.search(module.path.fullpath)
1020359575Sdim                        if re_match:
1021359575Sdim                            matching_modules.append(module)
1022359575Sdim                    return matching_modules
1023359575Sdim                else:
1024359575Sdim                    print("error: unsupported item type: %s" % type(key))
1025359575Sdim                return None
1026359575Sdim
1027359575Sdim        def get_modules_access_object(self):
1028359575Sdim            '''An accessor function that returns a modules_access() object which allows lazy module access from a lldb.SBTarget object.'''
1029359575Sdim            return self.modules_access (self)
1030359575Sdim
1031359575Sdim        def get_modules_array(self):
1032359575Sdim            '''An accessor function that returns a list() that contains all modules in a lldb.SBTarget object.'''
1033359575Sdim            modules = []
1034359575Sdim            for idx in range(self.GetNumModules()):
1035359575Sdim                modules.append(self.GetModuleAtIndex(idx))
1036359575Sdim            return modules
1037359575Sdim
1038359575Sdim        def module_iter(self):
1039359575Sdim            '''Returns an iterator over all modules in a lldb.SBTarget
1040359575Sdim            object.'''
1041359575Sdim            return lldb_iter(self, 'GetNumModules', 'GetModuleAtIndex')
1042359575Sdim
1043359575Sdim        def breakpoint_iter(self):
1044359575Sdim            '''Returns an iterator over all breakpoints in a lldb.SBTarget
1045359575Sdim            object.'''
1046359575Sdim            return lldb_iter(self, 'GetNumBreakpoints', 'GetBreakpointAtIndex')
1047359575Sdim
1048359575Sdim        def watchpoint_iter(self):
1049359575Sdim            '''Returns an iterator over all watchpoints in a lldb.SBTarget
1050359575Sdim            object.'''
1051359575Sdim            return lldb_iter(self, 'GetNumWatchpoints', 'GetWatchpointAtIndex')
1052359575Sdim
1053359575Sdim        modules = property(get_modules_array, None, doc='''A read only property that returns a list() of lldb.SBModule objects contained in this target. This list is a list all modules that the target currently is tracking (the main executable and all dependent shared libraries).''')
1054359575Sdim        module = property(get_modules_access_object, None, doc=r'''A read only property that returns an object that implements python operator overloading with the square brackets().\n    target.module[<int>] allows array access to any modules.\n    target.module[<str>] allows access to modules by basename, full path, or uuid string value.\n    target.module[uuid.UUID()] allows module access by UUID.\n    target.module[re] allows module access using a regular expression that matches the module full path.''')
1055359575Sdim        process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that this target owns.''')
1056359575Sdim        executable = property(GetExecutable, None, doc='''A read only property that returns an lldb object that represents the main executable module (lldb.SBModule) for this target.''')
1057359575Sdim        debugger = property(GetDebugger, None, doc='''A read only property that returns an lldb object that represents the debugger (lldb.SBDebugger) that owns this target.''')
1058359575Sdim        num_breakpoints = property(GetNumBreakpoints, None, doc='''A read only property that returns the number of breakpoints that this target has as an integer.''')
1059359575Sdim        num_watchpoints = property(GetNumWatchpoints, None, doc='''A read only property that returns the number of watchpoints that this target has as an integer.''')
1060359575Sdim        broadcaster = property(GetBroadcaster, None, doc='''A read only property that an lldb object that represents the broadcaster (lldb.SBBroadcaster) for this target.''')
1061359575Sdim        byte_order = property(GetByteOrder, None, doc='''A read only property that returns an lldb enumeration value (lldb.eByteOrderLittle, lldb.eByteOrderBig, lldb.eByteOrderInvalid) that represents the byte order for this target.''')
1062359575Sdim        addr_size = property(GetAddressByteSize, None, doc='''A read only property that returns the size in bytes of an address for this target.''')
1063359575Sdim        triple = property(GetTriple, None, doc='''A read only property that returns the target triple (arch-vendor-os) for this target as a string.''')
1064359575Sdim        data_byte_size = property(GetDataByteSize, None, doc='''A read only property that returns the size in host bytes of a byte in the data address space for this target.''')
1065359575Sdim        code_byte_size = property(GetCodeByteSize, None, doc='''A read only property that returns the size in host bytes of a byte in the code address space for this target.''')
1066359575Sdim        platform = property(GetPlatform, None, doc='''A read only property that returns the platform associated with with this target.''')
1067359575Sdim    %}
1068359575Sdim#endif
1069359575Sdim};
1070359575Sdim} // namespace lldb
1071