Author: martin
Date: 2007-05-29 09:34:01 -0400 (Tue, 29 May 2007)
New Revision: 78120

Added:
   trunk/debugger/classes/LineNumberTable.cs
Removed:
   trunk/debugger/classes/MethodSource.cs
Modified:
   trunk/debugger/ChangeLog
   trunk/debugger/backend/BreakpointHandle.cs
   trunk/debugger/backend/SingleSteppingEngine.cs
   trunk/debugger/backend/arch/DwarfReader.cs
   trunk/debugger/classes/AssemblerMethod.cs
   trunk/debugger/classes/Method.cs
   trunk/debugger/classes/SourceAddress.cs
   trunk/debugger/classes/SourceLocation.cs
   trunk/debugger/classes/StackFrame.cs
   trunk/debugger/frontend/ScriptingContext.cs
   trunk/debugger/frontend/Style.cs
   trunk/debugger/languages/mono/MonoSymbolFile.cs
Log:
2007-05-29  Martin Baulig  <[EMAIL PROTECTED]>

        * classes/MethodSource.cs: Renamed into LineNumberTable.cs
        (MethodSource): Renamed into `LineNumberTable'.

        * classes/Method.cs
        (Method.HasSource): Renamed into `HasLineNumbers'.
        (Method.Source): Renamed into `LineNumberTable'.



Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog    2007-05-29 13:29:35 UTC (rev 78119)
+++ trunk/debugger/ChangeLog    2007-05-29 13:34:01 UTC (rev 78120)
@@ -1,3 +1,12 @@
+2007-05-29  Martin Baulig  <[EMAIL PROTECTED]>
+
+       * classes/MethodSource.cs: Renamed into LineNumberTable.cs
+       (MethodSource): Renamed into `LineNumberTable'.
+
+       * classes/Method.cs
+       (Method.HasSource): Renamed into `HasLineNumbers'.
+       (Method.Source): Renamed into `LineNumberTable'.
+
 2007-05-23  Martin Baulig  <[EMAIL PROTECTED]>
 
        * frontend/Command.cs

Modified: trunk/debugger/backend/BreakpointHandle.cs
===================================================================
--- trunk/debugger/backend/BreakpointHandle.cs  2007-05-29 13:29:35 UTC (rev 
78119)
+++ trunk/debugger/backend/BreakpointHandle.cs  2007-05-29 13:34:01 UTC (rev 
78120)
@@ -127,8 +127,8 @@
                                return TargetAddress.Null;
 
                        if (line != -1) {
-                               if (method.HasSource)
-                                       return method.Source.Lookup (line);
+                               if (method.HasLineNumbers)
+                                       return method.LineNumberTable.Lookup 
(line);
                                else
                                        return TargetAddress.Null;
                        } else if (method.HasMethodBounds)

Modified: trunk/debugger/backend/SingleSteppingEngine.cs
===================================================================
--- trunk/debugger/backend/SingleSteppingEngine.cs      2007-05-29 13:29:35 UTC 
(rev 78119)
+++ trunk/debugger/backend/SingleSteppingEngine.cs      2007-05-29 13:34:01 UTC 
(rev 78120)
@@ -996,8 +996,8 @@
                        registers = inferior.GetRegisters ();
 
                        // Compute the current stack frame.
-                       if ((current_method != null) && 
current_method.HasSource) {
-                               SourceAddress source = 
current_method.Source.Lookup (address);
+                       if ((current_method != null) && 
current_method.HasLineNumbers) {
+                               SourceAddress source = 
current_method.LineNumberTable.Lookup (address);
 
                                if (!same_method) {
                                        // If check_method_operation() returns 
true, it already
@@ -1213,7 +1213,7 @@
 
                protected bool MethodHasSource (Method method)
                {
-                       if ((method == null) || !method.HasSource)
+                       if ((method == null) || !method.HasLineNumbers)
                                return false;
 
                        if (current_method != null) {
@@ -1224,7 +1224,7 @@
                                        return false;
                        }
 
-                       MethodSource source = method.Source;
+                       LineNumberTable source = method.LineNumberTable;
                        if ((source == null) || source.IsDynamic)
                                return false;
 

Modified: trunk/debugger/backend/arch/DwarfReader.cs
===================================================================
--- trunk/debugger/backend/arch/DwarfReader.cs  2007-05-29 13:29:35 UTC (rev 
78119)
+++ trunk/debugger/backend/arch/DwarfReader.cs  2007-05-29 13:34:01 UTC (rev 
78120)
@@ -2392,18 +2392,18 @@
                        }
                }
 
-               protected class DwarfTargetMethodSource : MethodSource
+               protected class DwarfTargetLineNumberTable : LineNumberTable
                {
                        DwarfTargetMethod method;
 
-                       public DwarfTargetMethodSource (DwarfTargetMethod 
method,
-                                                       SourceFile file)
+                       public DwarfTargetLineNumberTable (DwarfTargetMethod 
method,
+                                                          SourceFile file)
                                : base (method, file)
                        {
                                this.method = method;
                        }
 
-                       protected override MethodSourceData ReadSource ()
+                       protected override LineNumberTableData ReadLineNumbers 
()
                        {
                                LineNumber[] lines = method.LineNumbers;
                                LineEntry[] addresses = new LineEntry 
[lines.Length];
@@ -2414,7 +2414,7 @@
                                                line.Line);
                                }
 
-                               return new MethodSourceData (
+                               return new LineNumberTableData (
                                        method.StartRow, method.EndRow, 
addresses,
                                        method.SourceMethod, 
method.SourceBuffer,
                                        method.Module);
@@ -2426,7 +2426,7 @@
                        LineNumberEngine engine;
                        DieSubprogram subprog;
                        SourceMethod source;
-                       DwarfTargetMethodSource msource;
+                       DwarfTargetLineNumberTable line_numbers;
                        int start_row, end_row;
                        LineNumber[] lines;
                        SourceBuffer buffer;
@@ -2437,7 +2437,7 @@
                                this.subprog = subprog;
                                this.engine = engine;
 
-                               read_source ();
+                               read_line_numbers ();
                                CheckLoaded ();
                        }
 
@@ -2491,7 +2491,7 @@
                                get { return buffer; }
                        }
 
-                       void read_source ()
+                       void read_line_numbers ()
                        {
                                string file = engine.GetSource (
                                        subprog, out start_row, out end_row, 
out lines);
@@ -2511,16 +2511,15 @@
                        {
                                if (!subprog.dwarf.bfd.IsLoaded)
                                        return false;
-                               if (msource != null)
+                               if (line_numbers != null)
                                        return true;
 
                                ISymbolContainer sc = (ISymbolContainer) 
subprog;
                                if (sc.IsContinuous)
                                        SetAddresses (sc.StartAddress, 
sc.EndAddress);
 
-                               msource = new DwarfTargetMethodSource (
-                                       this, subprog.SourceFile);
-                               SetSource (msource);
+                               line_numbers = new DwarfTargetLineNumberTable 
(this, subprog.SourceFile);
+                               SetLineNumbers (line_numbers);
 
                                if ((lines != null) && (lines.Length > 2)) {
                                        LineNumber start = lines [1];

Modified: trunk/debugger/classes/AssemblerMethod.cs
===================================================================
--- trunk/debugger/classes/AssemblerMethod.cs   2007-05-29 13:29:35 UTC (rev 
78119)
+++ trunk/debugger/classes/AssemblerMethod.cs   2007-05-29 13:34:01 UTC (rev 
78120)
@@ -30,7 +30,7 @@
                }
        }
 
-       public sealed class AssemblerMethod : MethodSource
+       public sealed class AssemblerMethod : LineNumberTable
        {
                SourceBuffer buffer;
                int start_row;
@@ -132,12 +132,12 @@
                        }
                }
 
-               protected override MethodSourceData ReadSource ()
+               protected override LineNumberTableData ReadLineNumbers ()
                {
                        buffer = new SourceBuffer (name, contents);
                        LineEntry[] lines = new LineEntry [addresses.Count];
                        addresses.CopyTo (lines);
-                       return new MethodSourceData (start_row, end_row, lines, 
buffer, module);
+                       return new LineNumberTableData (start_row, end_row, 
lines, buffer, module);
                }
        }
 }

Copied: trunk/debugger/classes/LineNumberTable.cs (from rev 77379, 
trunk/debugger/classes/MethodSource.cs)
===================================================================
--- trunk/debugger/classes/MethodSource.cs      2007-05-14 20:01:55 UTC (rev 
77379)
+++ trunk/debugger/classes/LineNumberTable.cs   2007-05-29 13:34:01 UTC (rev 
78120)
@@ -0,0 +1,217 @@
+using System;
+using System.Text;
+using System.Collections;
+
+namespace Mono.Debugger
+{
+       public abstract class LineNumberTable : DebuggerMarshalByRefObject
+       {
+               SourceFile file;
+               string name;
+
+               TargetAddress start, end;
+               TargetAddress method_start, method_end;
+
+               protected LineNumberTable (Method method, SourceFile file)
+               {
+                       this.file = file;
+                       this.start = method.StartAddress;
+                       this.end = method.EndAddress;
+                       this.name = method.Name;
+
+                       if (method.HasMethodBounds) {
+                               method_start = method.MethodStartAddress;
+                               method_end = method.MethodEndAddress;
+                       } else {
+                               method_start = start;
+                               method_end = end;
+                       }
+               }
+
+               protected LineNumberTable (TargetAddress start, TargetAddress 
end)
+               {
+                       this.start = this.method_start = start;
+                       this.end = this.method_end = end;
+                       this.name = "<unknown>";
+               }
+
+               protected virtual void SetEndAddress (TargetAddress end)
+               {
+                       this.end = this.method_end = end;
+               }
+
+               ObjectCache cache = null;
+               object read_line_numbers (object user_data)
+               {
+                       return ReadLineNumbers ();
+               }
+
+               protected LineNumberTableData Data {
+                       get {
+                               if (cache == null)
+                                       cache = new ObjectCache
+                                               (new ObjectCacheFunc 
(read_line_numbers), null, 5);
+
+                               return (LineNumberTableData) cache.Data;
+                       }
+               }
+
+               protected abstract LineNumberTableData ReadLineNumbers ();
+
+               public virtual string Name {
+                       get {
+                               return name;
+                       }
+               }
+
+               public bool IsDynamic {
+                       get {
+                               return file == null;
+                       }
+               }
+
+               public SourceBuffer SourceBuffer {
+                       get {
+                               return Data.SourceBuffer;
+                       }
+               }
+
+               public SourceFile SourceFile {
+                       get {
+                               if (IsDynamic)
+                                       throw new InvalidOperationException ();
+
+                               return file;
+                       }
+               }
+
+               public Module Module {
+                       get {
+                               return Data.Module;
+                       }
+               }
+
+               public SourceMethod SourceMethod {
+                       get {
+                               if (IsDynamic)
+                                       throw new InvalidOperationException ();
+
+                               return Data.SourceMethod;
+                       }
+               }
+
+               protected LineEntry[] Addresses {
+                       get {
+                               return Data.Addresses;
+                       }
+               }
+
+               public virtual int StartRow {
+                       get {
+                               return Data.StartRow;
+                       }
+               }
+
+               public virtual int EndRow {
+                       get {
+                               return Data.EndRow;
+                       }
+               }
+
+               public virtual string[] GetNamespaces ()
+               {
+                       return null;
+               }
+
+               public TargetAddress Lookup (int line)
+               {
+                       if ((Addresses == null) || (line < StartRow) || (line > 
EndRow))
+                               return TargetAddress.Null;
+
+                       for (int i = 0; i < Addresses.Length; i++) {
+                               LineEntry entry = (LineEntry) Addresses [i];
+
+                               if (line <= entry.Line)
+                                       return entry.Address;
+                       }
+
+                       return TargetAddress.Null;
+               }
+
+               public SourceAddress Lookup (TargetAddress address)
+               {
+                       if (address.IsNull || (address < start) || (address >= 
end))
+                               return null;
+
+                       if (address < method_start)
+                               return new SourceAddress (
+                                       this, StartRow, (int) (address - start),
+                                       (int) (method_start - address));
+
+                       TargetAddress next_address = end;
+
+                       for (int i = Addresses.Length-1; i >= 0; i--) {
+                               LineEntry entry = (LineEntry) Addresses [i];
+
+                               int range = (int) (next_address - address);
+                               next_address = entry.Address;
+
+                               if (next_address > address)
+                                       continue;
+
+                               int offset = (int) (address - next_address);
+
+                               return new SourceAddress (this, entry.Line, 
offset, range);
+                       }
+
+                       if (Addresses.Length > 0)
+                               return new SourceAddress (
+                                       this, Addresses [0].Line, (int) 
(address - start),
+                                       (int) (end - address));
+
+                       return null;
+               }
+
+               public virtual void DumpLineNumbers ()
+               {
+                       Console.WriteLine ("--------");
+                       Console.WriteLine ("DUMPING LINE NUMBER TABLE: {0} {1}",
+                                          name, file);
+                       Console.WriteLine ("BOUNDS: start = {0} / {1}, end = 
{2} / {3}", 
+                                          start, method_start, end, 
method_end);
+                       Console.WriteLine ("--------");
+                       for (int i = 0; i < Addresses.Length; i++) {
+                               LineEntry entry = (LineEntry) Addresses [i];
+                               Console.WriteLine ("{0,4} {1,4}  {2}", i, 
entry.Line, entry.Address);
+                       }
+                       Console.WriteLine ("--------");
+               }
+
+               protected class LineNumberTableData
+               {
+                       public readonly int StartRow;
+                       public readonly int EndRow;
+                       public readonly LineEntry[] Addresses;
+                       public readonly SourceMethod SourceMethod;
+                       public readonly SourceBuffer SourceBuffer;
+                       public readonly Module Module;
+
+                       public LineNumberTableData (int start, int end, 
LineEntry[] addresses,
+                                                   SourceBuffer buffer, Module 
module)
+                               : this (start, end, addresses, null, buffer, 
module)
+                       { }
+
+                       public LineNumberTableData (int start, int end, 
LineEntry[] addresses,
+                                                   SourceMethod method, 
SourceBuffer buffer,
+                                                   Module module)
+                       {
+                               this.StartRow = start;
+                               this.EndRow = end;
+                               this.SourceMethod = method;
+                               this.SourceBuffer = buffer;
+                               this.Addresses = addresses;
+                               this.Module = module;
+                       }
+               }
+       }
+}

Modified: trunk/debugger/classes/Method.cs
===================================================================
--- trunk/debugger/classes/Method.cs    2007-05-29 13:29:35 UTC (rev 78119)
+++ trunk/debugger/classes/Method.cs    2007-05-29 13:34:01 UTC (rev 78120)
@@ -67,7 +67,7 @@
                TargetAddress start, end;
                TargetAddress method_start, method_end;
                WrapperType wrapper_type = WrapperType.None;
-               MethodSource source;
+               LineNumberTable line_numbers;
                Module module;
                bool is_loaded, has_bounds;
                string image_file;
@@ -111,9 +111,9 @@
                        this.has_bounds = true;
                }
 
-               protected void SetSource (MethodSource source)
+               protected void SetLineNumbers (LineNumberTable line_numbers)
                {
-                       this.source = source;
+                       this.line_numbers = line_numbers;
                }
 
                protected void SetWrapperType (WrapperType wrapper_type)
@@ -224,18 +224,18 @@
                        }
                }
 
-               public bool HasSource {
+               public bool HasLineNumbers {
                        get {
-                               return source != null;
+                               return line_numbers != null;
                        }
                }
 
-               public MethodSource Source {
+               public LineNumberTable LineNumberTable {
                        get {
-                               if (!HasSource)
+                               if (!HasLineNumbers)
                                        throw new InvalidOperationException ();
 
-                               return source;
+                               return line_numbers;
                        }
                }
 

Deleted: trunk/debugger/classes/MethodSource.cs
===================================================================
--- trunk/debugger/classes/MethodSource.cs      2007-05-29 13:29:35 UTC (rev 
78119)
+++ trunk/debugger/classes/MethodSource.cs      2007-05-29 13:34:01 UTC (rev 
78120)
@@ -1,217 +0,0 @@
-using System;
-using System.Text;
-using System.Collections;
-
-namespace Mono.Debugger
-{
-       public abstract class MethodSource : DebuggerMarshalByRefObject
-       {
-               SourceFile file;
-               string name;
-
-               TargetAddress start, end;
-               TargetAddress method_start, method_end;
-
-               protected MethodSource (Method method, SourceFile file)
-               {
-                       this.file = file;
-                       this.start = method.StartAddress;
-                       this.end = method.EndAddress;
-                       this.name = method.Name;
-
-                       if (method.HasMethodBounds) {
-                               method_start = method.MethodStartAddress;
-                               method_end = method.MethodEndAddress;
-                       } else {
-                               method_start = start;
-                               method_end = end;
-                       }
-               }
-
-               protected MethodSource (TargetAddress start, TargetAddress end)
-               {
-                       this.start = this.method_start = start;
-                       this.end = this.method_end = end;
-                       this.name = "<unknown>";
-               }
-
-               protected virtual void SetEndAddress (TargetAddress end)
-               {
-                       this.end = this.method_end = end;
-               }
-
-               ObjectCache source_cache = null;
-               object read_source (object user_data)
-               {
-                       return ReadSource ();
-               }
-
-               protected MethodSourceData SourceData {
-                       get {
-                               if (source_cache == null)
-                                       source_cache = new ObjectCache
-                                               (new ObjectCacheFunc 
(read_source), null, 5);
-
-                               return (MethodSourceData) source_cache.Data;
-                       }
-               }
-
-               protected abstract MethodSourceData ReadSource ();
-
-               public virtual string Name {
-                       get {
-                               return name;
-                       }
-               }
-
-               public bool IsDynamic {
-                       get {
-                               return file == null;
-                       }
-               }
-
-               public SourceBuffer SourceBuffer {
-                       get {
-                               return SourceData.SourceBuffer;
-                       }
-               }
-
-               public SourceFile SourceFile {
-                       get {
-                               if (IsDynamic)
-                                       throw new InvalidOperationException ();
-
-                               return file;
-                       }
-               }
-
-               public Module Module {
-                       get {
-                               return SourceData.Module;
-                       }
-               }
-
-               public SourceMethod SourceMethod {
-                       get {
-                               if (IsDynamic)
-                                       throw new InvalidOperationException ();
-
-                               return SourceData.SourceMethod;
-                       }
-               }
-
-               protected LineEntry[] Addresses {
-                       get {
-                               return SourceData.Addresses;
-                       }
-               }
-
-               public virtual int StartRow {
-                       get {
-                               return SourceData.StartRow;
-                       }
-               }
-
-               public virtual int EndRow {
-                       get {
-                               return SourceData.EndRow;
-                       }
-               }
-
-               public virtual string[] GetNamespaces ()
-               {
-                       return null;
-               }
-
-               public TargetAddress Lookup (int line)
-               {
-                       if ((Addresses == null) || (line < StartRow) || (line > 
EndRow))
-                               return TargetAddress.Null;
-
-                       for (int i = 0; i < Addresses.Length; i++) {
-                               LineEntry entry = (LineEntry) Addresses [i];
-
-                               if (line <= entry.Line)
-                                       return entry.Address;
-                       }
-
-                       return TargetAddress.Null;
-               }
-
-               public SourceAddress Lookup (TargetAddress address)
-               {
-                       if (address.IsNull || (address < start) || (address >= 
end))
-                               return null;
-
-                       if (address < method_start)
-                               return new SourceAddress (
-                                       this, StartRow, (int) (address - start),
-                                       (int) (method_start - address));
-
-                       TargetAddress next_address = end;
-
-                       for (int i = Addresses.Length-1; i >= 0; i--) {
-                               LineEntry entry = (LineEntry) Addresses [i];
-
-                               int range = (int) (next_address - address);
-                               next_address = entry.Address;
-
-                               if (next_address > address)
-                                       continue;
-
-                               int offset = (int) (address - next_address);
-
-                               return new SourceAddress (this, entry.Line, 
offset, range);
-                       }
-
-                       if (Addresses.Length > 0)
-                               return new SourceAddress (
-                                       this, Addresses [0].Line, (int) 
(address - start),
-                                       (int) (end - address));
-
-                       return null;
-               }
-
-               public virtual void DumpLineNumbers ()
-               {
-                       Console.WriteLine ("--------");
-                       Console.WriteLine ("DUMPING LINE NUMBER TABLE: {0} {1}",
-                                          name, file);
-                       Console.WriteLine ("BOUNDS: start = {0} / {1}, end = 
{2} / {3}", 
-                                          start, method_start, end, 
method_end);
-                       Console.WriteLine ("--------");
-                       for (int i = 0; i < Addresses.Length; i++) {
-                               LineEntry entry = (LineEntry) Addresses [i];
-                               Console.WriteLine ("{0,4} {1,4}  {2}", i, 
entry.Line, entry.Address);
-                       }
-                       Console.WriteLine ("--------");
-               }
-
-               protected class MethodSourceData
-               {
-                       public readonly int StartRow;
-                       public readonly int EndRow;
-                       public readonly LineEntry[] Addresses;
-                       public readonly SourceMethod SourceMethod;
-                       public readonly SourceBuffer SourceBuffer;
-                       public readonly Module Module;
-
-                       public MethodSourceData (int start, int end, 
LineEntry[] addresses,
-                                                SourceBuffer buffer, Module 
module)
-                               : this (start, end, addresses, null, buffer, 
module)
-                       { }
-
-                       public MethodSourceData (int start, int end, 
LineEntry[] addresses,
-                                                SourceMethod method, 
SourceBuffer buffer,
-                                                Module module)
-                       {
-                               this.StartRow = start;
-                               this.EndRow = end;
-                               this.SourceMethod = method;
-                               this.SourceBuffer = buffer;
-                               this.Addresses = addresses;
-                               this.Module = module;
-                       }
-               }
-       }
-}

Modified: trunk/debugger/classes/SourceAddress.cs
===================================================================
--- trunk/debugger/classes/SourceAddress.cs     2007-05-29 13:29:35 UTC (rev 
78119)
+++ trunk/debugger/classes/SourceAddress.cs     2007-05-29 13:34:01 UTC (rev 
78120)
@@ -17,18 +17,18 @@
        // </summary>
        public class SourceAddress : DebuggerMarshalByRefObject
        {
-               MethodSource source;
+               LineNumberTable source;
                int row;
                int source_offset;
                int source_range;
 
                public static SourceAddress Null = new SourceAddress (null, 0);
 
-               public SourceAddress (MethodSource source, int row)
+               public SourceAddress (LineNumberTable source, int row)
                        : this (source, row, 0, 0)
                { }
 
-               public SourceAddress (MethodSource source, int row, int offset, 
int range)
+               public SourceAddress (LineNumberTable source, int row, int 
offset, int range)
                {
                        this.source = source;
                        this.row = row;
@@ -45,7 +45,7 @@
                        }
                }
 
-               public MethodSource MethodSource {
+               public LineNumberTable LineNumberTable {
                        get {
                                return source;
                        }

Modified: trunk/debugger/classes/SourceLocation.cs
===================================================================
--- trunk/debugger/classes/SourceLocation.cs    2007-05-29 13:29:35 UTC (rev 
78119)
+++ trunk/debugger/classes/SourceLocation.cs    2007-05-29 13:34:01 UTC (rev 
78120)
@@ -246,10 +246,10 @@
                                throw new TargetException 
(TargetError.LocationInvalid);
 
                        Method method = source.GetMethod (0);
-                       if ((method == null) || !method.HasSource)
+                       if ((method == null) || !method.HasLineNumbers)
                                throw new TargetException 
(TargetError.LocationInvalid);
 
-                       method.Source.DumpLineNumbers ();
+                       method.LineNumberTable.DumpLineNumbers ();
                }
 
                internal BreakpointHandle ResolveBreakpoint (Breakpoint 
breakpoint, int domain)
@@ -313,8 +313,8 @@
                                return TargetAddress.Null;
 
                        if (line != -1) {
-                               if (method.HasSource)
-                                       return method.Source.Lookup (line);
+                               if (method.HasLineNumbers)
+                                       return method.LineNumberTable.Lookup 
(line);
                                else
                                        return TargetAddress.Null;
                        } else if (method.HasMethodBounds)

Modified: trunk/debugger/classes/StackFrame.cs
===================================================================
--- trunk/debugger/classes/StackFrame.cs        2007-05-29 13:29:35 UTC (rev 
78119)
+++ trunk/debugger/classes/StackFrame.cs        2007-05-29 13:34:01 UTC (rev 
78120)
@@ -244,8 +244,8 @@
                        get {
                                if (has_source)
                                        return source;
-                               if ((method != null) && method.HasSource)
-                                       source = method.Source.Lookup (address);
+                               if ((method != null) && method.HasLineNumbers)
+                                       source = method.LineNumberTable.Lookup 
(address);
                                has_source = true;
                                return source;
                        }

Modified: trunk/debugger/frontend/ScriptingContext.cs
===================================================================
--- trunk/debugger/frontend/ScriptingContext.cs 2007-05-29 13:29:35 UTC (rev 
78119)
+++ trunk/debugger/frontend/ScriptingContext.cs 2007-05-29 13:34:01 UTC (rev 
78120)
@@ -124,10 +124,10 @@
                public string[] GetNamespaces (StackFrame frame)
                {
                        Method method = frame.Method;
-                       if ((method == null) || !method.HasSource)
+                       if ((method == null) || !method.HasLineNumbers)
                                return null;
 
-                       MethodSource msource = method.Source;
+                       LineNumberTable msource = method.LineNumberTable;
                        if (msource.IsDynamic)
                                return null;
 

Modified: trunk/debugger/frontend/Style.cs
===================================================================
--- trunk/debugger/frontend/Style.cs    2007-05-29 13:29:35 UTC (rev 78119)
+++ trunk/debugger/frontend/Style.cs    2007-05-29 13:34:01 UTC (rev 78120)
@@ -103,10 +103,11 @@
                                return false;
 
                        Method method = frame.Method;
-                       if ((method == null) || !method.HasSource || 
(method.Source == null))
+                       if ((method == null) || !method.HasLineNumbers ||
+                           (method.LineNumberTable == null))
                                return false;
 
-                       MethodSource source = method.Source;
+                       LineNumberTable source = method.LineNumberTable;
                        if (source.SourceBuffer == null)
                                return false;
 

Modified: trunk/debugger/languages/mono/MonoSymbolFile.cs
===================================================================
--- trunk/debugger/languages/mono/MonoSymbolFile.cs     2007-05-29 13:29:35 UTC 
(rev 78119)
+++ trunk/debugger/languages/mono/MonoSymbolFile.cs     2007-05-29 13:34:01 UTC 
(rev 78120)
@@ -722,7 +722,7 @@
                                SetAddresses (address.StartAddress, 
address.EndAddress);
                                SetMethodBounds (address.MethodStartAddress, 
address.MethodEndAddress);
 
-                               SetSource (new MonoMethodSource 
(file.MonoLanguage.SourceFileFactory, this, info, method, address.LineNumbers));
+                               SetLineNumbers (new MonoLineNumberTable 
(file.MonoLanguage.SourceFileFactory, this, info, method, address.LineNumbers));
                        }
 
                        void get_variables ()
@@ -958,7 +958,7 @@
 #endregion
                }
 
-               protected class MonoMethodSource : MethodSource
+               protected class MonoLineNumberTable : LineNumberTable
                {
                        int start_row, end_row;
                        JitLineNumberEntry[] line_numbers;
@@ -968,7 +968,7 @@
                        SourceFileFactory factory;
                        Hashtable namespaces;
 
-                       public MonoMethodSource (SourceFileFactory factory, 
Method imethod,
+                       public MonoLineNumberTable (SourceFileFactory factory, 
Method imethod,
                                                 SourceMethod source_method, 
C.MethodEntry method,
                                                 JitLineNumberEntry[] 
line_numbers)
                                : base (imethod, source_method.SourceFile)
@@ -1000,7 +1000,7 @@
                                }
                        }
 
-                       protected override MethodSourceData ReadSource ()
+                       protected override LineNumberTableData ReadLineNumbers 
()
                        {
                                ArrayList lines = new ArrayList ();
                                int last_line = -1;
@@ -1018,7 +1018,7 @@
                                lines.CopyTo (addresses, 0);
 
                                SourceBuffer buffer = factory.FindFile 
(source_method.SourceFile.FileName);
-                               return new MethodSourceData (
+                               return new LineNumberTableData (
                                        start_row, end_row, addresses, 
source_method, buffer,
                                        source_method.SourceFile.Module);
                        }
@@ -1236,7 +1236,7 @@
                        {
                                this.Entry = entry;
                                SetMethodBounds (entry.MethodStartAddress, 
entry.MethodEndAddress);
-                               SetSource (new WrapperMethodSource (this));
+                               SetLineNumbers (new WrapperLineNumberTable 
(this));
                                SetWrapperType (entry.WrapperType);
                        }
 
@@ -1271,11 +1271,11 @@
                        }
                }
 
-               protected class WrapperMethodSource : MethodSource
+               protected class WrapperLineNumberTable : LineNumberTable
                {
                        WrapperMethod wrapper;
 
-                       public WrapperMethodSource (WrapperMethod wrapper)
+                       public WrapperLineNumberTable (WrapperMethod wrapper)
                                : base (wrapper, null)
                        {
                                this.wrapper = wrapper;
@@ -1299,7 +1299,7 @@
                                }
                        }
 
-                       protected override MethodSourceData ReadSource ()
+                       protected override LineNumberTableData ReadLineNumbers 
()
                        {
                                ArrayList lines = new ArrayList ();
                                int last_line = -1;
@@ -1335,7 +1335,7 @@
                                LineEntry[] addresses = new LineEntry 
[lines.Count];
                                lines.CopyTo (addresses, 0);
 
-                               return new MethodSourceData (
+                               return new LineNumberTableData (
                                        1, cil_code.Length, addresses, null, 
buffer,
                                        wrapper.Entry.File.Module);
                        }

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

Reply via email to