[Mono-dev] Debugging Busted CIL

2005-10-03 Thread Jim Purbrick
I'm currently trying to work out what is wrong with some assemblies I've generated and thought that people on the list might have some cunning techniques that I haven't thought of. Currently my process consists of running my app which embeds Mono, waiting for it to spit out an **ERROR**:Invalid IL

Re: [Mono-dev] Debugging Busted CIL

2005-10-03 Thread César Lopéz Natarén
On Mon, 2005-10-03 at 21:26 +0100, Jim Purbrick wrote: > I'm currently trying to work out what is wrong with > some assemblies I've generated and thought that people > on the list might have some cunning techniques that I > haven't thought of. > Are there any better ways? I briefly tried using MS >

Re: [Mono-dev] Debugging Busted CIL

2005-10-03 Thread Robert Jordan
Hi Jim, I'm currently trying to work out what is wrong with some assemblies I've generated and thought that people on the list might have some cunning techniques that I haven't thought of. How are you generating the assemblies? Are this assemblies generated by MS tools? Mono doesn't support in

Re: [Mono-dev] Debugging Busted CIL

2005-10-03 Thread Jim Purbrick
Hi Robert, > How are you generating the assemblies? Are this > assemblies generated by MS tools? Mono doesn't > support incremental assemblies generated by CSC. I'm compiling LSL to CIL, then using the mono ILasm compiler to generate assemblies. > Did you verify the assembly? > > Mono: pedump

Re: [Mono-dev] Debugging Busted CIL

2005-10-04 Thread Jim Purbrick
> > Did you verify the assembly? > > > > Mono: pedump --verify code I'm now getting an interesting error from pedump: Error: Incompatible type Managed Pointer in store at 0x029a What I'm trying to do is store the result of a ldflda instruction. The StackBehaviourPush of the ldflda instructio

Re: [Mono-dev] Debugging Busted CIL

2005-10-04 Thread Jim Purbrick
> Is is possible to store and load Managed Pointers in > CIL? How? Sorry, should have googled a bit more before my last post. Looks like I can store a Managed Pointer in a local, but not a field :-( http://dotnet.di.unipi.it/EcmaSpec/PartitionIII/cont1.html#_Toc526908860 Looks like I won't be a

Re: [Mono-dev] Debugging Busted CIL

2005-10-04 Thread Mike Welham
Hi Jim Looks like I can store a Managed Pointer in a local, but not a field :-( If it were allowed then you could do nasty things like storing the address of a local variable in a field, and when the local's stack frame is destroyed there'd be a dangling pointer. Do any other ops push Man

Re: [Mono-dev] Debugging Busted CIL

2005-10-04 Thread Paolo Molaro
On 10/04/05 Jim Purbrick wrote: > The StackBehaviourPush of the ldflda instruction > returns pushi, so I try to store the result in an > int32, but MSDN > (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemreflectionemitopcodesclassldfldatopic.asp) > and the ECM

Re: [Mono-dev] Debugging Busted CIL

2005-10-04 Thread Jim Purbrick
> > Looks like I can store a Managed Pointer in a > > local, but not a field :-( > > Right, storing in a field would have both security > and performance effects in the GC, so it's not > allowed. OK, to solve that problem it looks as though the best approach is to make sure the value of the fie

Re: [Mono-dev] Debugging Busted CIL

2005-10-04 Thread Jim Purbrick
> Is there an easy way to go from the pointer to a > value? ldobj (must...google...before...posting!) Cheers, Jim. ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail h