On Jan 7, 2008 11:50 AM, chromatic <[EMAIL PROTECTED]> wrote: > On Monday 07 January 2008 08:18:24 Geoffrey Broadwell wrote: > > > There is no way from PIR to determine the current runcore, and it does > > not appear in the output of 'parrot -v'. According to particle: > > > > ***** > > in c you can look at interp->run_core, so you can find it with gdb easily > > it's easy enough for me to create an opcode that can return the runcore > > ***** > > > > It seems like this should be available from interpinfo in PIR ... and > > since 'parrot -v' displays optimization information, it should probably > > display the runcore chosen as well. > > I'm not sure half of this is entirely useful. The way I've always selected a > runcore is on the command line, so you'd have to write: > > parrot --runcore=LOOKHERE -v > > ... to display the runcore you're using with -v. > > Being able to detect a particular runcore from within a program is much more > useful. > indeed, especially because you can switch between some runcores during program execution (e.g. trace and slow cores.) although it still won't help us find bugs like: if runcore == 'DEBUG' goto hide_bugs
i'm writing tests for a solution to this ticket now. i've geoff has tested my patch successfully, so it should be committed soon. ~jerry ~jerry