Bytecode annotations - annotations op and custom backtraces

François Perrad francois.perrad at gadz.org
Sat Jan 10 19:50:37 UTC 2009


2009/1/10 Jonathan Worthington <jonathan at jnthn.net>:
> François Perrad wrote:
>>
>> The 2 methods 'backtrace' & 'annotations' in PMC Exception are useful
>> for post-mortem debug.
>> I think that PMC ParrotInterpreter needs the same methods with the
>> same interface ie the same output structure.
>> Many languages have a backtrace in their debug support.
>>
>>
>
> You mean, getting a backtrace even without any exception being thrown?

Yes. In a debug session, you want know where you come from.
So a backtrace from the current position.
In Lua, there is a debug.traceback() function.
Python has a 'traceback' module - print or retrieve a stack traceback.

François

>
>> The introspection interface of ParrotInterpreter needs to know annotations
>>   $P0 = getinterp
>>   $P1 = $P0['sub'; level]
>>   $P2 = $P0['annotations', level]  # currently not supported
>>
>>
>
> I can see that being useful, yes - and it shouldn't be hard to put in
> either. If nobody objects, I can add this.
>
> Thanks!
>
> Jonathan
>
>
>


More information about the parrot-dev mailing list