Skip to main content

run_gdb_mode

Function run_gdb_mode 

Source
pub fn run_gdb_mode(
    cargo_cwd: &Path,
    current_package: Option<&str>,
    profile_feature: &str,
    profile_dir: &Path,
    test_filter: Option<&str>,
) -> Result<()>
Expand description

Loose-mode entry point. Stands up the driver, then runs cargo test with ANCHOR_GDB_SOCKET and --test-threads=1.

--test-threads=1 is forced because VM_DEBUG_PORT is a process-wide env var and sbpf reads it lazily inside each EbpfVm::new — two test threads each running svm() with different ports would have the last set_var win and both VMs collide on bind. Proper per-thread ports would need sbpf to accept the port through a non-env channel (fork).