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)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

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