internal TargetObject GetField(TargetMemoryAccess target, TargetLocation location, NativeFieldInfo field) { TargetLocation field_loc = location.GetLocationAtOffset(field.Offset); if (field.Type.IsByRef) { field_loc = field_loc.GetDereferencedLocation(); } if (!field.Type.IsByRef && field.IsBitfield) { field_loc = new BitfieldTargetLocation( field_loc, field.BitOffset, field.BitSize); } return(field.Type.GetObject(target, field_loc)); }
internal void SetField(TargetMemoryAccess target, TargetLocation location, NativeFieldInfo field, TargetObject obj) { TargetLocation field_loc = location.GetLocationAtOffset(field.Offset); if (field.Type.IsByRef) { field_loc = field_loc.GetDereferencedLocation(); } if (!field.Type.IsByRef && field.IsBitfield) { field_loc = new BitfieldTargetLocation( field_loc, field.BitOffset, field.BitSize); } // field.Type.SetObject (field_loc, obj); throw new NotImplementedException(); }
internal TargetObject GetField(TargetMemoryAccess target, TargetStructObject instance, TargetFieldInfo field) { TargetLocation field_loc = instance.Location.GetLocationAtOffset(field.Offset); if (field.Type.IsByRef) { field_loc = field_loc.GetDereferencedLocation(); } NativeFieldInfo nfield = (NativeFieldInfo)field; if (!field.Type.IsByRef && nfield.IsBitfield) { field_loc = new BitfieldTargetLocation( field_loc, nfield.BitOffset, nfield.BitSize); } return(field.Type.GetObject(target, field_loc)); }
public override void SetField(Thread thread, TargetStructObject instance, TargetFieldInfo field, TargetObject value) { TargetLocation field_loc = instance.Location.GetLocationAtOffset(field.Offset); if (field.Type.IsByRef) { field_loc = field_loc.GetDereferencedLocation(); } NativeFieldInfo nfield = (NativeFieldInfo)field; if (!field.Type.IsByRef && nfield.IsBitfield) { field_loc = new BitfieldTargetLocation( field_loc, nfield.BitOffset, nfield.BitSize); } // field.Type.SetObject (field_loc, value); throw new NotImplementedException(); }
internal NativeClass(NativeStructType type, NativeFieldInfo[] fields) { this.type = type; this.fields = fields != null ? fields : new NativeFieldInfo [0]; }
protected override void PopulateType() { if (!abbrev.HasChildren) return; ArrayList list = new ArrayList (); foreach (Die child in Children) { DieMember member = child as DieMember; if ((member == null) || !member.Resolve (this)) continue; TargetType mtype = member.Type; if (mtype == null) mtype = (TargetType) language.VoidType; NativeFieldInfo field; if (member.IsBitfield) field = new NativeFieldInfo ( mtype, member.Name, list.Count, member.DataOffset, member.BitOffset, member.BitSize); else field = new NativeFieldInfo ( mtype, member.Name, list.Count, member.DataOffset); list.Add (field); } fields = new NativeFieldInfo [list.Count]; list.CopyTo (fields); type.SetFields (fields); }
internal void SetFields(NativeFieldInfo[] fields) { this.fields = fields; }
internal void SetField(TargetMemoryAccess target, TargetLocation location, NativeFieldInfo field, TargetObject obj) { TargetLocation field_loc = location.GetLocationAtOffset (field.Offset); if (field.Type.IsByRef) field_loc = field_loc.GetDereferencedLocation (); if (!field.Type.IsByRef && field.IsBitfield) field_loc = new BitfieldTargetLocation ( field_loc, field.BitOffset, field.BitSize); // field.Type.SetObject (field_loc, obj); throw new NotImplementedException (); }
internal TargetObject GetField(TargetMemoryAccess target, TargetLocation location, NativeFieldInfo field) { TargetLocation field_loc = location.GetLocationAtOffset (field.Offset); if (field.Type.IsByRef) field_loc = field_loc.GetDereferencedLocation (); if (!field.Type.IsByRef && field.IsBitfield) field_loc = new BitfieldTargetLocation ( field_loc, field.BitOffset, field.BitSize); return field.Type.GetObject (target, field_loc); }
internal NativeStructType(Language language, string name, NativeFieldInfo[] fields, int size) : this(language, name, size) { this.fields = fields; }