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
raw: SBTargetRef
The underlying raw SBTargetRef.
Methods
impl SBTarget[src]
fn wrap(raw: SBTargetRef) -> SBTarget[src]
Construct a new SBTarget.
fn maybe_wrap(raw: SBTargetRef) -> Option<SBTarget>[src]
Construct a new Some(SBTarget) or None.
fn is_valid(&self) -> bool[src]
Check whether or not this is a valid SBTarget value.
fn broadcaster_class_name() -> &'static str[src]
fn platform(&self) -> SBPlatform[src]
Get the SBPlatform associated with this target.
After return, the platform object should be checked for validity.
fn process(&self) -> SBProcess[src]
Get the SBProcess associated with this target.
fn launch(&self, launch_info: SBLaunchInfo) -> Result<SBProcess, SBError>[src]
Launch a target for debugging.
fn attach(&self, attach_info: SBAttachInfo) -> Result<SBProcess, SBError>[src]
fn executable(&self) -> Option<SBFileSpec>[src]
Get a filespec for the executable.
fn add_module(&self, module: &SBModule) -> bool[src]
Add a module to the target.
fn add_module_spec(&self, module_spec: &SBModuleSpec) -> Option<SBModule>[src]
Add a module to the target using an SBModuleSpec.
fn remove_module(&self, module: &SBModule) -> bool[src]
Remove a module from the target.
fn debugger(&self) -> SBDebugger[src]
Get the debugger controlling this target.
fn modules(&self) -> SBTargetModuleIter[src]
Get an iterator over the modules known to this target instance.
fn find_module(&self, file_spec: &SBFileSpec) -> Option<SBModule>[src]
Find the module for the given SBFileSpec.
fn delete_breakpoint(&self, break_id: i32)[src]
fn find_breakpoint_by_id(&self, break_id: i32) -> Option<SBBreakpoint>[src]
fn enable_all_breakpoints(&self)[src]
fn disable_all_breakpoints(&self)[src]
fn delete_all_breakpoints(&self)[src]
fn breakpoints(&self) -> SBTargetBreakpointIter[src]
fn delete_watchpoint(&self, watch_id: i32)[src]
fn find_watchpoint_by_id(&self, watch_id: i32) -> Option<SBWatchpoint>[src]
fn enable_all_watchpoints(&self)[src]
fn disable_all_watchpoints(&self)[src]
fn delete_all_watchpoints(&self)[src]
fn watch_address(
&self,
addr: lldb_addr_t,
size: usize,
read: bool,
write: bool
) -> Result<SBWatchpoint, SBError>[src]
&self,
addr: lldb_addr_t,
size: usize,
read: bool,
write: bool
) -> Result<SBWatchpoint, SBError>
fn watchpoints(&self) -> SBTargetWatchpointIter[src]
fn broadcaster(&self) -> SBBroadcaster[src]
fn evaluate_expression(
&self,
expression: &str,
options: &SBExpressionOptions
) -> SBValue[src]
&self,
expression: &str,
options: &SBExpressionOptions
) -> SBValue
Evaluate an expression.