Bug 25358 - Invalid mdb scopes for variables
Summary: Invalid mdb scopes for variables
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Marek Safar
URL:
: 10188 18430 21232 25946 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-12 17:43 UTC by David Karlaš
Modified: 2015-01-27 12:59 UTC (History)
5 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description David Karlaš 2014-12-12 17:43:28 UTC
If scopes in .mdb file are invalid XS Debugger(or debugger-libs) can't
determine which "e" is correct one.

First code example:
using System.IO;
using System;

namespace ExceptionEvalFails
{
  class MainClass
  {
    public static void Main (string[] args)
    {
      try {
        throw new Exception ();
      } catch (IOException e) {
        Console.WriteLine (e);
      } catch (Exception e) {
        Console.WriteLine (e);//Breakpoint here
      }
    }
  }
}

This is mdbdump output(notice that it has 3 scopes but both variables are in 0
scope):
<?xml version="1.0" encoding="ibm852"?>
<symbols>
  <files>
    <file id="1" name="Program.cs" checksum="70feb5658988698896c6888b83696faf"
/>
    <file id="2" name="AssemblyInfo.cs"
checksum="53e1ea137859b9367e3248e7436133cc" />
  </files>
  <methods>
    <method token="0x6000001" signature="System.Void
ExceptionEvalFails.MainClass::.ctor()">
      <sequencepoints />
      <locals />
      <scopes />
    </method>
    <method token="0x6000002" signature="System.Void
ExceptionEvalFails.MainClass::Main(System.String[])">
      <sequencepoints>
        <entry il="0x0" row="9" col="5" file_ref="1" />
        <entry il="0x1" row="10" col="11" file_ref="1" />
        <entry il="0x2" row="11" col="15" file_ref="1" />
        <entry il="0x8" row="12" col="9" file_ref="1" />
        <entry il="0x9" row="12" col="31" file_ref="1" />
        <entry il="0xa" row="13" col="9" file_ref="1" />
        <entry il="0xb" row="13" col="17" file_ref="1" />
        <entry il="0x10" row="14" col="7" file_ref="1" />
        <entry il="0x11" row="14" col="9" file_ref="1" />
        <entry il="0x17" row="14" col="29" file_ref="1" />
        <entry il="0x18" row="15" col="9" file_ref="1" />
        <entry il="0x19" row="15" col="17" file_ref="1" />
        <entry il="0x1e" row="16" col="7" file_ref="1" />
        <entry il="0x24" row="17" col="5" file_ref="1" />
      </sequencepoints>
      <locals>
        <entry name="e" il_index="0" scope_ref="0" />
        <entry name="e" il_index="1" scope_ref="0" />
      </locals>
      <scopes>
        <entry index="0" start="0x2" end="0x8" />
        <entry index="1" start="0xa" end="0x10" />
        <entry index="2" start="0x18" end="0x1e" />
      </scopes>
    </method>
  </methods>
</symbols>
Comment 1 David Karlaš 2015-01-07 00:39:24 UTC
*** Bug 18430 has been marked as a duplicate of this bug. ***
Comment 2 David Karlaš 2015-01-07 00:40:08 UTC
*** Bug 21232 has been marked as a duplicate of this bug. ***
Comment 3 David Karlaš 2015-01-07 00:50:42 UTC
*** Bug 10188 has been marked as a duplicate of this bug. ***
Comment 4 David Karlaš 2015-01-12 15:32:24 UTC
*** Bug 25946 has been marked as a duplicate of this bug. ***
Comment 5 Marek Safar 2015-01-27 12:59:55 UTC
Fixed in mono master

Note You need to log in before you can comment on or make changes to this bug.