Example #1
0
        //this constructor is private because it should only be used internally to create children
        private VariableInformation(TupleValue results, VariableInformation parent, string name = null)
            : this(parent._ctx, parent._engine, parent.Client)
        {
            TypeName = results.TryFindString("type");
            Value    = results.TryFindString("value");
            Name     = name ?? results.FindString("exp");
            if (results.Contains("dynamic"))
            {
                CountChildren = 1;
            }
            else
            {
                CountChildren = results.FindUint("numchild");
            }
            if (results.Contains("displayhint"))
            {
                DisplayHint = results.FindString("displayhint");
            }
            if (results.Contains("attributes"))
            {
                if (results.FindString("attributes") == "noneditable")
                {
                    _isReadonly = true;
                }
                _attribsFetched = true;
            }

            int index;

            if (!results.Contains("value") && (Name == TypeName || Name.Contains("::")))
            {
                // base classes show up with no value and exp==type
                // (sometimes underlying debugger does not follow this convention, when using typedefs in templated types so look for "::" in the field name too)
                Name             = TypeName + " (base)";
                Value            = TypeName;
                VariableNodeType = NodeType.BaseClass;
            }
            else if (Int32.TryParse(this.Name, System.Globalization.NumberStyles.Integer, null, out index)) // array element
            {
                Name             = '[' + this.Name + ']';
                VariableNodeType = NodeType.ArrayElement;
            }
            else if (this.Name.Length > 2 && this.Name[0] == '[' && this.Name[this.Name.Length - 1] == ']')
            {
                VariableNodeType = NodeType.ArrayElement;
            }
            else
            {
                _strippedName    = Name;
                VariableNodeType = NodeType.Field;
            }

            _internalName          = results.FindString("name");
            IsChild                = true;
            _format                = parent._format; // inherit formatting
            _parent                = parent.VariableNodeType == NodeType.AccessQualifier ? parent._parent : parent;
            this.PropertyInfoFlags = parent.PropertyInfoFlags;
        }
Example #2
0
        }                                                           // name as it appears in the debug symbols

        internal BoundBreakpoint(PendingBreakpoint parent, TupleValue bindinfo)
        {
            this.Addr             = bindinfo.TryFindAddr("addr") ?? 0;
            this.FunctionName     = bindinfo.TryFindString("func");
            this.Enabled          = bindinfo.TryFindString("enabled") == "n" ? false : true;
            this.HitCount         = 0;
            this.CompiledFileName = bindinfo.Contains("fullname") ? bindinfo.FindString("fullname") : bindinfo.TryFindString("file");
            this.Number           = bindinfo.Contains("number") ? bindinfo.FindString("number") : parent.Number;
            _parent       = parent;
            _textPosition = MITextPosition.TryParse(parent.DebuggedProcess, bindinfo);
        }
Example #3
0
        //this constructor is private because it should only be used internally to create children
        private VariableInformation(TupleValue results, VariableInformation parent)
            : this(parent._ctx, parent._engine, parent.Client)
        {
            TypeName      = results.TryFindString("type");
            Value         = results.TryFindString("value");
            Name          = results.FindString("exp");
            CountChildren = results.FindUint("numchild");
            int index;

            if (!results.Contains("value") && (Name == TypeName || Name.Contains("::")))
            {
                // base classes show up with no value and exp==type
                // (sometimes underlying debugger does not follow this convention, when using typedefs in templated types so look for "::" in the field name too)
                Name             = "base";
                Value            = TypeName;
                VariableNodeType = NodeType.BaseClass;
            }
            else if (Int32.TryParse(this.Name, System.Globalization.NumberStyles.Integer, null, out index)) // array element
            {
                Name             = '[' + this.Name + ']';
                VariableNodeType = NodeType.ArrayElement;
            }
            else
            {
                _strippedName    = Name;
                VariableNodeType = NodeType.Field;
            }

            _internalName = results.FindString("name");
            IsChild       = true;
            _format       = parent._format; // inherit formatting
            _parent       = parent.VariableNodeType == NodeType.AccessQualifier ? parent._parent : parent;
        }