pub(super) fn try_cal(ctx: &mut ProgContext, val: &mut Value) {
    let val = val.inner_val_mut().unwrap(); // Can't be null ptr.
    let mut parent_map: Option<FxHashMap<*const Value, &Value>> = None;

    match &mut val.kind {
        ValueKind::Scalar(scalar_val_ref) => {
            if let Some(len_info) = val.ty.len_info() {
                try_cal_syscall_param_len(ctx, scalar_val_ref, len_info)
            }
        }
        ValueKind::Group { .. } | ValueKind::Union { .. } => iter_struct_val(val, |v| {
            if parent_map.is_none() {
                parent_map = Some(build_parent_map(val));
            }
            handle_struct(ctx, v, parent_map.as_ref().unwrap())
        }),
        _ => unreachable!(),
    }
}
/// Try to calculate value of len type of 'val'
/// Insert ptr of value storage and leninfo to ctx if the calculation failed.
Try to calculate value of len type of 'val'
Insert ptr of value storage and leninfo to ctx if the calculation failed.
Try to calculate value of len type of ' val ' Insert ptr of value storage and leninfo to ctx if the calculation failed .
pub(super) fn try_cal(ctx: &mut ProgContext, val: &mut Value) {
    let val = val.inner_val_mut().unwrap(); // Can't be null ptr.
    let mut parent_map: Option<FxHashMap<*const Value, &Value>> = None;
    match &mut val.kind {
        ValueKind::Scalar(scalar_val_ref) => {
            if let Some(len_info) = val.ty.len_info() {
                try_cal_syscall_param_len(ctx, scalar_val_ref, len_info)
            }
        }
        ValueKind::Group { .. } | ValueKind::Union { .. } => iter_struct_val(val, |v| {
            if parent_map.is_none() {
                parent_map = Some(build_parent_map(val));
            }
            handle_struct(ctx, v, parent_map.as_ref().unwrap())
        }),
        _ => unreachable!(),
    }
}
pub ( super ) fn try_cal ( ctx : & mut ProgContext , val : & mut Value ) { let val = val . inner_val_mut ( ) . unwrap ( ) ; // Can't be null ptr. let mut parent_map : Option < FxHashMap < * const Value , & Value > > = None ; match & mut val . kind { ValueKind :: Scalar ( scalar_val_ref ) => { if let Some ( len_info ) = val . ty . len_info ( ) { try_cal_syscall_param_len ( ctx , scalar_val_ref , len_info ) } } ValueKind :: Group { .. } | ValueKind :: Union { .. } => iter_struct_val ( val , | v | { if parent_map . is_none ( ) { parent_map = Some ( build_parent_map ( val ) ) ; } handle_struct ( ctx , v , parent_map . as_ref ( ) . unwrap ( ) ) } ) , _ => unreachable ! ( ) , } }
Try to calculate value of len type of 'val'
Insert ptr of value storage and leninfo to ctx if the calculation failed.
Try to calculate value of len type of ' val ' Insert ptr of value storage and leninfo to ctx if the calculation failed .
ctx
&mut ProgContext
val
&mut Value
ctx
&mut ProgContext
val
&mut Value