GetAddress() private method

private GetAddress ( TargetMemoryAccess target ) : TargetAddress
target TargetMemoryAccess
return TargetAddress
示例#1
0
        protected void FormatObjectRecursed(Thread target, TargetObject obj, bool recursed)
        {
            try {
                if (DisplayFormat == DisplayFormat.Address) {
                    if (obj.HasAddress)
                        Append (obj.GetAddress (target).ToString ());
                    else
                        Append ("<cannot get address>");
                    return;
                } else if (obj.HasAddress && obj.GetAddress (target).IsNull) {
                    Append ("null");
                    return;
                } else if (!recursed) {
                    FormatObject (target, obj);
                    return;
                }

                switch (obj.Kind) {
                case TargetObjectKind.Enum:
                    FormatObject (target, obj);
                    break;

                case TargetObjectKind.Fundamental:
                    TargetFundamentalObject fobj = (TargetFundamentalObject) obj;
                    object value = fobj.GetObject (target);
                    Format (target, value);
                    break;

                case TargetObjectKind.Nullable:
                    FormatNullable (target, (TargetNullableObject) obj);
                    break;

                default:
                    PrintObject (target, obj);
                    break;
                }
            } catch {
                Append ("<cannot display object>");
            }
        }