예제 #1
0
        // Construct an instance of IEnumDebugPropertyInfo2 for the locals collection only.
        private void CreateLocalProperties(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject, bool hex)
        {
            // bool hex = SquirrelDebuggerEngine.SquirrelDebuggerEnginePackage.HexDisplayMode;
            List <SquirrelDebugObject> locals = sqframe.Locals;

            elementsReturned = (uint)locals.Count;
            DEBUG_PROPERTY_INFO[] propInfo = new DEBUG_PROPERTY_INFO[locals.Count];

            for (int i = 0; i < propInfo.Length; i++)
            {
                AD7Property property = new AD7Property(locals[i]);
                propInfo[i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD, hex);
            }

            enumObject = new AD7PropertyInfoEnum(propInfo);
        }
예제 #2
0
        // Construct an instance of IEnumDebugPropertyInfo2 for the combined locals and parameters.
        private void CreateLocalsPlusArgsProperties(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject, bool hex)
        {
            // bool hex = SquirrelDebuggerEngine.SquirrelDebuggerEnginePackage.HexDisplayMode;

            elementsReturned = 0;

            int localsLength = 0;
            List <SquirrelDebugObject> locals = sqframe.Locals;

            if (locals != null)
            {
                localsLength      = locals.Count;
                elementsReturned += (uint)localsLength;
            }

            /*if (m_parameters != null)
             * {
             *  elementsReturned += (uint)m_parameters.Length;
             * }*/
            DEBUG_PROPERTY_INFO[] propInfo = new DEBUG_PROPERTY_INFO[elementsReturned];

            if (sqframe.Locals != null)
            {
                for (int i = 0; i < sqframe.Locals.Count; i++)
                {
                    AD7Property property = new AD7Property(locals[i]);
                    propInfo[i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD, hex);
                }
            }

            /*if (m_parameters != null)
             * {
             *  for (int i = 0; i < m_parameters.Length; i++)
             *  {
             *      AD7Property property = new AD7Property(m_parameters[i]);
             *      propInfo[localsLength + i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
             *  }
             * }*/

            enumObject = new AD7PropertyInfoEnum(propInfo);
        }