François" PERRAD <[EMAIL PROTECTED]> wrote:
> The line "Null PMC access in invoke()" jumps at the end after the > backtrace, and it's unexpected.
Ah yep. Mixing stderr/stdout in tests a PITA.
> I try the following patch,
Try to insert these lines:
PIO_flush(interpreter, PIO_STDOUT(interpreter)); PIO_flush(interpreter, PIO_STDERR(interpreter));
Not possible in the function internal_exception() because 'interpreter' is not a parameter.
But, I solve the problem in all cases with the following patch in the beginning of the fonction PDB_backtrace()
Index: src/debug.c
===================================================================
--- src/debug.c (revision 7910)
+++ src/debug.c (working copy)
@@ -2945,6 +2945,8 @@
PMC *old = PMCNULL;
int rec_level = 0;
+ fflush(stderr); + /* information about the current sub */ sub = interpinfo_p(interpreter, CURRENT_SUB); if (!PMC_IS_NULL(sub)) {
Francois.
which should get the Parrot's stdout/stderr to the console and then ...
> va_start(arglist, format); > vfprintf(stderr, format, arglist); > fprintf(stderr, "\n"); > + fflush(stderr);
flush the stderr. This still might reorder the test output, but it should be consistent: i.e. all output so far should come before the exception output.
> Francois Perrad
leo