Bug 4697 - Wrong type displayed for pointer types
Summary: Wrong type displayed for pointer types
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: Trunk
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2012-04-27 12:39 UTC by Marek Safar
Modified: 2012-04-27 20:53 UTC (History)
2 users (show)

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

ptr-types.patch (6.51 KB, application/octet-stream)
2012-04-27 16:03 UTC, Jeffrey Stedfast

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:

Description Marek Safar 2012-04-27 12:39:33 UTC
unsafe {
	char* ptr = null;

Add ptr to watch window, Type column shows "long" which is not right
Comment 1 Jeffrey Stedfast 2012-04-27 16:03:57 UTC
Created attachment 1768 [details]

This fixes the displayed type name, but breaks some of the unit tests :(

Will come back to this one later...
Comment 2 Jeffrey Stedfast 2012-04-27 16:06:59 UTC
oh, also, ideally we'd probably display "null" in the value column instead of "0"
Comment 3 Jeffrey Stedfast 2012-04-27 18:27:11 UTC
the gist of the problem is that the VM sends MD the value of "ptr" to us as a long in Mono.Debugger.Soft.StackFrame.GetValue(LocalVariable)

we then query the runtime for the type of this Value object, and we get "System.Int64".

I'm not sure how to handle this.

Comment 4 Jeffrey Stedfast 2012-04-27 20:53:24 UTC
This is how I ended up implementing this.