Struct LldbManager

Source
pub struct LldbManager { /* private fields */ }
Expand description

Manages LLDB instances and debugging sessions

Implementations§

Source§

impl LldbManager

Source

pub fn new(lldb_path: Option<String>) -> IncodeResult<Self>

Source

pub fn create_session(&mut self) -> IncodeResult<Uuid>

Create a new debugging session

Source

pub fn current_session_id(&self) -> Option<Uuid>

Get current session ID

Source

pub fn get_session(&self, session_id: &Uuid) -> IncodeResult<DebuggingSession>

Get session information

Source

pub fn update_session_state( &self, session_id: &Uuid, state: SessionState, ) -> IncodeResult<()>

Update session state

Source

pub fn save_session(&self, session_id: &Uuid) -> IncodeResult<String>

Save debugging session state to JSON

Source

pub fn load_session(&mut self, session_data: &str) -> IncodeResult<Uuid>

Load debugging session state from JSON

Source

pub fn cleanup_session(&mut self, session_id: &Uuid) -> IncodeResult<String>

Clean up debugging session resources

Source

pub fn launch_process( &mut self, executable: &str, args: &[String], env: &HashMap<String, String>, ) -> IncodeResult<u32>

Launch a process for debugging - LLDB workflow: target create + run

Source

pub fn get_console_output(&self) -> IncodeResult<String>

Get current console output from the running process

Source

pub fn attach_to_process(&mut self, pid: u32) -> IncodeResult<()>

Attach to an existing process

Source

pub fn detach_process(&mut self) -> IncodeResult<()>

Detach from current process

Source

pub fn continue_execution(&self) -> IncodeResult<()>

Continue execution

Source

pub fn kill_process(&mut self) -> IncodeResult<()>

Kill current process

Source

pub fn get_process_info(&self) -> IncodeResult<ProcessInfo>

Get process information

Source

pub fn step_over(&self) -> IncodeResult<()>

Step over current instruction

Source

pub fn step_into(&self) -> IncodeResult<()>

Step into function calls

Source

pub fn step_out(&self) -> IncodeResult<()>

Step out of current function

Source

pub fn step_instruction(&self, step_over: bool) -> IncodeResult<()>

Single instruction step

Source

pub fn run_until( &self, address: Option<u64>, file: Option<&str>, line: Option<u32>, ) -> IncodeResult<()>

Run until specific address or line

Source

pub fn interrupt_execution(&self) -> IncodeResult<()>

Interrupt/pause running process

Source

pub fn set_breakpoint(&self, location: &str) -> IncodeResult<u32>

Set breakpoint

Source

pub fn set_watchpoint( &self, address: u64, size: u32, read: bool, write: bool, ) -> IncodeResult<u32>

Set memory watchpoint

Source

pub fn list_breakpoints(&self) -> IncodeResult<Vec<BreakpointInfo>>

List all breakpoints

Source

pub fn enable_breakpoint(&self, breakpoint_id: u32) -> IncodeResult<bool>

Enable breakpoint by ID

Source

pub fn disable_breakpoint(&self, breakpoint_id: u32) -> IncodeResult<bool>

Disable breakpoint by ID

Source

pub fn set_conditional_breakpoint( &self, location: &str, condition: &str, ) -> IncodeResult<u32>

Set conditional breakpoint

Source

pub fn set_breakpoint_commands( &self, breakpoint_id: u32, commands: &[String], ) -> IncodeResult<bool>

Set breakpoint commands (actions to execute when hit)

Source

pub fn delete_breakpoint(&self, breakpoint_id: u32) -> IncodeResult<()>

Delete breakpoint by ID

Source

pub fn get_backtrace(&self) -> IncodeResult<Vec<String>>

Get backtrace

Source

pub fn select_frame(&mut self, frame_index: u32) -> IncodeResult<FrameInfo>

Select specific stack frame by index

Source

pub fn get_frame_info( &self, frame_index: Option<u32>, ) -> IncodeResult<FrameInfo>

Get information about current or specific frame

Source

pub fn read_memory(&self, address: u64, size: usize) -> IncodeResult<Vec<u8>>

Read memory at address

Source

pub fn disassemble(&self, address: u64, count: u32) -> IncodeResult<Vec<String>>

Disassemble instructions at address

Source

pub fn write_memory(&self, address: u64, data: &[u8]) -> IncodeResult<usize>

Write data to memory at address

Source

pub fn search_memory( &self, pattern: &[u8], start_address: Option<u64>, search_size: Option<usize>, ) -> IncodeResult<Vec<u64>>

Search for byte patterns in memory

Source

pub fn get_memory_regions(&self) -> IncodeResult<Vec<MemoryRegion>>

Get memory regions and their permissions

Source

pub fn dump_memory_to_file( &self, address: u64, size: usize, file_path: &str, ) -> IncodeResult<usize>

Dump memory region to file

Source

pub fn get_memory_map(&self) -> IncodeResult<MemoryMap>

Get detailed memory map with segments

Source

pub fn get_frame_variables( &self, frame_index: Option<u32>, include_arguments: bool, ) -> IncodeResult<Vec<Variable>>

Get frame variables (local variables in current frame)

Source

pub fn get_frame_arguments( &self, frame_index: Option<u32>, ) -> IncodeResult<Vec<Variable>>

Get frame arguments (function parameters)

Source

pub fn evaluate_in_frame( &self, frame_index: Option<u32>, expression: &str, ) -> IncodeResult<String>

Evaluate expression in specific frame context

Source

pub fn get_variables( &self, scope: Option<&str>, filter: Option<&str>, ) -> IncodeResult<Vec<Variable>>

Get variables in current scope (combining local and global)

Source

pub fn get_global_variables( &self, module_filter: Option<&str>, ) -> IncodeResult<Vec<Variable>>

Get global variables

Source

pub fn get_variable_info( &self, variable_name: &str, ) -> IncodeResult<VariableInfo>

Get detailed variable information

Source

pub fn evaluate_expression(&self, expression: &str) -> IncodeResult<String>

Evaluate expression

Source

pub fn list_threads(&self) -> IncodeResult<Vec<ThreadInfo>>

Get thread list

Source

pub fn get_registers( &self, thread_id: Option<u32>, _include_metadata: bool, ) -> IncodeResult<RegisterState>

Get register values for current thread/frame

Source

pub fn set_register( &mut self, register_name: &str, value: u64, _thread_id: Option<u32>, ) -> IncodeResult<bool>

Set register value

Source

pub fn get_register_info( &self, register_name: &str, thread_id: Option<u32>, ) -> IncodeResult<RegisterInfo>

Get detailed register information

Source

pub fn save_register_state( &self, thread_id: Option<u32>, ) -> IncodeResult<RegisterState>

Save current register state

Source

pub fn get_source_code( &self, address: Option<u64>, context_lines: u32, ) -> IncodeResult<SourceCode>

Get source code around current location

Source

pub fn list_functions( &self, module_filter: Option<&str>, ) -> IncodeResult<Vec<FunctionInfo>>

List all functions with addresses

Source

pub fn get_line_info(&self, address: u64) -> IncodeResult<SourceLocation>

Get source line information for address

Source

pub fn get_debug_info(&self) -> IncodeResult<DebugInfo>

Get debug information summary

Source

pub fn select_thread(&mut self, thread_id: u32) -> IncodeResult<ThreadInfo>

Select thread for debugging

Source

pub fn execute_lldb_command(&self, command: &str) -> IncodeResult<String>

Execute raw LLDB command (placeholder implementation)

Source

pub fn list_processes( &self, filter: Option<&str>, include_system: bool, ) -> IncodeResult<Vec<ProcessInfo>>

List all processes on the system

Source

pub fn cleanup(&mut self) -> IncodeResult<()>

Cleanup resources

Source§

impl LldbManager

Source

pub fn execute_command(&self, command: &str) -> IncodeResult<String>

Execute raw LLDB command and return output

Source

pub fn list_modules( &self, filter_name: Option<&str>, include_debug_info: bool, ) -> IncodeResult<Vec<ModuleInfo>>

List all loaded modules/libraries with their addresses and information

Source

pub fn get_platform_info(&self) -> IncodeResult<PlatformInfo>

Get comprehensive platform information

Source

pub fn get_lldb_version( &self, include_build_info: bool, ) -> IncodeResult<LldbVersionInfo>

Get LLDB version and build information

Source

pub fn get_target_info(&self) -> IncodeResult<TargetInfo>

Get comprehensive target information

Source

pub fn set_lldb_settings( &mut self, setting_name: &str, value: &str, ) -> IncodeResult<String>

Set LLDB settings (configuration parameters)

Source

pub fn set_variable( &mut self, variable_name: &str, value: &str, ) -> IncodeResult<String>

Set variable value during debugging

Source

pub fn lookup_symbol(&self, symbol_name: &str) -> IncodeResult<SymbolInfo>

Lookup symbol information by name

Source

pub fn analyze_crash( &self, core_file_path: Option<&str>, ) -> IncodeResult<CrashAnalysis>

Analyze crash dump and provide detailed crash information

Source

pub fn generate_core_dump(&self, output_path: &str) -> IncodeResult<String>

Generate core dump file for current process state

Trait Implementations§

Source§

impl Drop for LldbManager

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for LldbManager

Source§

impl Sync for LldbManager

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more