Author: toshok
Date: 2005-05-02 04:00:53 -0400 (Mon, 02 May 2005)
New Revision: 43866

Modified:
   trunk/debugger/ChangeLog
   trunk/debugger/backends/mono/MonoArrayType.cs
   trunk/debugger/backends/mono/MonoClassInfo.cs
   trunk/debugger/backends/mono/MonoClassObject.cs
   trunk/debugger/backends/mono/MonoClassType.cs
   trunk/debugger/backends/mono/MonoFunctionType.cs
   trunk/debugger/backends/mono/MonoFunctionTypeInfo.cs
   trunk/debugger/backends/mono/MonoFundamentalType.cs
   trunk/debugger/backends/mono/MonoLanguageBackend.cs
   trunk/debugger/backends/mono/MonoObjectObject.cs
   trunk/debugger/backends/mono/MonoObjectType.cs
   trunk/debugger/backends/mono/MonoOpaqueType.cs
   trunk/debugger/backends/mono/MonoStringType.cs
   trunk/debugger/backends/mono/MonoSymbolFile.cs
   trunk/debugger/backends/mono/MonoType.cs
   trunk/debugger/backends/mono/MonoVariable.cs
   trunk/debugger/backends/native/NativeType.cs
   trunk/debugger/classes/ExceptionCatchPoint.cs
   trunk/debugger/frontend/Command.cs
   trunk/debugger/frontend/Expression.cs
   trunk/debugger/frontend/Main.cs
   trunk/debugger/frontend/ScriptingContext.cs
   trunk/debugger/interfaces/ITargetClassObject.cs
   trunk/debugger/interfaces/ITargetType.cs
Log:
2005-05-02  Chris Toshok  <[EMAIL PROTECTED]>

        * frontend/ScriptingContext.cs (FrameHandle.GetRegister): Resolve
        -> GetTypeInfo.

        * frontend/Main.cs (CommandLineInterpreter.SetupEngine): register
        "l" as an alias for "list".

        * frontend/Expression.cs
        (PointerDereferenceExpression.DoEvaluateVariable): remove
        CurrentObject stuff.
        (ArrayAccessExpression.DoEvaluateVariable): Resolve ->
        GetTypeInfo.
        (CastExpression.TryCurrentCast): same.
        (CastExpression.DoEvaluateVariable): fix an error msg.

        * frontend/Command.cs (PrintExpressionCommand.Execute): nuke
        CurrentObject stuff.
        (PrintTypeCommand): nuke CurrentObject stuff.
        (CatchCommand): make sure to get the TypeInfo for the exception
        type.

        * backends/mono/MonoSymbolFile.cs (VariableInfo..ctor): use
        Report.Debug instead of Console.WriteLine.
        (MonoSymbolFile.AddCoreType): Resolve -> GetTypeInfo.

        * backends/mono/MonoLanguageBackend.cs
        (MonoBuiltinTypeInfo..ctor): Resolve -> GetTypeInfo.
        (MonoLanguageBackend.CreateObject): reimplement.

        * backends/mono/MonoType.cs: Resolve -> GetTypeInfo.
        
        * backends/mono/MonoClassInfo.cs (MonoClassInfo.GetField): Resolve
        -> GetTypeInfo.
        (MonoClassInfo.GetStaticField): same.
        (MonoClassInfo.GetMethod): same.

        * backends/mono/MonoArrayType.cs (MonoArrayType.DoGetTypeInfo):
        Resolve -> GetTypeInfo.

        * backends/mono/MonoStringType.cs
        (MonoStringObject.DoGetTypeInfo): Resolve -> GetTypeInfo.

        * backends/mono/MonoObjectType.cs (MonoObjectType.DoGetTypeInfo):
        Resolve -> GetTypeInfo.

        * backends/mono/MonoClassType.cs (MonoClassType.GetStaticField):
        Resolve -> GetTypeInfo.
        (.GetStaticMethod): same.
        (.DoGetTypeInfo): same.
        (MonoMethodInfo.Get): same.
        (MonoPropertyInfo.Get): same.

        * backends/mono/MonoFunctionTypeInfo.cs
        (MonoFunctionTypeInfo.Invoke): Resolve -> GetTypeInfo.

        * backends/mono/MonoFundamentalType.cs
        (MonoFundamentalType.DoGetTypeInfo): Resolve -> GetTypeInfo.

        * backends/mono/MonoObjectObject.cs
        (MonoObjectObject.GetCurrentType): Resolve -> GetTypeInfo.

        * backends/mono/MonoOpaqueType.cs (MonoOpaqueType.DoGetTypeInfo):
        Resolve -> GetTypeInfo.

        * backends/mono/MonoClassObject.cs: nuke .CurrentObject and
        .GetCurrentObject().

        * backends/mono/MonoFunctionType.cs (MonoFunctionType..ctor):
        remove redundant klass assignment.
        (MonoFunctionType.InvokeStatic): Resolve -> GetTypeInfo.
        (MonoFunctionType.DoGetTypeInfo): same.

        * backends/mono/MonoVariable.cs (MonoVariable.GetObject): Resolve
        -> GetTypeInfo.

        * backends/native/NativeType.cs (NativeType.Resolve): rename
        GetTypeInfo.

        * classes/ExceptionCatchPoint.cs
        (ExceptionCatchPoint.CheckBreakpointHit): track removal of
        ITargetClassObject.CurrentObject.

        * interfaces/ITargetType.cs: rename "Resolve" to "GetTypeInfo".
        I'm sick of "Resolve" being used to mean about 50 different things
        in the debugger code.

        * interfaces/ITargetClassObject.cs: remove CurrentObject.  I'll
        put it back in if someone can tell me what the purpose of it was -
        it's broken currently and removing code that uses it fixes the
        problem.



Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog    2005-05-02 06:58:59 UTC (rev 43865)
+++ trunk/debugger/ChangeLog    2005-05-02 08:00:53 UTC (rev 43866)
@@ -1,3 +1,95 @@
+2005-05-02  Chris Toshok  <[EMAIL PROTECTED]>
+
+       * frontend/ScriptingContext.cs (FrameHandle.GetRegister): Resolve
+       -> GetTypeInfo.
+
+       * frontend/Main.cs (CommandLineInterpreter.SetupEngine): register
+       "l" as an alias for "list".
+
+       * frontend/Expression.cs
+       (PointerDereferenceExpression.DoEvaluateVariable): remove
+       CurrentObject stuff.
+       (ArrayAccessExpression.DoEvaluateVariable): Resolve ->
+       GetTypeInfo.
+       (CastExpression.TryCurrentCast): same.
+       (CastExpression.DoEvaluateVariable): fix an error msg.
+
+       * frontend/Command.cs (PrintExpressionCommand.Execute): nuke
+       CurrentObject stuff.
+       (PrintTypeCommand): nuke CurrentObject stuff.
+       (CatchCommand): make sure to get the TypeInfo for the exception
+       type.
+
+       * backends/mono/MonoSymbolFile.cs (VariableInfo..ctor): use
+       Report.Debug instead of Console.WriteLine.
+       (MonoSymbolFile.AddCoreType): Resolve -> GetTypeInfo.
+
+       * backends/mono/MonoLanguageBackend.cs
+       (MonoBuiltinTypeInfo..ctor): Resolve -> GetTypeInfo.
+       (MonoLanguageBackend.CreateObject): reimplement.
+
+       * backends/mono/MonoType.cs: Resolve -> GetTypeInfo.
+       
+       * backends/mono/MonoClassInfo.cs (MonoClassInfo.GetField): Resolve
+       -> GetTypeInfo.
+       (MonoClassInfo.GetStaticField): same.
+       (MonoClassInfo.GetMethod): same.
+
+       * backends/mono/MonoArrayType.cs (MonoArrayType.DoGetTypeInfo):
+       Resolve -> GetTypeInfo.
+
+       * backends/mono/MonoStringType.cs
+       (MonoStringObject.DoGetTypeInfo): Resolve -> GetTypeInfo.
+
+       * backends/mono/MonoObjectType.cs (MonoObjectType.DoGetTypeInfo):
+       Resolve -> GetTypeInfo.
+
+       * backends/mono/MonoClassType.cs (MonoClassType.GetStaticField):
+       Resolve -> GetTypeInfo.
+       (.GetStaticMethod): same.
+       (.DoGetTypeInfo): same.
+       (MonoMethodInfo.Get): same.
+       (MonoPropertyInfo.Get): same.
+
+       * backends/mono/MonoFunctionTypeInfo.cs
+       (MonoFunctionTypeInfo.Invoke): Resolve -> GetTypeInfo.
+
+       * backends/mono/MonoFundamentalType.cs
+       (MonoFundamentalType.DoGetTypeInfo): Resolve -> GetTypeInfo.
+
+       * backends/mono/MonoObjectObject.cs
+       (MonoObjectObject.GetCurrentType): Resolve -> GetTypeInfo.
+
+       * backends/mono/MonoOpaqueType.cs (MonoOpaqueType.DoGetTypeInfo):
+       Resolve -> GetTypeInfo.
+
+       * backends/mono/MonoClassObject.cs: nuke .CurrentObject and
+       .GetCurrentObject().
+
+       * backends/mono/MonoFunctionType.cs (MonoFunctionType..ctor):
+       remove redundant klass assignment.
+       (MonoFunctionType.InvokeStatic): Resolve -> GetTypeInfo.
+       (MonoFunctionType.DoGetTypeInfo): same.
+
+       * backends/mono/MonoVariable.cs (MonoVariable.GetObject): Resolve
+       -> GetTypeInfo.
+
+       * backends/native/NativeType.cs (NativeType.Resolve): rename
+       GetTypeInfo.
+
+       * classes/ExceptionCatchPoint.cs
+       (ExceptionCatchPoint.CheckBreakpointHit): track removal of
+       ITargetClassObject.CurrentObject.
+
+       * interfaces/ITargetType.cs: rename "Resolve" to "GetTypeInfo".
+       I'm sick of "Resolve" being used to mean about 50 different things
+       in the debugger code.
+
+       * interfaces/ITargetClassObject.cs: remove CurrentObject.  I'll
+       put it back in if someone can tell me what the purpose of it was -
+       it's broken currently and removing code that uses it fixes the
+       problem.
+
 2005-04-27  Chris Toshok  <[EMAIL PROTECTED]>
 
        * classes/Threading.cs: remove the Debugger events - just use the

Modified: trunk/debugger/backends/mono/MonoArrayType.cs
===================================================================
--- trunk/debugger/backends/mono/MonoArrayType.cs       2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoArrayType.cs       2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -66,9 +66,9 @@
                        }
                }
 
-               protected override MonoTypeInfo DoResolve (TargetBinaryReader 
info)
+               protected override MonoTypeInfo DoGetTypeInfo 
(TargetBinaryReader info)
                {
-                       MonoTypeInfo element_info = element_type.Resolve ();
+                       MonoTypeInfo element_info = element_type.GetTypeInfo ();
                        if (element_info == null)
                                return null;
 

Modified: trunk/debugger/backends/mono/MonoClassInfo.cs
===================================================================
--- trunk/debugger/backends/mono/MonoClassInfo.cs       2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoClassInfo.cs       2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -53,7 +53,7 @@
                                initialize (location.TargetAccess);
 
                                MonoClassType.MonoFieldInfo finfo = Type.Fields 
[index];
-                               MonoTypeInfo ftype = finfo.Type.Resolve ();
+                               MonoTypeInfo ftype = finfo.Type.GetTypeInfo ();
                                if (ftype == null)
                                        return null;
 
@@ -81,7 +81,7 @@
                                        TargetAddress.Null);
 
                                MonoClassType.MonoFieldInfo finfo = 
Type.StaticFields [index];
-                               MonoTypeInfo ftype = finfo.Type.Resolve ();
+                               MonoTypeInfo ftype = finfo.Type.GetTypeInfo ();
                                if (ftype == null)
                                        return null;
 
@@ -102,7 +102,7 @@
                                initialize (location.TargetAccess);
 
                                MonoClassType.MonoMethodInfo minfo = 
Type.Methods [index];
-                               MonoTypeInfo mtype = minfo.Type.Resolve ();
+                               MonoTypeInfo mtype = minfo.Type.GetTypeInfo ();
                                if (mtype == null)
                                        return null;
 

Modified: trunk/debugger/backends/mono/MonoClassObject.cs
===================================================================
--- trunk/debugger/backends/mono/MonoClassObject.cs     2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoClassObject.cs     2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -20,24 +20,6 @@
                        get { return type.Type; }
                }
 
-               ITargetClassObject ITargetClassObject.CurrentObject {
-                       get {
-                               return GetCurrentObject ();
-                       }
-               }
-
-               public MonoClassObject GetCurrentObject ()
-               {
-                       ITargetAccess target = location.TargetAccess;
-                       TargetAddress vtable = target.ReadAddress 
(location.Address);
-                       TargetAddress klass_address = target.ReadAddress 
(vtable);
-
-                       MonoType klass = type.Type.File.MonoLanguage.GetClass 
(klass_address);
-                       Console.WriteLine ("KLASS CURRENT: {0} {1}", 
klass_address, klass);
-                       // return klass.GetClassObject (location);
-                       return null;
-               }
-
                public ITargetClassObject Parent {
                        get {
                                if (type.Type.ParentType == null)

Modified: trunk/debugger/backends/mono/MonoClassType.cs
===================================================================
--- trunk/debugger/backends/mono/MonoClassType.cs       2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoClassType.cs       2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -96,7 +96,7 @@
 
                public ITargetObject GetStaticField (StackFrame frame, int 
index)
                {
-                       MonoClassInfo info = (MonoClassInfo) Resolve ();
+                       MonoClassInfo info = GetTypeInfo () as MonoClassInfo;
                        if (info == null)
                                return null;
 
@@ -168,7 +168,7 @@
 
                        try {
                                MonoFunctionType ftype = static_methods 
[index].FunctionType;
-                               MonoFunctionTypeInfo finfo = 
(MonoFunctionTypeInfo) ftype.Resolve ();
+                               MonoFunctionTypeInfo finfo = ftype.GetTypeInfo 
() as MonoFunctionTypeInfo;
                                if (finfo == null)
                                        return null;
 
@@ -333,7 +333,7 @@
                        return static_constructors [index].Get (frame);
                }
 
-               protected override MonoTypeInfo DoResolve (TargetBinaryReader 
info)
+               protected override MonoTypeInfo DoGetTypeInfo 
(TargetBinaryReader info)
                {
                        return new MonoClassInfo (this, info);
                }
@@ -458,7 +458,7 @@
 
                        internal ITargetFunctionObject Get (StackFrame frame)
                        {
-                               MonoFunctionTypeInfo func = 
(MonoFunctionTypeInfo) FunctionType.Resolve ();
+                               MonoFunctionTypeInfo func = 
FunctionType.GetTypeInfo () as MonoFunctionTypeInfo;
                                if (func == null)
                                        return null;
 
@@ -580,7 +580,7 @@
                                if (!PropertyInfo.CanRead)
                                        throw new InvalidOperationException ();
 
-                               MonoFunctionTypeInfo getter = 
(MonoFunctionTypeInfo) GetterType.Resolve ();
+                               MonoFunctionTypeInfo getter = 
GetterType.GetTypeInfo () as MonoFunctionTypeInfo;
                                if (getter == null)
                                        return null;
 
@@ -597,7 +597,7 @@
                                if (!PropertyInfo.CanRead)
                                        throw new InvalidOperationException ();
 
-                               MonoFunctionTypeInfo getter = 
(MonoFunctionTypeInfo) GetterType.Resolve ();
+                               MonoFunctionTypeInfo getter = 
GetterType.GetTypeInfo () as MonoFunctionTypeInfo;
                                if (getter == null)
                                        return null;
 

Modified: trunk/debugger/backends/mono/MonoFunctionType.cs
===================================================================
--- trunk/debugger/backends/mono/MonoFunctionType.cs    2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoFunctionType.cs    2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -19,7 +19,6 @@
                {
                        this.klass = klass;
                        this.method_info = mbase;
-                       this.klass = klass;
                        this.index = index;
 
                        Type rtype;
@@ -81,7 +80,7 @@
                                                                ITargetObject[] 
args,
                                                                bool debug)
                {
-                       MonoFunctionTypeInfo info = (MonoFunctionTypeInfo) 
Resolve ();
+                       MonoFunctionTypeInfo info = GetTypeInfo () as 
MonoFunctionTypeInfo;
                        if (info == null)
                                return null;
 
@@ -90,9 +89,9 @@
                        return info.InvokeStatic (frame, margs, debug);
                }
 
-               protected override MonoTypeInfo DoResolve (TargetBinaryReader 
info)
+               protected override MonoTypeInfo DoGetTypeInfo 
(TargetBinaryReader info)
                {
-                       MonoClassInfo class_info = (MonoClassInfo) 
klass.Resolve ();
+                       MonoClassInfo class_info = klass.GetTypeInfo () as 
MonoClassInfo;
                        if (class_info == null)
                                return null;
 

Modified: trunk/debugger/backends/mono/MonoFunctionTypeInfo.cs
===================================================================
--- trunk/debugger/backends/mono/MonoFunctionTypeInfo.cs        2005-05-02 
06:58:59 UTC (rev 43865)
+++ trunk/debugger/backends/mono/MonoFunctionTypeInfo.cs        2005-05-02 
08:00:53 UTC (rev 43866)
@@ -53,8 +53,8 @@
                                frame, method, this_object, arg_ptr, out 
exc_object);
 
                        MonoBuiltinTypeInfo builtin = 
Type.File.MonoLanguage.BuiltinTypes;
-                       MonoTypeInfo object_type = builtin.ObjectType.Resolve 
();
-                       MonoTypeInfo string_type = builtin.StringType.Resolve 
();
+                       MonoTypeInfo object_type = 
builtin.ObjectType.GetTypeInfo ();
+                       MonoTypeInfo string_type = 
builtin.StringType.GetTypeInfo ();
 
                        if (retval.IsNull) {
                                if (exc_object.IsNull)

Modified: trunk/debugger/backends/mono/MonoFundamentalType.cs
===================================================================
--- trunk/debugger/backends/mono/MonoFundamentalType.cs 2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoFundamentalType.cs 2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -62,7 +62,7 @@
                        }
                }
 
-               protected override MonoTypeInfo DoResolve (TargetBinaryReader 
info)
+               protected override MonoTypeInfo DoGetTypeInfo 
(TargetBinaryReader info)
                {
                        throw new InvalidOperationException ();
                }

Modified: trunk/debugger/backends/mono/MonoLanguageBackend.cs
===================================================================
--- trunk/debugger/backends/mono/MonoLanguageBackend.cs 2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoLanguageBackend.cs 2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -155,7 +155,7 @@
 
                        klass = mono_defaults.ReadGlobalAddress ();
                        Int32Type = new MonoFundamentalType (corlib, typeof 
(int), 4, klass);
-                       Int32Type.Resolve ();
+                       Int32Type.GetTypeInfo ();
                        corlib.AddCoreType (Int32Type);
 
                        klass = mono_defaults.ReadGlobalAddress ();
@@ -201,7 +201,6 @@
                        // and get to the Exception class
                        klass = mono_defaults.ReadGlobalAddress ();
                        ExceptionType = new MonoClassType (corlib, typeof 
(Exception));
-                       //ExceptionType = new MonoFundamentalType (corlib, 
typeof (Exception), object_size, klass);
                        corlib.AddCoreType (ExceptionType);
                }
        }
@@ -406,7 +405,7 @@
                        read_data_table (memory, header);
                }
 
-               // This method reads a portion of the data table (defn in 
mono-debug-debugger.h)
+               // This method reads a portion of the data table (defn in 
mono-debug.h)
                void read_data_table (ITargetMemoryAccess memory, 
ITargetMemoryReader header)
                {
                        int num_data_tables = header.ReadInteger ();
@@ -618,7 +617,15 @@
 
                public ITargetObject CreateObject (StackFrame frame, 
TargetAddress address)
                {
-                       return null;
+                       TargetLocation location = new AbsoluteTargetLocation 
(frame, address);
+                       MonoObjectObject obj = 
(MonoObjectObject)builtin_types.ObjectType.GetTypeInfo().GetObject (location);
+                       if (obj == null)
+                               return null;
+
+                       if (obj.HasDereferencedObject)
+                               return obj.DereferencedObject;
+                       else
+                               return obj;
                }
 
                ITargetFundamentalType ILanguage.IntegerType {

Modified: trunk/debugger/backends/mono/MonoObjectObject.cs
===================================================================
--- trunk/debugger/backends/mono/MonoObjectObject.cs    2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoObjectObject.cs    2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -30,7 +30,7 @@
                                if (klass == null)
                                        return null;
 
-                               return klass.Resolve ();
+                               return klass.GetTypeInfo ();
                        } catch {
                                return null;
                        }

Modified: trunk/debugger/backends/mono/MonoObjectType.cs
===================================================================
--- trunk/debugger/backends/mono/MonoObjectType.cs      2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoObjectType.cs      2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -19,7 +19,7 @@
                        return new MonoObjectTypeInfo (this, size, 
klass_address);
                }
 
-               protected override MonoTypeInfo DoResolve (TargetBinaryReader 
info)
+               protected override MonoTypeInfo DoGetTypeInfo 
(TargetBinaryReader info)
                {
                        throw new InvalidOperationException ();
                }

Modified: trunk/debugger/backends/mono/MonoOpaqueType.cs
===================================================================
--- trunk/debugger/backends/mono/MonoOpaqueType.cs      2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoOpaqueType.cs      2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -12,7 +12,7 @@
                        get { return false; }
                }
 
-               protected override MonoTypeInfo DoResolve (TargetBinaryReader 
info)
+               protected override MonoTypeInfo DoGetTypeInfo 
(TargetBinaryReader info)
                {
                        return null;
                }

Modified: trunk/debugger/backends/mono/MonoStringType.cs
===================================================================
--- trunk/debugger/backends/mono/MonoStringType.cs      2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoStringType.cs      2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -30,7 +30,7 @@
                        return type == typeof (string);
                }
 
-               protected override MonoTypeInfo DoResolve (TargetBinaryReader 
info)
+               protected override MonoTypeInfo DoGetTypeInfo 
(TargetBinaryReader info)
                {
                        throw new InvalidOperationException ();
                }

Modified: trunk/debugger/backends/mono/MonoSymbolFile.cs
===================================================================
--- trunk/debugger/backends/mono/MonoSymbolFile.cs      2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoSymbolFile.cs      2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -42,12 +42,12 @@
                        Mode = (AddressMode) (Index & AddressModeFlags);
                        Index = (int) ((long) Index & ~AddressModeFlags);
 
-                       Console.WriteLine ("VARIABLE INFO: {0} {1} {2}", Mode, 
Index, arch);
+                       Report.Debug (DebugFlags.JitSymtab, "VARIABLE INFO: {0} 
{1} {2}", Mode, Index, arch);
 
                        if (Mode == AddressMode.Register)
                                Index = arch.RegisterMap [Index];
 
-                       Console.WriteLine ("VARIABLE INFO #1: {0}", Index);
+                       Report.Debug (DebugFlags.JitSymtab, "VARIABLE INFO #1: 
{0}", Index);
 
                        HasLivenessInfo = (BeginLiveness != 0) && (EndLiveness 
!= 0);
                }
@@ -360,7 +360,7 @@
 
                internal void AddCoreType (MonoType type)
                {
-                       type.Resolve ();
+                       type.GetTypeInfo ();
                        type_hash.Add (type.Type, type);
                }
 

Modified: trunk/debugger/backends/mono/MonoType.cs
===================================================================
--- trunk/debugger/backends/mono/MonoType.cs    2005-05-02 06:58:59 UTC (rev 
43865)
+++ trunk/debugger/backends/mono/MonoType.cs    2005-05-02 08:00:53 UTC (rev 
43866)
@@ -44,12 +44,12 @@
                        get;
                }
 
-               ITargetTypeInfo ITargetType.Resolve ()
+               ITargetTypeInfo ITargetType.GetTypeInfo ()
                {
-                       return Resolve ();
+                       return GetTypeInfo ();
                }
 
-               public virtual MonoTypeInfo Resolve ()
+               public virtual MonoTypeInfo GetTypeInfo ()
                {
                        if (type_info != null)
                                return type_info;
@@ -66,7 +66,7 @@
                        info.ReadLeb128 ();
                        info.ReadLeb128 ();
 
-                       type_info = DoResolve (info);
+                       type_info = DoGetTypeInfo (info);
                        return type_info;
                }
 
@@ -75,7 +75,7 @@
                        return null;
                }
 
-               protected abstract MonoTypeInfo DoResolve (TargetBinaryReader 
info);
+               protected abstract MonoTypeInfo DoGetTypeInfo 
(TargetBinaryReader info);
 
                public virtual bool CheckValid (TargetLocation location)
                {

Modified: trunk/debugger/backends/mono/MonoVariable.cs
===================================================================
--- trunk/debugger/backends/mono/MonoVariable.cs        2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/mono/MonoVariable.cs        2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -120,7 +120,7 @@
                        if ((location == null) || !location.IsValid)
                                throw new LocationInvalidException ();
 
-                       ITargetTypeInfo tinfo = type.Resolve ();
+                       ITargetTypeInfo tinfo = type.GetTypeInfo ();
                        if (tinfo == null)
                                return null;
 

Modified: trunk/debugger/backends/native/NativeType.cs
===================================================================
--- trunk/debugger/backends/native/NativeType.cs        2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/backends/native/NativeType.cs        2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -70,7 +70,7 @@
                        get { return this; }
                }
 
-               ITargetTypeInfo ITargetType.Resolve ()
+               ITargetTypeInfo ITargetType.GetTypeInfo ()
                {
                        return this;
                }

Modified: trunk/debugger/classes/ExceptionCatchPoint.cs
===================================================================
--- trunk/debugger/classes/ExceptionCatchPoint.cs       2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/classes/ExceptionCatchPoint.cs       2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -37,7 +37,7 @@
                        if (exc == null)
                                return false; // OOOPS
 
-                       return IsSubclassOf (exc.CurrentObject.Type, exception);
+                       return IsSubclassOf (exc.Type, exception);
                }
 
                public override void BreakpointHit (StackFrame frame)

Modified: trunk/debugger/frontend/Command.cs
===================================================================
--- trunk/debugger/frontend/Command.cs  2005-05-02 06:58:59 UTC (rev 43865)
+++ trunk/debugger/frontend/Command.cs  2005-05-02 08:00:53 UTC (rev 43866)
@@ -311,9 +311,7 @@
                        case Format.Current: {
                                ITargetObject obj = expression.EvaluateVariable 
(context);
                                ITargetClassObject cobj = obj as 
ITargetClassObject;
-                               if (cobj != null)
-                                       obj = cobj.CurrentObject;
-                               context.PrintObject (obj);
+                               context.PrintObject (cobj);
                                break;
                        }
 
@@ -353,9 +351,7 @@
                        case Format.Current:
                                obj = expression.EvaluateVariable (context);
                                ITargetClassObject cobj = obj as 
ITargetClassObject;
-                               if (cobj != null)
-                                       obj = cobj.CurrentObject;
-                               context.PrintType (obj.TypeInfo.Type);
+                               context.PrintType (cobj.TypeInfo.Type);
                                break;
 
                        default:
@@ -2023,6 +2019,9 @@
                                return false;
 
                        type = expr.EvaluateType (context) as ITargetClassType;
+                       // we need to resolve the TypeInfo so the
+                       // debugger will load the exception type.
+                       type.GetTypeInfo();
                        if (!IsSubclassOf (type, exception_type))
                                throw new ScriptingException ("Type `{0}' is 
not an exception type.", expr.Name);
 

Modified: trunk/debugger/frontend/Expression.cs
===================================================================
--- trunk/debugger/frontend/Expression.cs       2005-05-02 06:58:59 UTC (rev 
43865)
+++ trunk/debugger/frontend/Expression.cs       2005-05-02 08:00:53 UTC (rev 
43866)
@@ -1493,7 +1493,7 @@
 
                        ITargetClassObject cobj = obj as ITargetClassObject;
                        if (current_ok && (cobj != null))
-                               return cobj.CurrentObject;
+                               return cobj;
 
                        throw new ScriptingException (
                                "Expression `{0}' is not a pointer type.", 
expr.Name);
@@ -1704,7 +1704,7 @@
                                        throw new ScriptingException ("Could 
not find matching indexer.");
                                }
 
-                               ITargetTypeInfo getter_info = (ITargetTypeInfo) 
prop_info.Getter.Resolve ();
+                               ITargetTypeInfo getter_info = (ITargetTypeInfo) 
prop_info.Getter.GetTypeInfo ();
                                if (getter_info == null) {
                                        return null;
                                }
@@ -1790,7 +1790,7 @@
                                                          ITargetClassType 
source_type,
                                                          ITargetClassType 
target_type)
                {
-                       ITargetClassObject current = source.CurrentObject;
+                       ITargetClassObject current = source;
                        if (current.Type == source_type)
                                return null;
 
@@ -1821,7 +1821,7 @@
                                as ITargetClassType;
                        if (type == null)
                                throw new ScriptingException (
-                                       "Variable {0} is not a class type.", 
target.Name);
+                                       "Type {0} is not a class type.", 
target.Name);
 
                        ITargetClassObject source = expr.EvaluateVariable 
(context)
                                as ITargetClassObject;

Modified: trunk/debugger/frontend/Main.cs
===================================================================
--- trunk/debugger/frontend/Main.cs     2005-05-02 06:58:59 UTC (rev 43865)
+++ trunk/debugger/frontend/Main.cs     2005-05-02 08:00:53 UTC (rev 43866)
@@ -80,6 +80,7 @@
                        e.RegisterCommand ("disable", typeof 
(BreakpointDisableCommand));
                        e.RegisterCommand ("delete", typeof 
(BreakpointDeleteCommand));
                        e.RegisterCommand ("list", typeof (ListCommand));
+                       e.RegisterAlias   ("l", typeof (ListCommand));
                        e.RegisterCommand ("break", typeof (BreakCommand));
                        e.RegisterAlias   ("b", typeof (BreakCommand));
                        e.RegisterCommand ("catch", typeof (CatchCommand));

Modified: trunk/debugger/frontend/ScriptingContext.cs
===================================================================
--- trunk/debugger/frontend/ScriptingContext.cs 2005-05-02 06:58:59 UTC (rev 
43865)
+++ trunk/debugger/frontend/ScriptingContext.cs 2005-05-02 08:00:53 UTC (rev 
43866)
@@ -127,7 +127,7 @@
                public ITargetObject GetRegister (int index, long offset)
                {
                        ITargetType type = GetRegisterType (index);
-                       ITargetTypeInfo tinfo = type.Resolve ();
+                       ITargetTypeInfo tinfo = type.GetTypeInfo ();
                        TargetLocation location = GetRegisterLocation (index, 
offset, false);
                        return tinfo.GetObject (location);
                }

Modified: trunk/debugger/interfaces/ITargetClassObject.cs
===================================================================
--- trunk/debugger/interfaces/ITargetClassObject.cs     2005-05-02 06:58:59 UTC 
(rev 43865)
+++ trunk/debugger/interfaces/ITargetClassObject.cs     2005-05-02 08:00:53 UTC 
(rev 43866)
@@ -6,10 +6,6 @@
                        get;
                }
 
-               ITargetClassObject CurrentObject {
-                       get;
-               }
-
                ITargetClassObject Parent {
                        get;
                }

Modified: trunk/debugger/interfaces/ITargetType.cs
===================================================================
--- trunk/debugger/interfaces/ITargetType.cs    2005-05-02 06:58:59 UTC (rev 
43865)
+++ trunk/debugger/interfaces/ITargetType.cs    2005-05-02 08:00:53 UTC (rev 
43866)
@@ -17,6 +17,6 @@
                        get;
                }
 
-               ITargetTypeInfo Resolve ();
+               ITargetTypeInfo GetTypeInfo ();
        }
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to