I just committed some modifications to make panics produce better
output.  I'll paste a sample here (I got it by commenting out a line in
embed.c, thus inducing a panic in pmc_new):

        Parrot VM: PANIC: Null vtable used!
        C file c:\brent\visual studio projects\perl 6\parrot\parrot\pmc.c, line
48
        Parrot file (not available), line 1128877404

        We highly suggest you notify the Parrot team if you have not been
working on
        Parrot.  Use bugs6.perl.org or send an e-mail to
[EMAIL PROTECTED]
        Include the entire text of this error message and the text of the
script that
        generated the error.  If you've made any modifications to Parrot,
please
        describe them as well.

        Version     : 0.0.3
        Configured  : Fri Feb 15 14:25:35 2002
        Architecture: i386-nojit
        JIT Capable : No

        Interp Flags: 0x54454e2e
        Exceptions  : (missing from core)

        Dumping core...

        Sorry, coredump is not yet implemented for this platform.

Core dumping isn't implemented yet.  Different platforms have different
ways to do it--on DOS you call abort(), on Unix you send yourself a
SIGABRT, etc.  Perl 5 wraps it in a macro called ABORT(), but there's
some Perl 5-specific stuff in some of the definitions.

That reminds me--put in panics!  I think the only panic in the entire
core is in pmc_new, and I'm sure there are plenty of other places where
they'd be appropriate.  The one in pmc_new is just this:

    if(!pmc->vtable || !pmc->vtable->init) {
        /* This is usually because you either didn't call init_world
early
           enough or you added a new PMC class without adding
           Parrot_(classname)_class_init to init_world. */
        PANIC("Null vtable used");
        return NULL;
    }

You'll need to have an interpreter called 'interpreter' in scope, too,
but that's almost always the case anyways.

A couple side effects:

        -a new define, PARROT_CONFIG_DATE, is now available in config.h
        -aliases for several internal data types are also in config.h

Those aliases are the first wave of my upcoming embedding patch
(exposing several important data structures and functions, like the
string subsystem, to the outside world).

--Brent Dax
[EMAIL PROTECTED]
Parrot Configure pumpking and regex hacker
Check out the Parrot FAQ: http://www.panix.com/~ziggy/parrot.html (no,
it's not mine)

<obra> mmmm. hawt sysadmin chx0rs
<lathos> This is sad. I know of *a* hawt sysamin chx0r.
<obra> I know more than a few.
<lathos> obra: There are two? Are you sure it's not the same one?

Reply via email to