//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; }
//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; }
private ThreadContext CreateContext(TupleValue frame) { ulong? pc = frame.TryFindAddr("addr"); MITextPosition textPosition = MITextPosition.TryParse(this._debugger, frame); string func = frame.TryFindString("func"); uint level = frame.FindUint("level"); string from = frame.TryFindString("from"); return(new ThreadContext(pc, textPosition, func, level, from)); }
private ThreadContext CreateContext(TupleValue frame) { ulong?pc = frame.TryFindAddr("addr"); // don't report source line info for modules marked as IgnoreSource bool ignoreSource = false; if (pc != null) { var module = _debugger.FindModule(pc.Value); if (module != null && module.IgnoreSource) { ignoreSource = true; } } MITextPosition textPosition = !ignoreSource?MITextPosition.TryParse(this._debugger, frame) : null; string func = frame.TryFindString("func"); uint level = frame.FindUint("level"); string from = frame.TryFindString("from"); return(new ThreadContext(pc, textPosition, func, level, from)); }
private ThreadContext CreateContext(TupleValue frame) { ulong? pc = frame.TryFindAddr("addr"); MITextPosition textPosition = MITextPosition.TryParse(frame); string func = frame.TryFindString("func"); uint level = frame.FindUint("level"); string from = frame.TryFindString("from"); return new ThreadContext(pc, textPosition, func, level, from); }