Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@novell.com>2004-01-13 05:06:25 +0300
committerMartin Baulig <martin@novell.com>2004-01-13 05:06:25 +0300
commit89c9825191c39216ad52f7b34235f12e42cbe207 (patch)
treef7c6f177f2e084c5879704f52fdff43a519070e0 /mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs
parent31b1c8e496b7c374a61da6e0a32069eeca9c3565 (diff)
Added a comment about BuildLineNumberTable().
svn path=/trunk/mcs/; revision=22000
Diffstat (limited to 'mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs')
-rw-r--r--mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs b/mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs
index 3436c1d47df..b54f322cbc3 100644
--- a/mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs
+++ b/mcs/class/Mono.CSharp.Debugger/MonoSymbolTable.cs
@@ -663,6 +663,19 @@ namespace Mono.CSharp.Debugger
ClassTypeIndex = file.DefineType (method.ReflectedType);
}
+ // BuildLineNumberTable() eliminates duplicate line numbers and ensures
+ // we aren't going "backwards" since this would counfuse the runtime's
+ // debugging code (and the debugger).
+ //
+ // In the line number table, the "offset" field most be strictly
+ // monotonic increasing; that is, the next entry must not have an offset
+ // which is equal to or less than the current one.
+ //
+ // The most common case is that our input (ie. the line number table as
+ // we get it from mcs) contains several entries with the same offset
+ // (and different line numbers) - but it may also happen that the offset
+ // is decreasing (this can be considered as an exception, such lines will
+ // simply be discarded).
LineNumberEntry[] BuildLineNumberTable (LineNumberEntry[] line_numbers)
{
ArrayList list = new ArrayList ();