473,789 Members | 2,773 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ILASM/ILDASM bug(?)

Hi,

I found through a lot of exhausting searching, that the following C#
code will cause the IL code below:

const byte ICON_MONO12BY12 =0;

....... IL-file....
.field literal private static unsigned int8 'a' = uint8 (0)

When ILASM tries to compile the IL code, I get this error:
error : syntax error at token 'uint8' in: .field literal public
static unsigned int8 'a' = uint8 (0)

If I change my C# code to use 'const sbyte ...' then it works.

Does anyone know if there is a fix for this bug? (somewhere to get
better ILASM/ILDASM executables?)

May 6 '06 #1
5 4193
>I found through a lot of exhausting searching, that the following C#
code will cause the IL code below:

const byte ICON_MONO12BY12 =0;

...... IL-file....
.field literal private static unsigned int8 'a' = uint8 (0)


I can't reproduce this. Which version of Ildasm and Ilasm are you
using? The output I get is

..field private static literal unsigned int8 ICON_MONO12BY12 =
int8(0x00)

from the Ildasm v1.1 and

..field private static literal uint8 ICON_MONO12BY12 = uint8(0x00)

from the 2.0 version. Note that uint8 is only a keyword in 2.0, in
previous version you used 'unsigned int8'.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
May 6 '06 #2
Could this be just the QUOTEALLNAMES command line option?

"gp********@gma il.com" wrote:
Hi,

I found through a lot of exhausting searching, that the following C#
code will cause the IL code below:

const byte ICON_MONO12BY12 =0;

....... IL-file....
.field literal private static unsigned int8 'a' = uint8 (0)

When ILASM tries to compile the IL code, I get this error:
error : syntax error at token 'uint8' in: .field literal public
static unsigned int8 'a' = uint8 (0)

If I change my C# code to use 'const sbyte ...' then it works.

Does anyone know if there is a fix for this bug? (somewhere to get
better ILASM/ILDASM executables?)

May 6 '06 #3

Mattias Sjögren wrote:
.field private static literal unsigned int8 ICON_MONO12BY12 =
int8(0x00)

from the Ildasm v1.1 and

.field private static literal uint8 ICON_MONO12BY12 = uint8(0x00)

from the 2.0 version. Note that uint8 is only a keyword in 2.0, in
previous version you used 'unsigned int8'.


I have ildasm v2.x. I'm getting this problem with the annoying
Dotfrustrator Community Edition. It seems it has an ilasm embedded in
it somewhere, because I can't find it in my filesystem. I can't check
it's version, but it is probably 1.1, thus the conflict.

Do you know where I can download ildasm v1.1?

May 8 '06 #4
I'm not aware of what this option does, but it is being used (by
Dotfrustrator Community Edition, which is the source of all this
stress).

May 8 '06 #5
> I'm not aware of what this option does, but it is being used (by
Dotfrustrator Community Edition, which is the source of all this
stress).


The ildasm command line help (ildasm /? at the command prompt) gives:

/QUOTEALLNAMES Include all names into single quotes.

So, you coded this:

const byte ICON_MONO12BY12 =0;

The obfuscator changed "CON_MONO12BY12 "to "a", and then QUOTEALLNAMES added
the single quotes to yield:

.field literal private static unsigned int8 'a' = uint8 (0)

I'm fairly confident that this explains what went wrong. I'm not sure what
to do about it - no experience with obfuscator and limited experience with
ildasm/ilasm. Maybe you can turn the option off. Maybe you can tell ilasm
to expect single quotes. I thinik this is an obfuscator issue, not an IL
issue, so maybe a repost in a different forum might help.
May 8 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
284
by: Bob | last post by:
I'm taking a first look at MSIL and downloaded a sample project. In the file I see this message: * Build with "ilasm /EXE mandelbrot.il" on .Net RTM I can find ilasm nowhere, not on my hard drive, not on the VS.Net installation discs, not on the web. And my search for RTM gives me info on the compact framswork or response time monitoring... apparetnely I'm still a newbie looking for a clue...
2
6538
by: yoz | last post by:
Hi, I am unsure where to post this. I have an MSIL dll. ---- ..assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) .ver 1:0:5000:0
5
6072
by: Wiktor Zychla | last post by:
Hello, are there any good references to .NET history? I would like to read some more about the development of the ILasm language and the C# language. were they developed separately? is it true that the first c# compilers targeted JVM because the .NET RE was not ready at that time? how the ideas of old VJ++ platform affected the .NET development? unfortunately, I didn't find any good resources on that topic over the Internet. I am even...
4
2735
by: Wiktor Zychla | last post by:
Hello, for some reason I need to use attributes in ILAsm code and read these attributes in C# code. My problem is with the attribute declaration inside ILAsm code. I know that I define any attribute by using ILasm's ".custom" keyword but I do not understand how to initialize the attribute Value blob when the attribute contains some fields. I just do not understand that binary format: ..custom instance void MyAttribute::.ctor(bool) =...
3
6228
by: Papanii | last post by:
Hi, I am a newbi in C# and i was trying to use the ILDASM command to check out the MSIL code of some compiled code. Unfortunatley I can't get it to run. I get the error "Windows cannot find ILDASM". Does anyone have a solution to this? Thanx --Papanii p.s. I have visual studio .net 2003 installed on my machine.
4
1370
by: Ioannis Vranos | last post by:
I have some thoughts lately, to get on ILASM. However may someone tell me whether the introduction of generics etc will have as a result additions or changes to the .NET assembly language? Regards,
9
2588
by: VeNoM00 | last post by:
ILDasm retrieves the MSIL code of an assembly (exe or dll). So everyone can obtain my code! I don't like this thing! Can I prevent this?
2
1941
by: masoud moosavi | last post by:
hello, please give me the syntax of the ilasm language programmin,or write a simple program , thanks a lot
1
1571
by: ajk | last post by:
Hi When doing a .NET compiler what are the benefits of generating ILAsm directly compared to generating another higher level language like C# first and then using the C# compiler? Round-tripping will not work and debugging may be easier, any other reasons why it would be prefered to generate ILAsm? tia/ajk
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10412
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5422
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3703
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.