fn wait_for_gdb_connection(port: u16) -> Result<GdbSerial, KError> {
    let gdb = GdbSerial::new(port);

    info!("Waiting for a GDB connection (I/O port {:#x})...", port);
    // If you modify the next line, you also need to adjust the corresponding
    // line in the `s02_gdb` integration test:
    info!("Use `target remote localhost:1234` in gdb to connect.");

    // Block until a GDB client connects:
    while !gdb.can_read() {
        core::hint::spin_loop();
    }

    // If you modify the next line, you also need to adjust the corresponding
    // line in the `s02_gdb` integration test:
    info!("Debugger connected.");
    Ok(gdb)
}
/// Wait until a GDB connection is established (e.g., until we can read
/// something from the serial line).
Wait until a GDB connection is established .
Wait until a GDB connection is established .
fn wait_for_gdb_connection(port: u16) -> Result<GdbSerial, KError> {
    let gdb = GdbSerial::new(port);
    info!("Waiting for a GDB connection (I/O port {:#x})...", port);
    // If you modify the next line, you also need to adjust the corresponding
    // line in the `s02_gdb` integration test:
    info!("Use `target remote localhost:1234` in gdb to connect.");
    // Block until a GDB client connects:
    while !gdb.can_read() {
        core::hint::spin_loop();
    }
    // If you modify the next line, you also need to adjust the corresponding
    // line in the `s02_gdb` integration test:
    info!("Debugger connected.");
    Ok(gdb)
}
fn wait_for_gdb_connection ( port : u16 ) -> Result < GdbSerial , KError > { let gdb = GdbSerial :: new ( port ) ; info ! ( " " port ) ; // If you modify the next line, you also need to adjust the corresponding // line in the `s02_gdb` integration test: info ! ( " " ) ; // Block until a GDB client connects: while ! gdb . can_read ( ) { core :: hint :: spin_loop ( ) ; } // If you modify the next line, you also need to adjust the corresponding // line in the `s02_gdb` integration test: info ! ( " " ) ; Ok ( gdb ) }
Wait until a GDB connection is established (e.g., until we can read
something from the serial line).
Wait until a GDB connection is established ( e . g . until we can read something from the serial line ) .
port
u16
port
u16