Ejemplo n.º 1
0
        /// <summary>
        /// Gets the value of a register
        /// WARNING!!! VALUE MUST BE SIGN EXTENDED ON 32-BIT SYSTEMS!!!
        /// </summary>
        /// <param name="registerIndex">Index of the register</param>
        /// <param name="value">DEBUG_VALUE struct to receive the value</param>
        /// <returns>HRESULT</returns>
        public int GetRegisterValueFromFrameContext(uint registerIndex, out DEBUG_VALUE value)
        {
            int hr;

            uint[] indexArray = new uint[1];
            DEBUG_VALUE[] debugValues = new DEBUG_VALUE[1];

            indexArray[0] = registerIndex;

            hr = DebugRegisters.GetValues2((uint)DEBUG_REGSRC.FRAME, 1, indexArray, 0, debugValues);

            value = debugValues[0];

            return hr;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the value of a register
        /// WARNING!!! VALUE MUST BE SIGN EXTENDED ON 32-BIT SYSTEMS!!!
        /// </summary>
        /// <param name="registerName">Name of the register (case sensitive, normally lower-case)</param>
        /// <param name="value">DEBUG_VALUE struct to receive the value</param>
        /// <returns>HRESULT</returns>
        public int GetRegisterValueFromFrameContext(string registerName, out DEBUG_VALUE value)
        {
            int hr;

            UInt32 registerIndex;
            hr = GetRegisterIndex(registerName, out registerIndex);
            if (FAILED(hr))
            {
                value = default(DEBUG_VALUE);
                return hr;
            }

            uint[] indexArray = new uint[1];
            DEBUG_VALUE[] debugValues = new DEBUG_VALUE[1];

            indexArray[0] = registerIndex;

            hr = DebugRegisters.GetValues2((uint) DEBUG_REGSRC.FRAME, 1, indexArray, 0, debugValues);

            value = debugValues[0];

            return hr;
        }
Ejemplo n.º 3
0
		/// <summary>
		/// Gets the value of a register
		/// WARNING!!! VALUE MUST BE SIGN EXTENDED ON 32-BIT SYSTEMS!!!
		/// </summary>
		/// <param name="registerName">Name of the register (case sensitive, normally lower-case)</param>
		/// <param name="value">DEBUG_VALUE struct to receive the value</param>
		/// <returns>HRESULT</returns>
		public int GetRegisterValue(string registerName, out DEBUG_VALUE value)
		{
			int hr;

			UInt32 registerIndex;
			hr = GetRegisterIndex(registerName, out registerIndex);
			if (FAILED(hr))
			{
				value = default(DEBUG_VALUE);
				return hr;
			}

			return DebugRegisters.GetValue(registerIndex, out value);
		}
Ejemplo n.º 4
0
        /// <summary>
        /// Gets the value of a register
        /// WARNING!!! VALUE MUST BE SIGN EXTENDED ON 32-BIT SYSTEMS!!!
        /// </summary>
        /// <param name="registerName">Name of the register (case sensitive, normally lower-case)</param>
        /// <param name="FrameNum">Frame Number/param>
        /// <param name="value">DEBUG_VALUE struct to receive the value</param>
        /// <returns>HRESULT</returns>
        public int GetRegisterValueFromFrameContext(string registerName, uint FrameNum, out DEBUG_VALUE value)
        {
            int hr;

            uint currentframe;
            ExpressionToUInt32("@$frame", out currentframe);
            RunCommandSilent(String.Format(".frame 0x{0:x}", FrameNum));
            hr = GetRegisterValueFromFrameContext(registerName, out value);
            RunCommandSilent(String.Format(".frame 0x{0:x}", currentframe));

            return hr;
        }
Ejemplo n.º 5
0
		/// <summary>
		/// Gets the value of a register
		/// WARNING!!! VALUE MUST BE SIGN EXTENDED ON 32-BIT SYSTEMS!!!
		/// </summary>
		/// <param name="registerIndex">Index of the register</param>
		/// <param name="value">DEBUG_VALUE struct to receive the value</param>
		/// <returns>HRESULT</returns>
		public int GetRegisterValue(uint registerIndex, out DEBUG_VALUE value)
		{
			return DebugRegisters.GetValue(registerIndex, out value);
		}