Symbols

Discuss simply about anything.

Symbols

Postby greg on Mon Feb 26, 2007 9:20 pm


Does PostSharp support outputting of new symbols? Is there an API reference for how I should be setting values for things like source lines?

Cheers,

Greg
Greg Young
greg
 
Posts: 3
Joined: Sat Jan 12, 2008 4:55 pm
Full Name: Greg Young

Re: Symbols

Postby gfraiteur on Mon Feb 26, 2007 10:11 pm


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.
gfraiteur
Site Admin
 
Posts: 673
Joined: Tue Dec 18, 2007 3:09 pm
Full Name: Gael Fraiteur
Company: postsharp.org

Re: Symbols

Postby greg on Mon Feb 26, 2007 10:47 pm


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

Postby gfraiteur on Tue Feb 27, 2007 12:03 am


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.
gfraiteur
Site Admin
 
Posts: 673
Joined: Tue Dec 18, 2007 3:09 pm
Full Name: Gael Fraiteur
Company: postsharp.org

Re: Symbols

Postby greg on Tue Feb 27, 2007 12:21 am


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

Postby gfraiteur on Tue Feb 27, 2007 5:15 am


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.
gfraiteur
Site Admin
 
Posts: 673
Joined: Tue Dec 18, 2007 3:09 pm
Full Name: Gael Fraiteur
Company: postsharp.org


Return to Unordered Thoughts


cron