mono / sdb

A command line client for the Mono soft debugger.
https://www.mono-project.com
MIT License
117 stars 44 forks source link

Failure to inspect global variables while suspended in unmanaged #34

Open BrzVlad opened 8 years ago

BrzVlad commented 8 years ago

public static void Main (string[] args) { while (true) Thread.Sleep (1000); } Running this code under sdb and forcing a stop (Ctrl C). If we are in the top frame we fail to inspect global variables ex : print System.Environment.CommandLine. Failing with Result is unrepresentable (Unknown, ReadOnly)

Probably unrelated, I can also get exceptions Mono.Debugger.Soft.VMNotSuspendedException: The vm is not suspended. when suspended in other unmanaged code (like Monitor.Enter)

alexrp commented 8 years ago

Failing with Result is unrepresentable (Unknown, ReadOnly)

The problem here is that there is no debug info for managed-to-native frames, so evaluation of anything will just fail immediately in the debugging libraries.

Need to think on what the right thing to do here is.

Probably unrelated, I can also get exceptions Mono.Debugger.Soft.VMNotSuspendedException: The vm is not suspended. when suspended in other unmanaged code (like Monitor.Enter)

This sounds like a bug in the debugging libraries.

DavidKarlas commented 8 years ago

This is runtime problem, afaik .Net has same problem... https://bugzilla.xamarin.com/show_bug.cgi?id=1637 Afaik there is no plan to fix this :(

alexrp commented 5 years ago

@DavidKarlas Do you know if there's been any progress on this on the runtime side since this issue was opened?

DavidKarlas commented 5 years ago

To my knowledge its still same story :(