pub struct KernelDebugger { /* private fields */ }Expand description
Top-level kernel debugging manager.
Create one per debugging session group. It holds global breakpoints and
watchpoints and spawns DebugSession instances per kernel launch.
Implementations§
Source§impl KernelDebugger
impl KernelDebugger
Sourcepub fn new(config: KernelDebugConfig) -> Self
pub fn new(config: KernelDebugConfig) -> Self
Create a new kernel debugger with the given configuration.
Sourcepub fn attach(&mut self, kernel_name: &str) -> CudaResult<DebugSession>
pub fn attach(&mut self, kernel_name: &str) -> CudaResult<DebugSession>
Attach the debugger to a kernel launch, returning a new debug session.
On macOS this always succeeds with a synthetic (empty) session because no actual GPU driver is available.
§Errors
Returns CudaError::InvalidValue if kernel_name is empty.
Sourcepub fn set_breakpoint(&mut self, line: u32) -> u32
pub fn set_breakpoint(&mut self, line: u32) -> u32
Set a breakpoint at a PTX source line. Returns the breakpoint ID.
Sourcepub fn remove_breakpoint(&mut self, bp_id: u32) -> bool
pub fn remove_breakpoint(&mut self, bp_id: u32) -> bool
Remove a breakpoint by ID. Returns true if it was found and removed.
Sourcepub fn watchpoint(
&mut self,
address: u64,
size: usize,
watch_type: WatchType,
) -> u32
pub fn watchpoint( &mut self, address: u64, size: usize, watch_type: WatchType, ) -> u32
Set a memory watchpoint. Returns the watchpoint ID.
Sourcepub fn config(&self) -> &KernelDebugConfig
pub fn config(&self) -> &KernelDebugConfig
Returns a reference to the current debug configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KernelDebugger
impl RefUnwindSafe for KernelDebugger
impl Send for KernelDebugger
impl Sync for KernelDebugger
impl Unpin for KernelDebugger
impl UnsafeUnpin for KernelDebugger
impl UnwindSafe for KernelDebugger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more