Struct lldb::SBTarget [] [src]

pub struct SBTarget {
    pub raw: SBTargetRef,
}

The target program running under the debugger.

Process Management

Starting a debug session is done by launching the target, attaching to a running process, or loading a core file.

Launching

Launching a process can be done by creating and filling out an SBLaunchInfo and calling launch.

use lldb::*;
fn launch_target(target: &SBTarget) -> Result<SBProcess, SBError> {
    let launch_info = SBLaunchInfo::new();
    launch_info.set_launch_flags(LAUNCH_FLAG_STOP_AT_ENTRY);
    // Probably want to set up a listener here.
    target.launch(launch_info)
}

Attaching

Attaching to a process can be done by creating and filling out an SBAttachInfo and calling attach.

use lldb::{lldb_pid_t, SBAttachInfo, SBError, SBProcess, SBTarget};
fn attach_to_pid(target: &SBTarget, pid: lldb_pid_t) -> Result<SBProcess, SBError> {
    let attach_info = SBAttachInfo::new_with_pid(pid);
    // Probably want to set up a listener here.
    target.attach(attach_info)
}

Core Files

...

Breakpoints and Watchpoints

...

Modules

...

Events

...

Fields

The underlying raw SBTargetRef.

Methods

impl SBTarget
[src]

[src]

Construct a new SBTarget.

[src]

Construct a new Some(SBTarget) or None.

[src]

Check whether or not this is a valid SBTarget value.

[src]

[src]

Get the SBPlatform associated with this target.

After return, the platform object should be checked for validity.

[src]

Get the SBProcess associated with this target.

[src]

Launch a target for debugging.

[src]

[src]

Get a filespec for the executable.

[src]

Add a module to the target.

[src]

Add a module to the target using an SBModuleSpec.

[src]

Remove a module from the target.

[src]

Get the debugger controlling this target.

[src]

Get an iterator over the modules known to this target instance.

[src]

Find the module for the given SBFileSpec.

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Evaluate an expression.

[src]

Trait Implementations

impl Debug for SBTarget
[src]

[src]

Formats the value using the given formatter.

impl Drop for SBTarget
[src]

[src]

Executes the destructor for this type. Read more