Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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);
        }