public GenericParamInfo GetGenericParameter(TargetMemoryAccess memory, TargetAddress address) { int addr_size = memory.TargetMemoryInfo.TargetAddressSize; TargetReader reader = new TargetReader( memory.ReadMemory(address, 4 * addr_size + 4)); TargetAddress container = reader.ReadAddress(); TargetAddress klass = reader.ReadAddress(); TargetAddress name_addr = reader.ReadAddress(); reader.BinaryReader.ReadInt16(); /* flags */ int pos = reader.BinaryReader.ReadInt16(); string name; if (!name_addr.IsNull) { name = memory.ReadString(name_addr); } else { name = String.Format("!{0}", pos); } return(new GenericParamInfo(container, klass, name, pos)); }
public GenericParamInfo GetGenericParameter(TargetMemoryAccess memory, TargetAddress address) { int addr_size = memory.TargetMemoryInfo.TargetAddressSize; TargetReader reader = new TargetReader ( memory.ReadMemory (address, 4 * addr_size + 4)); TargetAddress container = reader.ReadAddress (); TargetAddress klass = reader.ReadAddress (); TargetAddress name_addr = reader.ReadAddress (); reader.BinaryReader.ReadInt16 (); /* flags */ int pos = reader.BinaryReader.ReadInt16 (); string name; if (!name_addr.IsNull) name = memory.ReadString (name_addr); else name = String.Format ("!{0}", pos); return new GenericParamInfo (container, klass, name, pos); }