[Mono-dev] Strange enum issue

Neale Ferguson neale at sinenomine.net
Tue Mar 10 21:13:35 UTC 2015


Definitely the problem:

ves_icall_System_Enum_GetEnumValuesAndNames.3229: 0. field=System_Runtime
value=0
ves_icall_System_Enum_GetEnumValuesAndNames.3229: 1.
field=System_Runtime_InteropServices_WindowsRuntime value=16777216
ves_icall_System_Enum_GetEnumValuesAndNames.3229: 2.
field=System_ObjectModel value=33554432
ves_icall_System_Enum_GetEnumValuesAndNames.3229: 3.
field=System_Runtime_WindowsRuntime value=50331648
ves_icall_System_Enum_GetEnumValuesAndNames.3229: 4.
field=System_Runtime_WindowsRuntime_UI_Xaml value=67108864
ves_icall_System_Enum_GetEnumValuesAndNames.3229: 5. field=Count
value=83886080

Note 16777216 is hex 10000000. Now to find out how that value gets placed
there and to do some byte swapping on it.


Neale

P.S. I am wondering if it would be worth it to create a routine or more in
icall.c to do the byte swap for 2/4/8 byte integers rather than coding up
clumsy stuff in managed code.

On 3/10/15, 3:01 PM, "Robert Jordan" <robertj at gmx.net> wrote:

>There was a recent commit which added MS' reference source Enum
>support to Mono:
>
>https://github.com/mono/mono/commit/65dba595eaea2c871d1f72fbdc04f6440350af
>96
>
>Maybe it's an endian-related issue.



More information about the Mono-devel-list mailing list