[comp.lang.perl] a debugger problem...

leo@aai.com (06/28/90)

leo@aai.com writes:
The problem, included below for reference, turned out to be a C
compiler/library problem.  Thanks to Bill Mann for suggesting that
possibility and pointing me in the right direction!

I haven't had a chance to pin it down more than that, and I don't know if
I'll have time to.  Since Larry also has a Masscomp, we may be able to make
some guesses by comparing configurations.  What I CAN tell you is that I
rebuilt perl using gcc and the problem disappeared.

Thanks again to Bill and Larry!  Having a (working) debugger in a language
with awk/sed/sh capabilities is WONDERFUL!

Leo	leo@aai.com   leo%aai@uunet.uu.net   ...uunet!aai!leo

>I'm a new perl user.  One of the things I like most about perl so far is
>the debugger.  I've have some problems with it though, on our Masscomp.  I
>recently built perl 3.18 on our Sun 3 and Masscomp 5600.  On the Masscomp,
>when using the debugger the perl program bombs whenever a subroutine is
>called with any arguments.  The program works correctly without the
>debugger.  A demonstration script is below.  Note that the same program
>works correctly with the debugger on the Sun - I only see the problem on
>the Masscomp.  Any hints or clues on how to track this down?  It looks like
>a jump to zero problem or something similar.  How do you debug the
>debugger?! 

>Script started on Mon Jun 25 17:28:00 1990
>% cat test.pl
>do foo(1);

>sub foo {
>    for $arg (@_) {
>	print $arg . "\n";
>    }
>}
>% perl test.pl
>1
>% perl -d test.pl

>Loading DB from perldb.pl 3.0.1.2 90/03/12

>main(1):	do foo(1);
>  DB<1> s
>Undefined subroutine "main" called at test.pl line 408.
>% 
>script done on Mon Jun 25 17:29:24 1990
-- 
Leo	leo@aai.com   leo%aai@uunet.uu.net   ...uunet!aai!leo

leo@aai.com (06/28/90)

leo@aai.com writes:
>I haven't had a chance to pin it down more than that, and I don't know if
>I'll have time to.  Since Larry also has a Masscomp, we may be able to make
>some guesses by comparing configurations.  What I CAN tell you is that I
>rebuilt perl using gcc and the problem disappeared.

Further testing reveals that it's an optimizer problem, but not in either
of the two modules (doargs.c, str.c) that Bill Mann suggested as most
likely.

I don't have any more time to play with it.  GCC compiles it properly
optimized and the Masscomp compiler gets it right if not optimized.
-- 
Leo	leo@aai.com   leo%aai@uunet.uu.net   ...uunet!aai!leo
-- 
Leo	leo@aai.com   leo%aai@uunet.uu.net   ...uunet!aai!leo