diff --git a/artiq/firmware/ksupport/eh_artiq.rs b/artiq/firmware/ksupport/eh_artiq.rs index 68994af0a..190ee735f 100644 --- a/artiq/firmware/ksupport/eh_artiq.rs +++ b/artiq/firmware/ksupport/eh_artiq.rs @@ -388,29 +388,3 @@ pub extern "C-unwind" fn test_exception_id_sync(exn_id: u32) { }; unsafe { raise(&exn) }; } - -/// Takes as input exception id from host -/// Generates a new exception with: -/// * `id` set to `exn_id` -/// * `message` set to corresponding exception name from `EXCEPTION_ID_LOOKUP` -/// -/// The message is matched on host to ensure correct exception is being referred -/// This test checks the synchronization of exception ids for runtime errors -#[no_mangle] -pub extern "C-unwind" fn test_exception_id_sync(exn_id: u32) { - let message = EXCEPTION_ID_LOOKUP - .iter() - .find_map(|&(name, id)| if id == exn_id { Some(name) } else { None }) - .unwrap_or("unallocated internal exception id"); - - let exn = Exception { - id: exn_id, - file: file!().as_c_slice(), - line: 0, - column: 0, - function: "test_exception_id_sync".as_c_slice(), - message: message.as_c_slice(), - param: [0, 0, 0] - }; - unsafe { raise(&exn) }; -}