Skip to content

Commit 0af644c

Browse files
authored
Merge pull request #82 from mono/bug45792
[Session] Fix every source file having a copy of every method instance.
2 parents ac17c08 + 25a8ddc commit 0af644c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Mono.Debugging.Soft/SoftDebuggerSession.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,16 +2606,19 @@ bool LoadMdbFile(string mdbFileName)
26062606

26072607
using(MonoSymbolFile mdb = MonoSymbolFile.ReadSymbolFile(mdbFileName))
26082608
{
2609-
foreach (var src in mdb.Sources)
2609+
foreach (var cu in mdb.CompileUnits)
26102610
{
26112611
MdbSourceFileInfo info = new MdbSourceFileInfo ();
26122612

2613+
var src = cu.SourceFile;
26132614
info.Hash = src.Checksum;
26142615
info.FileID = src.Index;
26152616
info.FullFilePath = src.FileName;
26162617

2617-
foreach (var method in mdb.Methods)
2618-
info.Methods.Add (new MethodMdbInfo{ SequencePoints = method.GetLineNumberTable ().LineNumbers });
2618+
foreach (var method in mdb.Methods) {
2619+
if (method.CompileUnitIndex == cu.Index)
2620+
info.Methods.Add (new MethodMdbInfo { SequencePoints = method.GetLineNumberTable ().LineNumbers });
2621+
}
26192622

26202623
fileToSourceFileInfos [src.FileName] = new List<MdbSourceFileInfo> ();
26212624

0 commit comments

Comments
 (0)