Symbols
6 posts • Page 1 of 1
Re: Symbols
Look at MethodBodyDeclaration.SymbolDocument (will be public in the next build) and InstructionEmitter.EmitSymbolSequencePoint.
I've never tried to emit brandly new symbols, so if there is a usability problem, please be so kind to report it.
Thank you,
Gael
Gael Fraiteur, project leader
got good support? consider donating to the project.
got good support? consider donating to the project.
- gfraiteur
- Site Admin
- Posts: 581
- Joined: Tue Dec 18, 2007 3:09 pm
- Full Name: Gael Fraiteur
- Company: postsharp.org
Re: Symbols
hmm .. it would seem to me the kind of mangling you are doing is pretty much pointless (esp AOP stuff) if you don't update the symbols as debugging won't work
I will check out this section tonight for a few.
Greg Young
- greg
- Posts: 3
- Joined: Sat Jan 12, 2008 4:55 pm
- Full Name: Greg Young
Re: Symbols
Well existing symbols are of course updated and debugging works fairly well. What I said is that nobody (as far I as know) has ever tried to emit completely new symbols, for instance to use postsharp as a compiler backend. That's why nobody complained that the MethodBodyDeclaration.SymbolDocument property was not public (since it was only used internally).
Gael Fraiteur, project leader
got good support? consider donating to the project.
got good support? consider donating to the project.
- gfraiteur
- Site Admin
- Posts: 581
- Joined: Tue Dec 18, 2007 3:09 pm
- Full Name: Gael Fraiteur
- Company: postsharp.org
Re: Symbols
I guess whether you were emitting new symbols would depend a bit on how your weave operated. In particular whether you supported pushing code directly (i.e. get advice as IL from another method) and do the weave in place as opposed to weaving in a method call. One might think of it as inlining advice. This is also quite a bit more complex to do in general. I have considerred trying this for a few things but havn't played with the pdbs enough to see how well (if) they could even support this type of thing.
Thanks, I will download/check it out a bit later tonight. Looks pretty nice so far. Also how stable are these things at this point?
Cheers,
Greg
Greg Young
- greg
- Posts: 3
- Joined: Sat Jan 12, 2008 4:55 pm
- Full Name: Greg Young
Re: Symbols
Debug symbols: don't be afraid, I don't manipulate directly PDB. PostSharp uses ILASM as a backend and sequence points simply use the '.line' directive.
Stability: the Code Model is fairly stable and used in still alpha versions of two commercial products, including DataObjects.NET 4.0.
Gael Fraiteur, project leader
got good support? consider donating to the project.
got good support? consider donating to the project.
- gfraiteur
- Site Admin
- Posts: 581
- Joined: Tue Dec 18, 2007 3:09 pm
- Full Name: Gael Fraiteur
- Company: postsharp.org
6 posts • Page 1 of 1