Author: jbevain
Date: 2006-01-18 12:23:15 -0500 (Wed, 18 Jan 2006)
New Revision: 55738
Modified:
trunk/cecil/lib/ChangeLog
trunk/cecil/lib/CodeGen/templates/DebugHeader.cs
trunk/cecil/lib/Mono.Cecil.Binary/DebugHeader.cs
trunk/cecil/lib/Mono.Cecil.Cil/CodeWriter.cs
trunk/cecil/lib/Mono.Cecil.Metadata/MetadataToken.cs
Log:
2006-01-18 Jb Evain <[EMAIL PROTECTED]>
* Mono.Cecil.Cil/CodeWriter.cs
Mono.Cecil.Metadata/MetadataToken.cs:
Add an use an ToUInt method and use it.
CodeGen/templates/DebugHeader.cs
Mono.Cecil.Binary/DebugHeader.cs:
Fix the size of the debug header.
Modified: trunk/cecil/lib/ChangeLog
===================================================================
--- trunk/cecil/lib/ChangeLog 2006-01-18 17:07:03 UTC (rev 55737)
+++ trunk/cecil/lib/ChangeLog 2006-01-18 17:23:15 UTC (rev 55738)
@@ -1,5 +1,12 @@
2006-01-18 Jb Evain <[EMAIL PROTECTED]>
+ * Mono.Cecil.Cil/CodeWriter.cs
+ Mono.Cecil.Metadata/MetadataToken.cs:
+ Add an use an ToUInt method and use it.
+ CodeGen/templates/DebugHeader.cs
+ Mono.Cecil.Binary/DebugHeader.cs:
+ Fix the size of the debug header.
+
* Mono.Cecil/ModuleReference.cs
Mono.Cecil/AssemblyName.cs
Mono.Cecil/StructureReader.cs
Modified: trunk/cecil/lib/CodeGen/templates/DebugHeader.cs
===================================================================
--- trunk/cecil/lib/CodeGen/templates/DebugHeader.cs 2006-01-18 17:07:03 UTC
(rev 55737)
+++ trunk/cecil/lib/CodeGen/templates/DebugHeader.cs 2006-01-18 17:23:15 UTC
(rev 55738)
@@ -57,7 +57,7 @@
public uint GetSize ()
{
- return 0x34 + (uint) FileName.Length;
+ return 0x34 + (uint) FileName.Length + 1;
}
public void Accept (IBinaryVisitor visitor)
Modified: trunk/cecil/lib/Mono.Cecil.Binary/DebugHeader.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Binary/DebugHeader.cs 2006-01-18 17:07:03 UTC
(rev 55737)
+++ trunk/cecil/lib/Mono.Cecil.Binary/DebugHeader.cs 2006-01-18 17:23:15 UTC
(rev 55738)
@@ -5,7 +5,7 @@
// Jb Evain ([EMAIL PROTECTED])
//
// Generated by /CodeGen/cecil-gen.rb do not edit
-// Mon Nov 28 18:29:34 CET 2005
+// Wed Jan 18 18:19:02 CET 2006
//
// (C) 2005 Jb Evain
//
@@ -64,7 +64,7 @@
public uint GetSize ()
{
- return 0x34 + (uint) FileName.Length;
+ return 0x34 + (uint) FileName.Length + 1;
}
public void Accept (IBinaryVisitor visitor)
Modified: trunk/cecil/lib/Mono.Cecil.Cil/CodeWriter.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/CodeWriter.cs 2006-01-18 17:07:03 UTC
(rev 55737)
+++ trunk/cecil/lib/Mono.Cecil.Cil/CodeWriter.cs 2006-01-18 17:23:15 UTC
(rev 55738)
@@ -68,7 +68,7 @@
if (token.RID == 0)
m_codeWriter.Write (0);
else
- m_codeWriter.Write (((uint) token.TokenType) |
token.RID);
+ m_codeWriter.Write (token.ToUInt ());
}
int GetParameterIndex (MethodBody body, ParameterDefinition p)
Modified: trunk/cecil/lib/Mono.Cecil.Metadata/MetadataToken.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Metadata/MetadataToken.cs 2006-01-18
17:07:03 UTC (rev 55737)
+++ trunk/cecil/lib/Mono.Cecil.Metadata/MetadataToken.cs 2006-01-18
17:23:15 UTC (rev 55738)
@@ -52,6 +52,11 @@
return new MetadataToken (table, (uint) rowIndex + 1);
}
+ public uint ToUInt ()
+ {
+ return (uint) m_type | m_rid;
+ }
+
public override string ToString ()
{
return string.Format ("{0} [0x{1}]",
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches