pub struct LldbManager { /* private fields */ }
Expand description
Manages LLDB instances and debugging sessions
Implementations§
Source§impl LldbManager
impl LldbManager
pub fn new(lldb_path: Option<String>) -> IncodeResult<Self>
Sourcepub fn create_session(&mut self) -> IncodeResult<Uuid>
pub fn create_session(&mut self) -> IncodeResult<Uuid>
Create a new debugging session
Sourcepub fn current_session_id(&self) -> Option<Uuid>
pub fn current_session_id(&self) -> Option<Uuid>
Get current session ID
Sourcepub fn get_session(&self, session_id: &Uuid) -> IncodeResult<DebuggingSession>
pub fn get_session(&self, session_id: &Uuid) -> IncodeResult<DebuggingSession>
Get session information
Sourcepub fn update_session_state(
&self,
session_id: &Uuid,
state: SessionState,
) -> IncodeResult<()>
pub fn update_session_state( &self, session_id: &Uuid, state: SessionState, ) -> IncodeResult<()>
Update session state
Sourcepub fn save_session(&self, session_id: &Uuid) -> IncodeResult<String>
pub fn save_session(&self, session_id: &Uuid) -> IncodeResult<String>
Save debugging session state to JSON
Sourcepub fn load_session(&mut self, session_data: &str) -> IncodeResult<Uuid>
pub fn load_session(&mut self, session_data: &str) -> IncodeResult<Uuid>
Load debugging session state from JSON
Sourcepub fn cleanup_session(&mut self, session_id: &Uuid) -> IncodeResult<String>
pub fn cleanup_session(&mut self, session_id: &Uuid) -> IncodeResult<String>
Clean up debugging session resources
Sourcepub fn launch_process(
&mut self,
executable: &str,
args: &[String],
env: &HashMap<String, String>,
) -> IncodeResult<u32>
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
Sourcepub fn get_console_output(&self) -> IncodeResult<String>
pub fn get_console_output(&self) -> IncodeResult<String>
Get current console output from the running process
Sourcepub fn attach_to_process(&mut self, pid: u32) -> IncodeResult<()>
pub fn attach_to_process(&mut self, pid: u32) -> IncodeResult<()>
Attach to an existing process
Sourcepub fn detach_process(&mut self) -> IncodeResult<()>
pub fn detach_process(&mut self) -> IncodeResult<()>
Detach from current process
Sourcepub fn continue_execution(&self) -> IncodeResult<()>
pub fn continue_execution(&self) -> IncodeResult<()>
Continue execution
Sourcepub fn kill_process(&mut self) -> IncodeResult<()>
pub fn kill_process(&mut self) -> IncodeResult<()>
Kill current process
Sourcepub fn get_process_info(&self) -> IncodeResult<ProcessInfo>
pub fn get_process_info(&self) -> IncodeResult<ProcessInfo>
Get process information
Sourcepub fn step_over(&self) -> IncodeResult<()>
pub fn step_over(&self) -> IncodeResult<()>
Step over current instruction
Sourcepub fn step_into(&self) -> IncodeResult<()>
pub fn step_into(&self) -> IncodeResult<()>
Step into function calls
Sourcepub fn step_out(&self) -> IncodeResult<()>
pub fn step_out(&self) -> IncodeResult<()>
Step out of current function
Sourcepub fn step_instruction(&self, step_over: bool) -> IncodeResult<()>
pub fn step_instruction(&self, step_over: bool) -> IncodeResult<()>
Single instruction step
Sourcepub fn run_until(
&self,
address: Option<u64>,
file: Option<&str>,
line: Option<u32>,
) -> IncodeResult<()>
pub fn run_until( &self, address: Option<u64>, file: Option<&str>, line: Option<u32>, ) -> IncodeResult<()>
Run until specific address or line
Sourcepub fn interrupt_execution(&self) -> IncodeResult<()>
pub fn interrupt_execution(&self) -> IncodeResult<()>
Interrupt/pause running process
Sourcepub fn set_breakpoint(&self, location: &str) -> IncodeResult<u32>
pub fn set_breakpoint(&self, location: &str) -> IncodeResult<u32>
Set breakpoint
Sourcepub fn set_watchpoint(
&self,
address: u64,
size: u32,
read: bool,
write: bool,
) -> IncodeResult<u32>
pub fn set_watchpoint( &self, address: u64, size: u32, read: bool, write: bool, ) -> IncodeResult<u32>
Set memory watchpoint
Sourcepub fn list_breakpoints(&self) -> IncodeResult<Vec<BreakpointInfo>>
pub fn list_breakpoints(&self) -> IncodeResult<Vec<BreakpointInfo>>
List all breakpoints
Sourcepub fn enable_breakpoint(&self, breakpoint_id: u32) -> IncodeResult<bool>
pub fn enable_breakpoint(&self, breakpoint_id: u32) -> IncodeResult<bool>
Enable breakpoint by ID
Sourcepub fn disable_breakpoint(&self, breakpoint_id: u32) -> IncodeResult<bool>
pub fn disable_breakpoint(&self, breakpoint_id: u32) -> IncodeResult<bool>
Disable breakpoint by ID
Sourcepub fn set_conditional_breakpoint(
&self,
location: &str,
condition: &str,
) -> IncodeResult<u32>
pub fn set_conditional_breakpoint( &self, location: &str, condition: &str, ) -> IncodeResult<u32>
Set conditional breakpoint
Sourcepub fn set_breakpoint_commands(
&self,
breakpoint_id: u32,
commands: &[String],
) -> IncodeResult<bool>
pub fn set_breakpoint_commands( &self, breakpoint_id: u32, commands: &[String], ) -> IncodeResult<bool>
Set breakpoint commands (actions to execute when hit)
Sourcepub fn delete_breakpoint(&self, breakpoint_id: u32) -> IncodeResult<()>
pub fn delete_breakpoint(&self, breakpoint_id: u32) -> IncodeResult<()>
Delete breakpoint by ID
Sourcepub fn get_backtrace(&self) -> IncodeResult<Vec<String>>
pub fn get_backtrace(&self) -> IncodeResult<Vec<String>>
Get backtrace
Sourcepub fn select_frame(&mut self, frame_index: u32) -> IncodeResult<FrameInfo>
pub fn select_frame(&mut self, frame_index: u32) -> IncodeResult<FrameInfo>
Select specific stack frame by index
Sourcepub fn get_frame_info(
&self,
frame_index: Option<u32>,
) -> IncodeResult<FrameInfo>
pub fn get_frame_info( &self, frame_index: Option<u32>, ) -> IncodeResult<FrameInfo>
Get information about current or specific frame
Sourcepub fn read_memory(&self, address: u64, size: usize) -> IncodeResult<Vec<u8>>
pub fn read_memory(&self, address: u64, size: usize) -> IncodeResult<Vec<u8>>
Read memory at address
Sourcepub fn disassemble(&self, address: u64, count: u32) -> IncodeResult<Vec<String>>
pub fn disassemble(&self, address: u64, count: u32) -> IncodeResult<Vec<String>>
Disassemble instructions at address
Sourcepub fn write_memory(&self, address: u64, data: &[u8]) -> IncodeResult<usize>
pub fn write_memory(&self, address: u64, data: &[u8]) -> IncodeResult<usize>
Write data to memory at address
Sourcepub fn search_memory(
&self,
pattern: &[u8],
start_address: Option<u64>,
search_size: Option<usize>,
) -> IncodeResult<Vec<u64>>
pub fn search_memory( &self, pattern: &[u8], start_address: Option<u64>, search_size: Option<usize>, ) -> IncodeResult<Vec<u64>>
Search for byte patterns in memory
Sourcepub fn get_memory_regions(&self) -> IncodeResult<Vec<MemoryRegion>>
pub fn get_memory_regions(&self) -> IncodeResult<Vec<MemoryRegion>>
Get memory regions and their permissions
Sourcepub fn dump_memory_to_file(
&self,
address: u64,
size: usize,
file_path: &str,
) -> IncodeResult<usize>
pub fn dump_memory_to_file( &self, address: u64, size: usize, file_path: &str, ) -> IncodeResult<usize>
Dump memory region to file
Sourcepub fn get_memory_map(&self) -> IncodeResult<MemoryMap>
pub fn get_memory_map(&self) -> IncodeResult<MemoryMap>
Get detailed memory map with segments
Sourcepub fn get_frame_variables(
&self,
frame_index: Option<u32>,
include_arguments: bool,
) -> IncodeResult<Vec<Variable>>
pub fn get_frame_variables( &self, frame_index: Option<u32>, include_arguments: bool, ) -> IncodeResult<Vec<Variable>>
Get frame variables (local variables in current frame)
Sourcepub fn get_frame_arguments(
&self,
frame_index: Option<u32>,
) -> IncodeResult<Vec<Variable>>
pub fn get_frame_arguments( &self, frame_index: Option<u32>, ) -> IncodeResult<Vec<Variable>>
Get frame arguments (function parameters)
Sourcepub fn evaluate_in_frame(
&self,
frame_index: Option<u32>,
expression: &str,
) -> IncodeResult<String>
pub fn evaluate_in_frame( &self, frame_index: Option<u32>, expression: &str, ) -> IncodeResult<String>
Evaluate expression in specific frame context
Sourcepub fn get_variables(
&self,
scope: Option<&str>,
filter: Option<&str>,
) -> IncodeResult<Vec<Variable>>
pub fn get_variables( &self, scope: Option<&str>, filter: Option<&str>, ) -> IncodeResult<Vec<Variable>>
Get variables in current scope (combining local and global)
Sourcepub fn get_global_variables(
&self,
module_filter: Option<&str>,
) -> IncodeResult<Vec<Variable>>
pub fn get_global_variables( &self, module_filter: Option<&str>, ) -> IncodeResult<Vec<Variable>>
Get global variables
Sourcepub fn get_variable_info(
&self,
variable_name: &str,
) -> IncodeResult<VariableInfo>
pub fn get_variable_info( &self, variable_name: &str, ) -> IncodeResult<VariableInfo>
Get detailed variable information
Sourcepub fn evaluate_expression(&self, expression: &str) -> IncodeResult<String>
pub fn evaluate_expression(&self, expression: &str) -> IncodeResult<String>
Evaluate expression
Sourcepub fn list_threads(&self) -> IncodeResult<Vec<ThreadInfo>>
pub fn list_threads(&self) -> IncodeResult<Vec<ThreadInfo>>
Get thread list
Sourcepub fn get_registers(
&self,
thread_id: Option<u32>,
_include_metadata: bool,
) -> IncodeResult<RegisterState>
pub fn get_registers( &self, thread_id: Option<u32>, _include_metadata: bool, ) -> IncodeResult<RegisterState>
Get register values for current thread/frame
Sourcepub fn set_register(
&mut self,
register_name: &str,
value: u64,
_thread_id: Option<u32>,
) -> IncodeResult<bool>
pub fn set_register( &mut self, register_name: &str, value: u64, _thread_id: Option<u32>, ) -> IncodeResult<bool>
Set register value
Sourcepub fn get_register_info(
&self,
register_name: &str,
thread_id: Option<u32>,
) -> IncodeResult<RegisterInfo>
pub fn get_register_info( &self, register_name: &str, thread_id: Option<u32>, ) -> IncodeResult<RegisterInfo>
Get detailed register information
Sourcepub fn save_register_state(
&self,
thread_id: Option<u32>,
) -> IncodeResult<RegisterState>
pub fn save_register_state( &self, thread_id: Option<u32>, ) -> IncodeResult<RegisterState>
Save current register state
Sourcepub fn get_source_code(
&self,
address: Option<u64>,
context_lines: u32,
) -> IncodeResult<SourceCode>
pub fn get_source_code( &self, address: Option<u64>, context_lines: u32, ) -> IncodeResult<SourceCode>
Get source code around current location
Sourcepub fn list_functions(
&self,
module_filter: Option<&str>,
) -> IncodeResult<Vec<FunctionInfo>>
pub fn list_functions( &self, module_filter: Option<&str>, ) -> IncodeResult<Vec<FunctionInfo>>
List all functions with addresses
Sourcepub fn get_line_info(&self, address: u64) -> IncodeResult<SourceLocation>
pub fn get_line_info(&self, address: u64) -> IncodeResult<SourceLocation>
Get source line information for address
Sourcepub fn get_debug_info(&self) -> IncodeResult<DebugInfo>
pub fn get_debug_info(&self) -> IncodeResult<DebugInfo>
Get debug information summary
Sourcepub fn select_thread(&mut self, thread_id: u32) -> IncodeResult<ThreadInfo>
pub fn select_thread(&mut self, thread_id: u32) -> IncodeResult<ThreadInfo>
Select thread for debugging
Sourcepub fn execute_lldb_command(&self, command: &str) -> IncodeResult<String>
pub fn execute_lldb_command(&self, command: &str) -> IncodeResult<String>
Execute raw LLDB command (placeholder implementation)
Sourcepub fn list_processes(
&self,
filter: Option<&str>,
include_system: bool,
) -> IncodeResult<Vec<ProcessInfo>>
pub fn list_processes( &self, filter: Option<&str>, include_system: bool, ) -> IncodeResult<Vec<ProcessInfo>>
List all processes on the system
Sourcepub fn cleanup(&mut self) -> IncodeResult<()>
pub fn cleanup(&mut self) -> IncodeResult<()>
Cleanup resources
Source§impl LldbManager
impl LldbManager
Sourcepub fn execute_command(&self, command: &str) -> IncodeResult<String>
pub fn execute_command(&self, command: &str) -> IncodeResult<String>
Execute raw LLDB command and return output
Sourcepub fn list_modules(
&self,
filter_name: Option<&str>,
include_debug_info: bool,
) -> IncodeResult<Vec<ModuleInfo>>
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
Sourcepub fn get_platform_info(&self) -> IncodeResult<PlatformInfo>
pub fn get_platform_info(&self) -> IncodeResult<PlatformInfo>
Get comprehensive platform information
Sourcepub fn get_lldb_version(
&self,
include_build_info: bool,
) -> IncodeResult<LldbVersionInfo>
pub fn get_lldb_version( &self, include_build_info: bool, ) -> IncodeResult<LldbVersionInfo>
Get LLDB version and build information
Sourcepub fn get_target_info(&self) -> IncodeResult<TargetInfo>
pub fn get_target_info(&self) -> IncodeResult<TargetInfo>
Get comprehensive target information
Sourcepub fn set_lldb_settings(
&mut self,
setting_name: &str,
value: &str,
) -> IncodeResult<String>
pub fn set_lldb_settings( &mut self, setting_name: &str, value: &str, ) -> IncodeResult<String>
Set LLDB settings (configuration parameters)
Sourcepub fn set_variable(
&mut self,
variable_name: &str,
value: &str,
) -> IncodeResult<String>
pub fn set_variable( &mut self, variable_name: &str, value: &str, ) -> IncodeResult<String>
Set variable value during debugging
Sourcepub fn lookup_symbol(&self, symbol_name: &str) -> IncodeResult<SymbolInfo>
pub fn lookup_symbol(&self, symbol_name: &str) -> IncodeResult<SymbolInfo>
Lookup symbol information by name
Sourcepub fn analyze_crash(
&self,
core_file_path: Option<&str>,
) -> IncodeResult<CrashAnalysis>
pub fn analyze_crash( &self, core_file_path: Option<&str>, ) -> IncodeResult<CrashAnalysis>
Analyze crash dump and provide detailed crash information
Sourcepub fn generate_core_dump(&self, output_path: &str) -> IncodeResult<String>
pub fn generate_core_dump(&self, output_path: &str) -> IncodeResult<String>
Generate core dump file for current process state