[mono-cecil] Re: Basic generics usage with Cecil

2007-06-14 Thread Jb Evain
Hi Max, You have to create a new MethodReference, with a declaring type being the type of the parameter which is the nullable generic instance. The best way to have something running, is to write what you want to have as a result, read the assembly with Cecil, analyse the code that is read and

[mono-cecil] Re: Bug in MethodBody.cs?

2007-06-19 Thread Jb Evain
Hi Dries, On 6/19/07, Dries Vanoverberghe [EMAIL PROTECTED] wrote: In MethodBody.cs, the methods SimplifyFromSByte/SimplifyFromByte cast the operand of an instruction to a sbyte/byte. The operand is actually an instruction, so the cast fails. This should be fixed in svn. I guess the

[mono-cecil] Re: MethodBody.Simplify

2007-06-19 Thread Jb Evain
Hey, On 6/19/07, Dries Vanoverberghe [EMAIL PROTECTED] wrote: I guess MethodBody.Simplify should also transform the leave.s instruction into a leave instruction. and making the OpcodeType of OpCodes.Leave_S a OpCodeType.Macro Fixed:

[mono-cecil] Re: Referencing Methods Of Generic Types

2007-06-21 Thread Jb Evain
Hey Max, On 6/21/07, Max Bolingbroke [EMAIL PROTECTED] wrote: Hi, it's me again. You must be getting pretty bored of this by now, but I'm having even more trouble with generics and Cecil. No problem, I'm perfectly aware that the Generic side of Cecil for that is way too complicated, but I'm

[mono-cecil] Re: Question about Mono.Cecil.Cil.Instruction.SequencePoint property

2007-06-25 Thread Jb Evain
Hey, On 6/23/07, Closer [EMAIL PROTECTED] wrote: How can I use SequencePoint property? Now it always returns null. This as not been documented, because it's not completely done. However, if you want to give it a try, you'll need to checkout the /cecil module of Mono's SVN. You'll have to

[mono-cecil] Re: Reading assembly referencing to other assemblies

2007-07-06 Thread Jb Evain
Hey Mario, On 7/5/07, Mario Carrión [EMAIL PROTECTED] wrote: Both AssemblyDefinition instances will contain the TypeDefinition instances from those assemblies, but what about when I don't know the local_assembly.dll path or the real GAC assembly name and version, is there a way to let Cecil

[mono-cecil] Re: Problems when loading obfuscated assemblies

2007-07-18 Thread Jb Evain
Hey, On 7/18/07, Wicky [EMAIL PROTECTED] wrote: I've tried to load many assemblies with Cecil. It works perfect for standard assemblies. But for some non-standard assemblies, such as obfuscated by Spices.net (http://www.9rays.net/Products/Spices.Net/), there are some problems. Could you

[mono-cecil] Re: Problems when loading obfuscated assemblies

2007-07-18 Thread Jb Evain
Hey, On 7/18/07, Wicky [EMAIL PROTECTED] wrote: Here is another assembly which will fail Cecil, please download from my site: http://simpledotnet.googlepages.com/NineRays.FlyGrid.zip Fixed in SVN. -- Jb --~--~-~--~~~---~--~~ -- mono-cecil

[mono-cecil] Re: Read/Write CustomAttribute with Cecil?

2007-07-19 Thread Jb Evain
Hey, On 7/19/07, Wicky [EMAIL PROTECTED] wrote: For example, this simple class: public class Class1 { [DefaultValue(DayOfWeek.Friday)] public DayOfWeek TestProperty { get { return DayOfWeek.Friday; } } } When I loaded the

[mono-cecil] Re: Rename properties and application crashes

2007-07-20 Thread Jb Evain
Hey, On 7/19/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: When i'm playing around with Mono.Cecil to rename properties, I have a problem: After renaming the application doesn't work anymore. What do you mean doesn't work anymore? BEFORE *** if (File.Exists(path)) {

[mono-cecil] Re: Cecil versus Reflection for NUnit

2007-07-23 Thread Jb Evain
Hi Charlie, Nice to have you on the list. On 7/23/07, charlie [EMAIL PROTECTED] wrote: I just joined this list because I've been thinking about using Cecil in NUnit, to replace most of the Reflection that is done to discover tests. With .Net 2.0, load times became much greater, with most of

[mono-cecil] Re: Cecil versus Reflection for NUnit

2007-07-23 Thread Jb Evain
Hey Fabian, On 7/23/07, Fabian Schmied [EMAIL PROTECTED] wrote: Well, this should probably not be discussed here, but I just want to mention that if your performance problems are in GetCustomAttributes, there might also be an alternative in the System.Reflection namespace: the

[mono-cecil] Re: What can we do with Mono.Cecil.Binary

2007-08-13 Thread Jb Evain
Cecil but found nothing. :(( You can get a PE binary by using Image img = Image.GetImage (foo.dll); Then you can have access to the pe structure, like the headers and the sections. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Strongly typed collections in Cecil's object model

2007-08-15 Thread Jb Evain
be easy to write something like: public static IQueryableT Query (this AssemblyDefinition assembly) { } -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: genericParameters not in context.GenericContext.Type.GenericParameters

2007-09-09 Thread Jb Evain
you the app directly, as apperently I can not add it here. Thanks for looking into it. - Rasmus On 8 Sep., 21:12, Jb Evain [EMAIL PROTECTED] wrote: Hey Rasmus, Thanks for taking the time to analyse the issue. Could you provide me with a test case reproducing your issue, so that I

[mono-cecil] Re: CustomAttributes in Mono.Cecil 0.6 - is it supported?

2007-11-09 Thread Jb Evain
Hey, On 11/9/07, JasonBock [EMAIL PROTECTED] wrote: Is this something that is not supported (yet) in Cecil 0.6? Or am I missing something? That usually works. Could you send your code to the list so we try to see if something obvious is missing/wrong? -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Code Sample

2007-11-27 Thread Jb Evain
Man, of course. On 11/27/07, Simon Brown [EMAIL PROTECTED] wrote: Can you post a code sample please? foo (42); -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Decompiling in-place addition

2007-12-10 Thread Jb Evain
On 12/10/07, Sanghyeon Seo [EMAIL PROTECTED] wrote: As per IRC discussion, here is combined patch for add, dup, and stfld instructions, complete with testcases. And as said on IRC, this is good to go, and will be checked in today. Thanks! -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: BUG: Emitting an ldfld opcode on a declaring type with generic parameters does not load the actual instantiated type token

2008-01-05 Thread Jb Evain
want to do is to create a FieldReference, with the approriate declaring type. Looking at your code, the declaring type should be a GenericInstanceType, with a GenericArgument being the GenericParameter of the type Sample`1. Generics are convoluted :) -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: BUG: Emitting an ldfld opcode on a declaring type with generic parameters does not load the actual instantiated type token

2008-01-05 Thread Jb Evain
); -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Cannot set breakpoint in assembly modified with Cecil

2008-01-09 Thread Jb Evain
on the ModuleDefinition you're working on just after GetAssembly, and SaveSymbols just before SaveAssembly. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Generics example? I cannot figure out how to do it...

2008-01-09 Thread Jb Evain
. Then you can emit what you've observed. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: I need to add an attribute to a library with cecil...

2008-01-09 Thread Jb Evain
On 1/9/08, Jb Evain [EMAIL PROTECTED] wrote: cil.Emit (OpCodes.Call, typeof (Attribute).GetConstructor (BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, null)); Actually, you have to Import the result of GetConstructor for it to work. -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: I need to add an attribute to a library with cecil...

2008-01-09 Thread Jb Evain
to get a link to it) Glad you like it. If it's useful to you, maybe you could contribute back a bit to the FAQ? That would be much appreciated. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Managing complex arrays

2008-01-09 Thread Jb Evain
going to publish that somewhere? -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: how to add an interface to a class with cecil ( with implementation )?

2008-01-11 Thread Jb Evain
Dude, On 1/11/08, ursuletzu [EMAIL PROTECTED] wrote: the question is in the title...I need an example please You're lucky I don't answer in the subject. Clue, a TypeDefinition have a .Interfaces collection. -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Custom attributes with blob data

2008-01-15 Thread Jb Evain
the attribute blob yourself? -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Custom attributes with blob data

2008-01-15 Thread Jb Evain
to my mind). But it's ok, simply throw a NotSupportedException in that kind of cases. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Found a bug in CilWorker

2008-01-16 Thread Jb Evain
) overload for that ldc.i4.s. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Get a MethodReference on a generic inherited method

2008-01-18 Thread Jb Evain
//MycollectionTwo generated with cecil { bool Contains(IMyInterface i) { base.Contains(i); //that's what I want :) } } Here's you best chance to know what to generate. Compile that, open the generated with Cecil, dump the object model, and here you are, you'll know. -- Jb Evain

[mono-cecil] Re: Adding a resource to an assembley

2008-01-30 Thread Jb Evain
Hey, On 1/30/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Please can you give me a c# code sample of how to add a specific bitmap to an assembley as a resource? As a managed resource, or as a win32 resource? -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Problem loading assembly using cecil

2008-02-04 Thread Jb Evain
with a fresh Cecil checkout from SVN? -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Problem loading assembly using cecil

2008-02-04 Thread Jb Evain
? Yep, it's planned. I still have a few bug I want to kill and patch to integrate before it happens though. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Problem loading assembly using cecil

2008-02-04 Thread Jb Evain
Hey, On 2/4/08, hufman [EMAIL PROTECTED] wrote: I've tried fresh cecil from SVN and still no publickeytoken is being defined. can you think of another problem i might have? I'd need a repro to be able to fix it. -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Translating byte offset to element in CIL

2008-02-13 Thread Jb Evain
property. So it should not be too hard to get the instructions you want to change. One thing though, is that Cecil doesn't (yet?) support replacing instruction by a byte array. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Error when Loading Assembly with Cecil

2008-03-08 Thread Jb Evain
Hey, On 3/8/08, Wicky [EMAIL PROTECTED] wrote: I've uploaded it to http://wicky.hu.wq.googlepages.com/nhc.zip. Could you help to have a look? It's fixed in SVN. Am getting really fed up by those obfuscated in a completely non sensical way. -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Mono.Cecil round-trip breaks target CPU of an assembly

2008-03-10 Thread Jb Evain
Hey, On 3/9/08, Oleksiy Gapotchenko [EMAIL PROTECTED] wrote: Here is my file MonoCecilCLRFlags.patch for solving this bug: I just checked your patch in, thanks! -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: About UserStringsHeap

2008-03-25 Thread Jb Evain
operand. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: [0.6] Problems with enumerations in CustomAttributes

2008-04-08 Thread Jb Evain
change it to your own implementation if you have it loaded before, so it doesn't get loaded twice. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Mixed mode assemblies

2008-04-08 Thread Jb Evain
framework. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Mixed mode assemblies

2008-04-08 Thread Jb Evain
On 4/8/08, Liviu U [EMAIL PROTECTED] wrote: If saving the NEW assembly with cecil is impossible, is there a way to patch the IL for some methods and save the original assembly ( without interpreting it )? For the second time, no :) -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Cecil documentation, the mysterious TypeDefinition Module and differences from reflection

2008-04-11 Thread Jb Evain
Cecil gives you a more advanced view on this. * There's a lot of little details I'll let you dig that Cecil can handle, and that System.Reflection can not. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Cecil documentation, the mysterious TypeDefinition Module and differences from reflection

2008-04-11 Thread Jb Evain
. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Flow analysis: instruction stack depth

2008-04-22 Thread Jb Evain
of a method call and its arguments. Ideas? See the code in /cecil/flowanalysis You'll find there some code you could adapt to know the stack height depending on the instruction. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Named Parameters in Attribute Constructors

2008-04-23 Thread Jb Evain
CustomAttribute.ConstructorParameters. However, I can't find a way to access Default and Description. Is this possible? Sure thing! CustomAttribute ca = ...; object def = ca.Properties [Default]; object des = ca.Properties [Description]; -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Incorrect TypeReference.Namespace for a nested class

2008-04-28 Thread Jb Evain
. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: How to add a property to an existing Type.

2008-04-30 Thread Jb Evain
and the boolean value of value Type. You can create a TypeReference from a System.Type (a typeof expression works) using module.Import. You should read the FAQ: http://www.mono-project.com/Cecil:FAQ -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono

[mono-cecil] Re: Getting static field variable definitions

2008-05-03 Thread Jb Evain
would be to read the static constructor of SimpleRepository, and analyze its method body to determine which fields is associated to which factory method call. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: MethodBody.Clone patch

2008-05-06 Thread Jb Evain
Hey, On 5/2/08, Scott Peterson [EMAIL PROTECTED] wrote: The MethodBody.Clone method doesn't hook up the new instructions' Next and Previous properties. This should be fixed in svn. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Ambiguity in Generic Parameters in the Cecil object model

2008-05-12 Thread Jb Evain
Hey, On 5/12/08, Rune Glerup [EMAIL PROTECTED] wrote: I came up with an even weirder example! (Again only weird when compiled with the Visual C# compiler.) Thanks for the example, I'll investigate. -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Another patch to MethodBody.Clone

2008-05-13 Thread Jb Evain
Hey, On 5/13/08, Rune Glerup [EMAIL PROTECTED] wrote: - targets [i] = GetInstruction (body, nb, olds [i]); + targets [j] = GetInstruction (body, nb, olds [j]); Good catch, thanks! -- Jb Evain

[mono-cecil] Re: Patch for generics on .NET CF

2008-05-14 Thread Jb Evain
/tools/profiler Very nice! (but if it's not open source, it's not under the BSD, it's just closed source) I've included my patch below. It simply postpones creating the table until an actual constraint has been found to exist. Amazing, thanks for the patch! -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: problem with dllimport

2008-05-20 Thread Jb Evain
Hey, On 5/20/08, ksaini [EMAIL PROTECTED] wrote: Any solution??? Well yeah, it's a bug, so the solution is to fix it. Could you provide a self-reproducable test case so it can get fixed quickly? -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono

[mono-cecil] Re: Adding a Field to an existing assembly

2008-05-28 Thread Jb Evain
(A, A.Manually.Patched.dll); -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Adding a Field to an existing assembly

2008-05-28 Thread Jb Evain
Hey, On 5/28/08, Jair Cazarin [EMAIL PROTECTED] wrote: What about if instead of a field C.Tbase, I want to add a field of FuncC.Tbase? How can I deal with this kind of generic type?. Then you would have to create a proper instance of a GenericInstanceType to be used as a field type. -- Jb

[mono-cecil] Re: Bug Report: MethodBody.Simplify() renamed to MethodBody.Modify()

2008-05-28 Thread Jb Evain
Hey, On 5/28/08, Alex Lyman [EMAIL PROTECTED] wrote: Looks like the source in the svn trunk was modified in revision 87804, when adding MethodBody.Optimize(), an accidental change was made to rename MethodBody.Simplify() to MethodBody.Modify(). Ah, good catch, thanks! -- Jb Evain

[mono-cecil] Re: operandType of the constrained. prefix

2008-06-06 Thread Jb Evain
Hey, On 6/6/08, olerysc [EMAIL PROTECTED] wrote: Is it bug? or - does it have some reasons, which i don't know? Looks like a bug to me. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Simply opening and saving an assembly screws multidimensional array types up

2008-06-09 Thread Jb Evain
On 6/9/08, emvy [EMAIL PROTECTED] wrote: And I have to tell that the problem occurs in a situation when a generic method returns an array of its generic parameters. Could you please provide a test case? -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Simply opening and saving an assembly screws multidimensional array types up

2008-06-11 Thread Jb Evain
On 6/11/08, emvy [EMAIL PROTECTED] wrote: I have the solution. I'll send you the fix as soon a I get approval for that (company policies rule ;) ) Cool :) -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: TypeReference of bool

2008-07-07 Thread Jb Evain
Hey, On 7/7/08, akhin [EMAIL PROTECTED] wrote: How can I get typereference of bool ? The easy way: TypeReference bool_type = target_module_definition.Import (typeof (bool)); -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Inheritance depth

2008-07-07 Thread Jb Evain
that there's no problem for you to use this code in your project :). -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Class Derivation

2008-07-07 Thread Jb Evain
will result in changing the name of the type, and thus, as Cecil tries to maintain some type integrity, all things pointing to this type will see the change. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Type descendants

2008-07-10 Thread Jb Evain
Hey, On 7/10/08, Lev [EMAIL PROTECTED] wrote: Is there actually a way to do that, except going throug the whole inheritance tree? Nope. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Assembly obfuscation via the Mono.Cecil library

2008-07-11 Thread Jb Evain
in svn. 6. When will the Framework 3,5 format be fully supported? Huh ? -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Generic parameters: Missing primary constraints and constructor constraint

2008-07-22 Thread Jb Evain
Hey, On 7/21/08, Rune Glerup [EMAIL PROTECTED] wrote: Is this a bug, or have I overlooked some of the semantics of constraints on generic parameters? It's a bug. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Reading only one SecurityAttribute...

2008-09-02 Thread Jb Evain
, it all worked perfectly. Thanks for the patch! -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Bug in UserStringsHeap

2008-09-02 Thread Jb Evain
Hey, On 7/10/08, John Klenin [EMAIL PROTECTED] wrote: and example to realization from Microsoft.Cci: Please don't send decompiled close sources programs to this list. Anyway, this bug should be fixed in svn. -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Assembly Navigation

2008-09-04 Thread Jb Evain
, and annotate the objects, to know whether they could be removed or not. So it's for you to use. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Assembly Navigation

2008-09-04 Thread Jb Evain
? Yep. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: issue with marshal.h

2008-09-04 Thread Jb Evain
Hey, On 9/4/08, spiderM9 [EMAIL PROTECTED] wrote: The little driver program I wrote sets up a visitor, but the failure occurs very early inside AssemblyFactory.GetAssembly. Ok, this is fixed in svn. Thanks, -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Defining Generic Return Values?

2008-09-17 Thread Jb Evain
: var method = new MethodDefinition (name, attributes, null); var genericParam = new GenericParameter (T, method); method.GenericParameters.Add (genericParam); method.ReturnType.ReturnType = genericParam; Not very elegant, I admit. -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Defining Generic Return Values?

2008-09-17 Thread Jb Evain
. [token:0x0003] [MD]: Error: GenericParam is out of sequence by number. [token: 0x2A01 Any idea what that means? Thanks for your help, btw! Am not sure. Do you have a test case I could run? -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono

[mono-cecil] Re: [PATCH] Improve PDB support

2008-10-17 Thread Jb Evain
Hey Juerg, On 3/20/08, Juerg Billeter [EMAIL PROTECTED] wrote: Debugging rewritten assemblies in Visual Studio seems to work quite well with the attached patches applied. Finally, your patch is commited. Thanks! -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Short Form Instructions (like brtrue.s) are not changed after inserting Instructions between them and their operand

2008-10-27 Thread Jb Evain
Hey, On 10/27/08, Lotfi Gheribi [EMAIL PROTECTED] wrote: Your right, its MethodBody.Optimize Well, .Simplify decomposes every macro opcode to its full form (br.s - br), and optimize try to recompose the macros opcodes if possible (br - br.s if the jump offset doesn't overflow). -- Jb Evain

[mono-cecil] Re: changing assemblies references

2008-10-30 Thread Jb Evain
verification (by using sn -Vu), it may work. But it has never been tested afaik. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: changing assemblies references

2008-10-30 Thread Jb Evain
completely sure, all those types have an umnaged counter part, so if you modify the managed part, the other will break for sure. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Removing the Strong Name from an assembly?

2008-11-05 Thread Jb Evain
ILDASM/ILASM... the resulting assembly DOES work -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: recomputing assembly hash and resigning

2008-11-05 Thread Jb Evain
instead of a tool? thanks -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Invalid token error when calling an operator

2008-11-06 Thread Jb Evain
On 11/6/08, Romain Verdier [EMAIL PROTECTED] wrote: Btw, is there a better way to achieve such an operator lookup? Not as is. The current GetMethod story sucks terribly. I'll add that to my todo list. -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Cecil error Index was outside the bounds of the array. when visit method body

2008-11-06 Thread Jb Evain
Hey, On 11/6/08, Wicky [EMAIL PROTECTED] wrote: Maybe you think the last byte is useless because it should be unicode, but I find it is important. Yeah :) I'll revert my last patch and look for a better solution. Thanks for the head up. -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Bug with generic exception handling

2008-11-11 Thread Jb Evain
Hey, On 11/11/08, Gordon [EMAIL PROTECTED] wrote: It seems Cecil (latest svn) has problems to handle try-catch blocks with generic exception handling correctly. This sould be fixed in svn. Thanks! -- Jb Evain [EMAIL PROTECTED

[mono-cecil] Re: Array Signature Bug?!

2008-11-13 Thread Jb Evain
CorSigCompressSignedInt). But I don't think it's legal to copy the SSCLI implementation because of the license restrictions. It's definitely not legal, and now you're pretty much tainted. I won't be able to accept any of your contributions to Cecil about metadata signatures you could make. -- Jb Evain [EMAIL

[mono-cecil] Re: Possible error in calculation of MaxStack

2008-11-18 Thread Jb Evain
assembly, or you generating wrong code. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Possible error in calculation of MaxStack

2008-11-19 Thread Jb Evain
injecting code, and then calling .Optimize () afterwards. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Change debugging information question

2008-11-26 Thread Jb Evain
Hey, On 11/26/08, Steve Wagner [EMAIL PROTECTED] wrote: Hi Jb thanks for the answer! I will try this, but can i open and change an assembly which is compiled into memory this way? You can not modify an already loaded assembly and load it back in its AppDomain. -- Jb Evain [EMAIL

[mono-cecil] Re: Type Dependencies Revisited

2008-11-30 Thread Jb Evain
intefarces (IList, ICollection, IEnumerable) to the type definition. Some compilers don't do that, so you have to walk its hierarchy to browse all the interfaces the type actually implement. -- Jb Evain [EMAIL PROTECTED] --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Modopt bug.

2008-12-16 Thread Jb Evain
with Cecil and check the constructor parameters of the class Lucene.Net.Highlight.Highlighter. The bug isn't easy to reconstruct but there is the same issue with several other assemblies as well. Thanks for the repro, I'll have a look. -- Jb Evain j...@nurv.fr

[mono-cecil] Re: Modopt bug.

2008-12-17 Thread Jb Evain
On 12/17/08, Richard Flamsholt richard.flamsh...@gmail.com wrote: On 17 Dec., 14:46, Jb Evain j...@nurv.fr wrote: Sure. I just need sample assemblies. No problem. I'll mail you one straight away. Thanks! -- Jb Evain j...@nurv.fr

[mono-cecil] Re: Patch to make all Mono.Cecil collections implement IEnumerableT

2009-01-04 Thread Jb Evain
in. Thanks, -- Jb Evain j...@nurv.fr --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Newobj with TypeReference

2009-01-05 Thread Jb Evain
generic parameter. So it sometimes can be tricky to get things right. -- Jb Evain j...@nurv.fr --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Change debugging information question - BadImageFormatException

2009-01-05 Thread Jb Evain
and Cecil.Mdb. Happy new year and hope the neighbor's dog get silent soon :-) Happy new year! -- Jb Evain j...@nurv.fr --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Newobj with TypeReference

2009-01-05 Thread Jb Evain
On 1/5/09, Daniel Cazzulino kzu@gmail.com wrote: maybe I should just instantiate an ArrayList :p I can repro it now. Let me see if I can fixicate it quickly. -- Jb Evain j...@nurv.fr --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: How to ldfld?

2009-01-05 Thread Jb Evain
(__Interceptor, type, interceptorRef); Why don't you pass the definition directly to ldfld? A FieldDefinition is a FieldReference, so it works if you use the Definition in the assembly it's defined in. -- Jb Evain j...@nurv.fr --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Newobj with TypeReference

2009-01-05 Thread Jb Evain
On 1/5/09, Jb Evain j...@nurv.fr wrote: I can repro it now. Let me see if I can fixicate it quickly. That should be fixed in svn (the anonsvn will be updated in less than 30min from now). -- Jb Evain j...@nurv.fr --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: How to ldfld?

2009-01-05 Thread Jb Evain
add the newly created FieldReference to the .MemberReferences of the module. Painful, I know :) -- Jb Evain j...@nurv.fr --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Newobj with TypeReference

2009-01-05 Thread Jb Evain
= il.Create(OpCodes.Newobj, objectRef); Aren't your extensions methods duplicating the Import code? I mean, you can do: var type_obj = module.Import (typeof (object)); Does that work for you? -- Jb Evain j...@nurv.fr --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Newobj with TypeReference

2009-01-05 Thread Jb Evain
TypeReference. -- Jb Evain j...@nurv.fr --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

[mono-cecil] Re: Prb with Module.TypeReferences

2009-01-06 Thread Jb Evain
Hey, On 1/6/09, Lotfi Gheribi gheri...@gmail.com wrote: Could you please tell me if is there any chance this could be fixed ? Sorry I did not followed up, but it should be fixed with yesterday's patch. Could you try and give it a try? Thanks, -- Jb Evain j...@nurv.fr

[mono-cecil] Projects Using Cecil

2009-01-06 Thread Jb Evain
Hey Group, I've recently updated the page «Projects Using Cecil» on the Google Group. If you're aware of projects that I'm not, please help list them here. Alternatively, you can answer to this mail, and I'll add them myself. Thanks, -- Jb Evain j...@nurv.fr

[mono-cecil] Re: Generic type instanciation

2009-01-15 Thread Jb Evain
in the Import method. Reflection gives you a completely closed method for you to invoke it, but the Import code should deal with that. -- Jb Evain j...@nurv.fr --~--~-~--~~~---~--~~ -- mono-cecil -~--~~~~--~~--~--~---

  1   2   3   4   5   6   7   8   9   >