Bug 2854 - Support for moving debugger instruction pointer
Summary: Support for moving debugger instruction pointer
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: Trunk
Hardware: PC Windows
: Low enhancement
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-01-11 19:24 UTC by Mikayla Hutchinson [MSFT]
Modified: 2014-05-01 15:10 UTC (History)
6 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 Mikayla Hutchinson [MSFT] 2012-01-11 19:24:52 UTC
The debugger should support moving the instruction pointer within the current method
Comment 1 Marek Safar 2012-02-06 10:47:50 UTC
I spoke to Zoltan about this on last xummit and he said it should be possible to implement without too much work.
Comment 2 Zoltan Varga 2012-02-06 11:49:38 UTC
Its pretty easy to implement it, its just hard to implement it in a way that doesn't make the app crash. I.e. for this code:

object o = new object ();
...
o.ToString ()

the JIT might not generate code to null initialize 'o', so if the initialization statement is skipped using this functionality, 'o' might contain garbage leading to a hard crash. Same for an exception handler which expects the exception to be in a stack location saved at the beginning of the code generated for the catch clause. Also, finally statements are implemented in a strange way inside the JIT, so if the user moves the ip inside a finally statement, or out of it, things will crash also.

All of this can probably be fixed, but it would be a lot of work, it would be hard to test, and it would bloat the code generated in debug mode.
Comment 3 Marek Safar 2012-02-06 11:52:40 UTC
Is there any easy way for JIT to detect IP move is unsafe ?
Comment 4 Zoltan Varga 2012-02-06 13:25:26 UTC
No.
Comment 5 Lluis Sanchez 2013-03-05 20:36:14 UTC
What about always initializing the references when running in the debugger?
Comment 6 Jeffrey Stedfast 2014-05-01 15:06:27 UTC
this is implemented now