Bug 407 - Cannot set breakpoint on the specified IL offset.
Summary: Cannot set breakpoint on the specified IL offset.
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: Trunk
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-08-25 07:19 UTC by Marek Safar
Modified: 2011-11-26 12:09 UTC (History)
2 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 Developer Community or GitHub 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 Marek Safar 2011-08-25 07:19:06 UTC
using System;
using System.Collections.Generic;
using System.Diagnostics;

class A
{
	public static void Test ()
	{
		return;  // Set breakpoint here once hit change the cursor to empty line above class A and hit Enter
	}
}

class C
{
	public static void Main ()
	{
		A.Test ();
	}
}

MD throws

System.ArgumentException: Cannot set breakpoint on the specified IL offset.
  at Mono.Debugger.Soft.VirtualMachine.ErrorHandler (System.Object sender, Mono.Debugger.Soft.ErrorHandlerEventArgs args) [0x00069] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs:255 
  at Mono.Debugger.Soft.Connection.SendReceive (CommandSet command_set, Int32 command, Mono.Debugger.Soft.PacketWriter packet) [0x000ac] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1259 
  at Mono.Debugger.Soft.Connection.EnableEvent (EventType etype, SuspendPolicy suspend_policy, System.Collections.Generic.List`1 mods) [0x00254] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs:1831 
  at Mono.Debugger.Soft.EventRequest.SendReq (System.Collections.Generic.List`1 mods) [0x000a4] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs:106 
  at Mono.Debugger.Soft.BreakpointEventRequest.Enable () [0x00030] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEventRequest.cs:25 
  at Mono.Debugger.Soft.VirtualMachine.SetBreakpoint (Mono.Debugger.Soft.MethodMirror method, Int64 il_offset) [0x00009] in /home/marek/git/monodevelop/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs:222 
  at Mono.Debugging.Soft.SoftDebuggerSession.InsertBreakpoint (Mono.Debugging.Client.Breakpoint bp, Mono.Debugging.Soft.BreakInfo bi) [0x00000] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:709 
  at Mono.Debugging.Soft.SoftDebuggerSession.OnInsertBreakEvent (Mono.Debugging.Client.BreakEvent ev) [0x0004a] in /home/marek/git/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs:655 
  at Mono.Debugging.Client.DebuggerSession.AddBreakEvent (Mono.Debugging.Client.BreakEvent be) [0x00000] in /home/marek/git/monodevelop/main/src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs:544
Comment 1 Zoltan Varga 2011-11-16 10:33:18 UTC
Finally got a repro for this, with mono master + md master:

using System.Collections.Generic;
using System.Globalization;

class A
{
    public static void Main ()
    {
        var v = new List<int> () { 4, 3 };
        return;
    } // set a bp on this line
}
Comment 2 Zoltan Varga 2011-11-26 12:09:52 UTC
Should be fixed in HEAD/2.10.