diff --git a/doc/ref/debug.xml b/doc/ref/debug.xml index 857ee5e941..7121efabd7 100644 --- a/doc/ref/debug.xml +++ b/doc/ref/debug.xml @@ -915,41 +915,33 @@ to terminate the calculation, or enter Return; to continue it. gap> dive:= function(depth) if depth>1 then dive(depth-1); fi; return; end; function( depth ) ... end gap> dive(100); -gap> OnBreak:= function() Where(1); end; # shorter traceback -function( ) ... end +gap> OnBreak:= function() Where(2); end;; # shorter traceback gap> dive(6000); -recursion depth trap (5000) - at -dive( depth - 1 ); - called from -dive( depth - 1 ); called from -... -Entering break read-eval-print loop ... -you can 'quit;' to quit to outer loop, or -you may 'return;' to continue +Error, recursion depth trap (5000) +*[1] dive( depth - 1 ); + @ *stdin*:1 + [2] dive( depth - 1 ); + @ *stdin*:1 +... at *stdin*:4 +you may 'return;' brk> return; gap> dive(11000); -recursion depth trap (5000) - at -dive( depth - 1 ); - called from -dive( depth - 1 ); called from -... -Entering break read-eval-print loop ... -you can 'quit;' to quit to outer loop, or -you may 'return;' to continue +Error, recursion depth trap (5000) +*[1] dive( depth - 1 ); + @ *stdin*:1 + [2] dive( depth - 1 ); + @ *stdin*:1 +... at *stdin*:5 +you may 'return;' brk> return; -recursion depth trap (10000) - at -dive( depth - 1 ); - called from -dive( depth - 1 ); called from -... -Entering break read-eval-print loop ... -you can 'quit;' to quit to outer loop, or -you may 'return;' to continue -brk> return; -gap> +Error, recursion depth trap (10000) +*[1] dive( depth - 1 ); + @ *stdin*:1 + [2] dive( depth - 1 ); + @ *stdin*:1 +... at *stdin*:5 +you may 'return;' +brk> return;gap> ]]>

@@ -979,39 +971,29 @@ gap> dive := function(depth) > fi; > end;; gap> SetRecursionTrapInterval(1000); +gap> OnBreak:= function() Where(2); end;; # shorter traceback gap> dive(100); Depth 100 gap> dive(2500); -recursion depth trap (1000) - at -dive( depth - 1 ); - called from -dive( depth - 1 ); called from -... -Entering break read-eval-print loop ... -you can 'quit;' to quit to outer loop, or -you may 'return;' to continue +Error, recursion depth trap (1000) +*[1] dive( depth - 1 ); + @ *stdin*:4 + [2] dive( depth - 1 ); + @ *stdin*:4 +... at *stdin*:12 +you may 'return;' brk> return; -recursion depth trap (2000) - at -dive( depth - 1 ); - called from -dive( depth - 1 ); called from -... -Entering break read-eval-print loop ... -you can 'quit;' to quit to outer loop, or -you may 'return;' to continue +Error, recursion depth trap (2000) +*[1] dive( depth - 1 ); + @ *stdin*:4 + [2] dive( depth - 1 ); + @ *stdin*:4 +... at *stdin*:12 +you may 'return;' brk> GetRecursionDepth(); 0 brk> return; -gap> SetRecursionTrapInterval(-1); -Error, SetRecursionTrapInterval: must be a small integer greater than 5 (n\ -ot the integer -1) -not in any function -Entering break read-eval-print loop ... -you can 'quit;' to quit to outer loop, or -you can replace via 'return ;' to continue -brk> return 0; +gap> SetRecursionTrapInterval(2^50); gap> dive(20000); Depth 20000 gap> dive(2000000); diff --git a/doc/ref/grpperm.xml b/doc/ref/grpperm.xml index bf651a6487..7bc558efbd 100644 --- a/doc/ref/grpperm.xml +++ b/doc/ref/grpperm.xml @@ -652,11 +652,7 @@ gap> h:=Group(permutationlist); gap> StabChainOptions(h).random:=1;; gap> Size(h); -exceeded the permitted memory (`-o' command line option) at -mlimit := 1; called from -SCRMakeStabStrong( S.stabilizer, [ g ], param, orbits, where, basesize, - base, correct, missing, false ); called from - SCRMakeStabStrong( S.stabilizer, [ g ], param, orbits, where, basesize, +exceeded the permitted memory (`-o' command line option) ... ]]>

diff --git a/doc/ref/language.xml b/doc/ref/language.xml index 78b2d1faf4..cab355969b 100644 --- a/doc/ref/language.xml +++ b/doc/ref/language.xml @@ -1556,24 +1556,19 @@ If the expression expr is a function call then this function must return a value. If the function does not return a value an error is signalled and you enter a break loop (see ). As usual you can leave the break loop with quit;. -If you enter return return-expr; the value of the expression -return-expr is assigned to the variable, -and execution continues after the assignment.

f1:= function( x ) Print( "value: ", x, "\n" ); end;; gap> f2:= function( x ) return f1( x ); end;; gap> f2( 4 ); value: 4 -Function Calls: must return a value at -return f1( x ); - called from -( ) called from read-eval-loop -Entering break read-eval-print loop ... -you can 'quit;' to quit to outer loop, or -you can supply one by 'return ;' to continue -brk> return "hello"; -"hello" +Error, Function Calls: must return a value +*[1] f1( x ) + @ *stdin*:2 +( ) + called from read-eval loop at *stdin*:3 +type 'quit;' to quit to outer loop +brk> ]]>

In the above example, the function f2 calls f1 with argument diff --git a/doc/ref/methsel.xml b/doc/ref/methsel.xml index 2083632a97..1ce2674710 100644 --- a/doc/ref/methsel.xml +++ b/doc/ref/methsel.xml @@ -125,19 +125,15 @@ objecty, a "No Method Found" error will be returned. XCons(IsFullTransformationMonoid,4); Error, no method found! For debugging hints type ?Recovery from NoMethodFound -Error, no 1st choice method found for `XCons' on 2 arguments called from -( ) - called from read-eval loop at line 8 of *stdin* -you can 'quit;' to quit to outer loop, or -you can 'return;' to continue +Error, no 1st choice method found for `XCons' on 2 arguments +called from read-eval loop at *stdin*:8 +type 'quit;' to quit to outer loop brk> quit; gap> XCons(IsNilpotentGroup,4); Error, no method found! For debugging hints type ?Recovery from NoMethodFound -Error, no 1st choice method found for `XCons' on 2 arguments called from -( ) - called from read-eval loop at line 9 of *stdin* -you can 'quit;' to quit to outer loop, or -you can 'return;' to continue +Error, no 1st choice method found for `XCons' on 2 arguments +called from read-eval loop at *stdin*:8 +type 'quit;' to quit to outer loop brk> ]]> @@ -435,4 +431,3 @@ the mathematical term centre. - diff --git a/doc/ref/mloop.xml b/doc/ref/mloop.xml index a0f844dd4d..ca1a723482 100644 --- a/doc/ref/mloop.xml +++ b/doc/ref/mloop.xml @@ -476,11 +476,9 @@ indicate that you are in a break loop.

1/0; -Rational operations: must not be zero -not in any function -Entering break read-eval-print loop ... -you can 'quit;' to quit to outer loop, or -you can replace via 'return ;' to continue +Error, Rational operations: must not be zero +not in any function at *stdin*:2 +type 'quit;' to quit to outer loop ]]>

If errors occur within a break loop ⪆ enters another break loop at a @@ -488,12 +486,10 @@ If errors occur within a break loop ⪆ enters another break loop at a

1/0; -Rational operations: must not be zero -not in any function -Entering break read-eval-print loop ... -you can 'quit;' to quit to outer loop, or -you can replace via 'return ;' to continue -brk_02> +Error, Rational operations: must not be zero +not in any function at *stdin*:2 +type 'quit;' to quit to outer loop +brk_2> ]]>

There are two ways to leave a break loop, @@ -511,7 +507,7 @@ Note that ⪆ code between quit; and the end of the input line is ignored.

quit; +brk_2> quit; brk> ]]>

@@ -750,25 +746,30 @@ same as while also showing the arguments and local variables of each function.

StabChain(SymmetricGroup(100)); # After this we typed ^C -user interrupt at -bpt := S.orbit[1]; - called from -SiftedPermutation( S, (g * rep) ^ -1 ) called from -StabChainStrong( S.stabilizer, [ sch ], options ); called from -StabChainStrong( S.stabilizer, [ sch ], options ); called from -StabChainStrong( S, GeneratorsOfGroup( G ), options ); called from -StabChainOp( G, rec( - ) ) called from -... -Entering break read-eval-print loop ... -you can 'quit;' to quit to outer loop, or -you can 'return;' to continue +gap> StabChain(SymmetricGroup(1000)); # After this we typed ^C +Error, user interrupt +*[1] genlabels := Filtered( genlabels, function ( x ) + return pnt ^ sgs[x] = pnt; + end ); + @ GAPROOT/lib/stbc.gi:426 + [2] StabChainBaseStrongGenerators( dom{[ 1 .. Length( dom ) - 1 ]}, sgs, () ) + @ GAPROOT/lib/gpprmsya.gi:2006 + [3] StabChainOp( G, rec( + ) ) + @ GAPROOT/lib/stbc.gi:28 + [4] StabChainImmutable( arg[1] ) + @ GAPROOT/lib/stbc.gi:18 +( ) + called from read-eval loop at *stdin*:2 +you can 'return;' brk> Where(2); - called from -SiftedPermutation( S, (g * rep) ^ -1 ) called from -StabChainStrong( S.stabilizer, [ sch ], options ); called from -... +*[1] genlabels := Filtered( genlabels, function ( x ) + return pnt ^ sgs[x] = pnt; + end ); + @ GAPROOT/lib/stbc.gi:426 + [2] StabChainBaseStrongGenerators( dom{[ 1 .. Length( dom ) - 1 ]}, sgs, () ) + @ GAPROOT/lib/gpprmsya.gi:2006 +... at *errin*:1 ]]>

Note that the variables displayed even in the first line of the @@ -836,10 +837,14 @@ Error, ! you can 'quit;' to quit to outer loop, or you can 'return;' to continue brk> Where(); -*[1] Error( "!\n" ); at *stdin*:3 called from - [2] test( n + 1 ); at *stdin*:3 called from - [3] test( n + 1 ); at *stdin*:3 called from - [4] test( n + 1 ); at *stdin*:3 called from +*[1] Error( "!\n" ); + @ *stdin*:4 + [2] test( n + 1 ); + @ *stdin*:4 + [3] test( n + 1 ); + @ *stdin*:4 + [4] test( n + 1 ); + @ *stdin*:4 ( ) called from read-eval loop at *errin*:1 brk> n; @@ -848,20 +853,28 @@ brk> DownEnv(); brk> n; 3 brk> Where(); - [1] Error( "!\n" ); at *stdin*:3 called from -*[2] test( n + 1 ); at *stdin*:3 called from - [3] test( n + 1 ); at *stdin*:3 called from - [4] test( n + 1 ); at *stdin*:3 called from + [1] Error( "!\n" ); + @ *stdin*:4 +*[2] test( n + 1 ); + @ *stdin*:4 + [3] test( n + 1 ); + @ *stdin*:4 + [4] test( n + 1 ); + @ *stdin*:4 ( ) called from read-eval loop at *errin*:5 brk> DownEnv( 2 ); brk> n; 1 brk> Where(); - [1] Error( "!\n" ); at *stdin*:3 called from - [2] test( n + 1 ); at *stdin*:3 called from - [3] test( n + 1 ); at *stdin*:3 called from -*[4] test( n + 1 ); at *stdin*:3 called from + [1] Error( "!\n" ); + @ *stdin*:4 + [2] test( n + 1 ); + @ *stdin*:4 + [3] test( n + 1 ); + @ *stdin*:4 +*[4] test( n + 1 ); + @ *stdin*:4 ( ) called from read-eval loop at *errin*:8 brk> DownEnv( -2 ); @@ -894,10 +907,13 @@ gap> fun := function() local x; x := 3; bar(); end; function( ) ... end gap> fun(); Error, !! - called from -bar( ); called from -( ) called from read-eval-loop -Entering break read-eval-print loop ... +Stack trace: +*[1] Error( "!!\n" ); + @ *stdin*:4 + [2] bar( ); + @ *stdin*:7 +( ) + called from read-eval loop at *stdin*:8 you can 'quit;' to quit to outer loop, or you can 'return;' to continue brk> x; diff --git a/doc/tut/group.xml b/doc/tut/group.xml index edf420d7ee..3d19ea2713 100644 --- a/doc/tut/group.xml +++ b/doc/tut/group.xml @@ -927,11 +927,12 @@ gap> Size( Image( hom, DerivedSubgroup(s4) ) );

PreImage( hom, (1,2,3) ); -Error, must be an inj. and surj. mapping called from +Error, must be an injective and surjective mapping +*[1] ErrorNoReturn( " must be an injective and surjective ", "mapping" ); + @ GAPROOT/lib/mapping.gi:262 ( ) - called from read-eval loop at line 4 of *stdin* -you can 'quit;' to quit to outer loop, or -you can 'return;' to continue + called from read-eval loop at *stdin*:7 +type 'quit;' to quit to outer loop brk> quit; ]]>

@@ -1258,4 +1259,3 @@ Chapter . - diff --git a/doc/tut/introduc.xml b/doc/tut/introduc.xml index 212491772e..5b30a56b8a 100644 --- a/doc/tut/introduc.xml +++ b/doc/tut/introduc.xml @@ -253,8 +253,8 @@ We will no longer mention the Return key from now on. break loops Sometimes a syntax error will cause ⪆ to enter a break loop. This is indicated by the special prompt brk>. If another syntax error occurs -while ⪆ is in a break loop, the prompt will change to brk_02>, -brk_03> and so on. You can leave the current break loop and exit to the +while ⪆ is in a break loop, the prompt will change to brk_2>, +brk_3> and so on. You can leave the current break loop and exit to the next outer one by either typing quit; or by hitting Ctrl-D. Eventually ⪆ will return to its normal state and show its normal prompt gap> again. diff --git a/doc/tut/migrat.xml b/doc/tut/migrat.xml index e99e9bee47..bf73228ae0 100644 --- a/doc/tut/migrat.xml +++ b/doc/tut/migrat.xml @@ -857,31 +857,50 @@ gap> test:= function( n ) > if n > 3 then Error( "!\n" ); fi; test( n+1 ); end;; gap> test( 1 ); Error, ! -Entering break read-eval-print loop ... +at *stdin*:6 you can 'quit;' to quit to outer loop, or you can 'return;' to continue brk> Where(); - called from -test( n + 1 ); called from -test( n + 1 ); called from -test( n + 1 ); called from -( ) called from read-eval-loop +*[1] Error( "!\n" ); + @ *stdin*:4 + [2] test( n + 1 ); + @ *stdin*:4 + [3] test( n + 1 ); + @ *stdin*:4 + [4] test( n + 1 ); + @ *stdin*:4 +( ) + called from read-eval loop at *errin*:1 brk> n; 4 brk> DownEnv(); brk> n; 3 brk> Where(); - called from -test( n + 1 ); called from -test( n + 1 ); called from -( ) called from read-eval-loop + [1] Error( "!\n" ); + @ *stdin*:4 +*[2] test( n + 1 ); + @ *stdin*:4 + [3] test( n + 1 ); + @ *stdin*:4 + [4] test( n + 1 ); + @ *stdin*:4 +( ) + called from read-eval loop at *errin*:5 brk> DownEnv( 2 ); brk> n; 1 brk> Where(); - called from -( ) called from read-eval-loop + [1] Error( "!\n" ); + @ *stdin*:4 + [2] test( n + 1 ); + @ *stdin*:4 + [3] test( n + 1 ); + @ *stdin*:4 +*[4] test( n + 1 ); + @ *stdin*:4 +( ) + called from read-eval loop at *errin*:8 brk> DownEnv( -2 ); brk> n; 3 @@ -1205,4 +1224,3 @@ found in the file tst/compat3.tst of the ⪆ 4 distribution. - diff --git a/doc/tut/opers.xml b/doc/tut/opers.xml index 7d1c6ee918..6413348e73 100644 --- a/doc/tut/opers.xml +++ b/doc/tut/opers.xml @@ -216,8 +216,9 @@ If no applicable method (or no next applicable method) is found, ⪆ stops with an error message of the form

You would get an error message as above if you asked for Size( 1 ). diff --git a/lib/error.g b/lib/error.g index fbaceed8a3..fe1040a6ac 100644 --- a/lib/error.g +++ b/lib/error.g @@ -134,7 +134,7 @@ BIND_GLOBAL("PRETTY_PRINT_VARS", function(context) end); BIND_GLOBAL("WHERE", function(depth, context, activecontext, showlocals) - local bottom, lastcontext, f, level; + local bottom, lastcontext, f, level, totaldepth, countcontext; if depth <= 0 then return; fi; @@ -144,14 +144,25 @@ BIND_GLOBAL("WHERE", function(depth, context, activecontext, showlocals) return; fi; lastcontext := context; + totaldepth := 0; + countcontext := context; + while totaldepth < depth and countcontext <> bottom do + totaldepth := totaldepth + 1; + countcontext := ParentLVars(countcontext); + od; level := 1; while depth > 0 and context <> bottom do - PRINT_CURRENT_STATEMENT(ERROR_OUTPUT, context, activecontext, level); + PRINT_CURRENT_STATEMENT( + ERROR_OUTPUT, + context, + activecontext, + level, + totaldepth); if showlocals then PRETTY_PRINT_VARS(context); + else + PrintTo(ERROR_OUTPUT, "\n"); fi; - - PrintTo(ERROR_OUTPUT, " called from\n"); lastcontext := context; context := ParentLVars(context); depth := depth-1; diff --git a/lib/ffe.gd b/lib/ffe.gd index c784120634..3eeddef057 100644 --- a/lib/ffe.gd +++ b/lib/ffe.gd @@ -119,10 +119,15 @@ ## Z(11,40); ## Error, Conway Polynomial 11^40 will need to computed and might be slow -## return to continue called from -## FFECONWAY.ZNC( p, d ) called from -## ( ) called from read-eval-loop -## Entering break read-eval-print loop ... +## return to continue +## *[1] Error( "Conway Polynomial ", p, "^", d, " will need to computed and might be slow\n", "return to continue" ); +## @ GAPROOT/lib/ffeconway.gi:81 +## [2] FFECONWAY.SetUpConwayStuff( p, d ); +## @ GAPROOT/lib/ffeconway.gi:140 +## [3] FFECONWAY.ZNC( p, d ) +## @ GAPROOT/lib/ffeconway.gi:167 +## ( ) +## called from read-eval loop at *stdin*:2 ## you can 'quit;' to quit to outer loop, or ## you can 'return;' to continue ## brk> diff --git a/lib/grpfp.gd b/lib/grpfp.gd index 81552fde8d..eaa41d6421 100644 --- a/lib/grpfp.gd +++ b/lib/grpfp.gd @@ -78,14 +78,18 @@ fi; ## Group([ b ]) ## gap> Index( f, u ); ## Error, the coset enumeration has defined more than 4096000 cosets -## called from -## TCENUM.CosetTableFromGensAndRels( fgens, grels, fsgens ) called from -## CosetTableFromGensAndRels( fgens, grels, fsgens ) called from -## TryCosetTableInWholeGroup( H ) called from -## CosetTableInWholeGroup( H ) called from -## IndexInWholeGroup( H ) called from -## ... -## Entering break read-eval-print loop ... +## Stack trace: +## *[1] Error( "the coset enumeration has defined more ", "than ", limit, " cosets\n" ); +## @ GAPROOT/lib/grpfp.gi:1230 +## [2] TCENUM.CosetTableFromGensAndRels( fgens, grels, fsgens ) +## @ GAPROOT/lib/grpfp.gi:1068 +## [3] CosetTableFromGensAndRels( fgens, grels, fsgens ) +## @ GAPROOT/lib/grpfp.gi:1346 +## [4] TryCosetTableInWholeGroup( H ) +## @ GAPROOT/lib/grpfp.gi:1359 +## [5] CosetTableInWholeGroup( H ) +## @ GAPROOT/lib/grpfp.gi:1733 +## ... at *stdin*:3 ## type 'return;' if you want to continue with a new limit of 8192000 cosets, ## type 'quit;' if you want to quit the coset enumeration, ## type 'maxlimit := 0; return;' in order to continue without a limit diff --git a/lib/integer.gd b/lib/integer.gd index 558a0b90e6..20ca4e07ed 100644 --- a/lib/integer.gd +++ b/lib/integer.gd @@ -248,12 +248,14 @@ DeclareGlobalFunction( "BestQuoInt" ); ## ]]> ## ChineseRem( [ 6, 10, 14 ], [ 1, 2, 3 ] ); -## Error, the residues must be equal modulo 2 called from -## ( ) called from read-eval-loop -## Entering break read-eval-print loop ... +## Error, the residues must be equal modulo 2 +## *[1] Error( "the residues must be equal modulo ", g.gcd ); +## @ GAPROOT/lib/integer.gi:391 +## ( ) +## called from read-eval loop at *stdin*:2 ## you can 'quit;' to quit to outer loop, or ## you can 'return;' to continue -## brk> gap> +## brk> ## ]]> ## ## diff --git a/lib/oper1.g b/lib/oper1.g index faadb4af32..2c25bf1cff 100644 --- a/lib/oper1.g +++ b/lib/oper1.g @@ -928,10 +928,13 @@ end); ##

## SylowSubgroup( s4, 6 ); -## Error, SylowSubgroup:

must be a prime called from -## called from -## ( ) called from read-eval-loop -## Entering break read-eval-print loop ... +## Error, SylowSubgroup:

must be a prime +## *[1] <> +## @ GAPROOT/lib/oper1.g:964 +## [2] <> +## @ GAPROOT/lib/oper1.g:1007 +## ( ) +## called from read-eval loop at *stdin*:3 ## you can 'quit;' to quit to outer loop, or ## you can 'return;' to continue ## brk> quit; diff --git a/lib/smgideal.gi b/lib/smgideal.gi index 3ba57c809f..0069431be9 100644 --- a/lib/smgideal.gi +++ b/lib/smgideal.gi @@ -281,14 +281,7 @@ BindGlobal( "IsBound_SemigroupIdealEnumerator", function( enum, n ) ## s := f/r; ## Size(s); ## -## recursion depth trap (5000) -## at -## return Size( UnderlyingCollection( enum ) ); -## Length( Enumerator( C ) ) called from -## Size( UnderlyingCollection( enum ) ) called from -## Length( Enumerator( C ) ) called from -## Size( UnderlyingCollection( enum ) ) called from -## Length( Enumerator( C ) ) called from +## would otherwise end up in an infinite recursion. ## ############################################################################# diff --git a/src/calls.c b/src/calls.c index 6440cbe3a5..5eb7db9a88 100644 --- a/src/calls.c +++ b/src/calls.c @@ -1081,11 +1081,20 @@ void PrintKernelFunction(Obj func) Obj body = BODY_FUNC(func); Obj filename = body ? GET_FILENAME_BODY(body) : 0; if (filename) { + // A "location" is a string attached exclusively to GAP kernel + // functions; it is derived from the function's "cookie" which has the + // form "FILENAME:FUNCNAME" where `FUNCNAME` is the name of the + // underlying C function. Or at least more or less: in the GAP kernel, + // generally the *real* C function name will be `FuncFUNCNAME`. This + // may be rectified in the future. if ( GET_LOCATION_BODY(body) ) { Pr("<> from %g:%g", (Int)filename, (Int)GET_LOCATION_BODY(body)); } + // When compiling GAP code into C code, the gap compiler ("gac") attaches + // the filename and line number of the GAP code from which the C code was + // produced; that's the case we are running into here. else if ( GET_STARTLINE_BODY(body) ) { Pr("<> from %g:%d", (Int)filename, @@ -1093,6 +1102,18 @@ void PrintKernelFunction(Obj func) } } else { + // Some kernel code produces custom kernel functions (via direct calls + // to NewFunction or one of its relatives), and quite commonly does not + // bother setting a filename, location, or startline. In many cases + // this may be irrelevant as the user cannot see the result; e.g. for + // filters we have custom print/view methods, etc. But one rare exception + // are the bitfield helper: + // gap> Display(MakeBitfields(1).getters[1]); + // function ( data ) + // <> + // end + // TODO: add proper location info there, too, and audit all other uses + // of NewFunction* for this problem Pr("<>", 0, 0); } } diff --git a/src/code.h b/src/code.h index a66c7f40a6..110c673982 100644 --- a/src/code.h +++ b/src/code.h @@ -102,7 +102,8 @@ typedef struct { // if non-zero, this is either an immediate integer encoding the // line number where a function starts, or string describing the // location of a function. Typically this will be the name of a C - // function implementing it. + // function implementing it. See also `SetupFuncInfo` which derives + // it from the "cookie" associated to functions. Obj startline_or_location; // if non-zero, this is an immediate integer encoding the line @@ -127,9 +128,13 @@ void SET_FILENAME_BODY(Obj body, Obj val); UInt GET_GAPNAMEID_BODY(Obj body); void SET_GAPNAMEID_BODY(Obj body, UInt val); +// see documentation of `startline_or_location` for more information about the +// "location" of a body Obj GET_LOCATION_BODY(Obj body); void SET_LOCATION_BODY(Obj body, Obj val); +// see documentation of `startline_or_location` for more information about the +// "startline" of a body UInt GET_STARTLINE_BODY(Obj body); void SET_STARTLINE_BODY(Obj body, UInt val); UInt GET_ENDLINE_BODY(Obj body); diff --git a/src/error.c b/src/error.c index 32ac420a34..2618e32739 100644 --- a/src/error.c +++ b/src/error.c @@ -185,7 +185,8 @@ static Obj FuncCURRENT_STATEMENT_LOCATION(Obj self, Obj context) } static Obj FuncPRINT_CURRENT_STATEMENT(Obj self, Obj stream, Obj context, - Obj activeContext, Obj level) + Obj activeContext, Obj level, + Obj totalDepth) { if (IsBottomLVars(context)) return 0; @@ -207,18 +208,49 @@ static Obj FuncPRINT_CURRENT_STATEMENT(Obj self, Obj stream, Obj context, BOOL rethrow = FALSE; GAP_TRY { + UInt levelInt = INT_INTOBJ(level); + UInt totalDepthInt = INT_INTOBJ(totalDepth); + UInt prefixWidth = 0; + UInt levelWidth = 0; + UInt i; + + char prefix[32]; Obj func = FUNC_LVARS(context); + Obj funcname = NAME_FUNC(func); + Int line = -1; GAP_ASSERT(func); Stat call = STAT_LVARS(context); Obj body = BODY_FUNC(func); Obj filename = GET_FILENAME_BODY(body); + + while (totalDepthInt > 0) { + prefixWidth++; + totalDepthInt /= 10; + } + if (activeContext != Fail) { - Pr(context == activeContext ? "*[%d] " : " [%d] ", - INT_INTOBJ(level), 0); + i = levelInt; + while (i > 0) { + levelWidth++; + i /= 10; + } + snprintf(prefix, sizeof(prefix), "%c%*s[%lu] ", + context == activeContext ? '*' : ' ', + (int)(prefixWidth - levelWidth), "", + (unsigned long)levelInt); + Pr("%s", (Int)prefix, 0); } - if (IsKernelFunction(func)) { + if (IsKernelFunction(func) && filename && GET_STARTLINE_BODY(body)) { + if (funcname) { + Pr("<>", (Int)funcname, 0); + } + else { + Pr("<>", 0, 0); + } + line = GET_STARTLINE_BODY(body); + } + else if (IsKernelFunction(func)) { PrintKernelFunction(func); - Obj funcname = NAME_FUNC(func); if (funcname) { Pr(" in function %g", (Int)funcname, 0); } @@ -233,14 +265,21 @@ static Obj FuncPRINT_CURRENT_STATEMENT(Obj self, Obj stream, Obj context, Int type = TNUM_STAT(call); if (FIRST_STAT_TNUM <= type && type <= LAST_STAT_TNUM) { PrintStat(call); - Pr(" at %g:%d", (Int)filename, LINE_STAT(call)); + line = LINE_STAT(call); } else if (FIRST_EXPR_TNUM <= type && type <= LAST_EXPR_TNUM) { PrintExpr(call); - Pr(" at %g:%d", (Int)filename, LINE_STAT(call)); + line = LINE_STAT(call); } SWITCH_TO_OLD_LVARS(currLVars); } + if (line > 0) { + Pr("\n", 0, 0); + for (i = 0; i < prefixWidth + 2; i++) { + Pr(" ", 0, 0); + } + Pr("@ %g:%d", (Int)filename, line); + } } GAP_CATCH { @@ -644,8 +683,8 @@ static StructGVarFunc GVarFuncs[] = { GVAR_FUNC_2ARGS(CALL_WITH_CATCH, func, args), GVAR_FUNC_1ARGS(JUMP_TO_CATCH, payload), - GVAR_FUNC_4ARGS(PRINT_CURRENT_STATEMENT, stream, context, activeContext, - level), + GVAR_FUNC_5ARGS(PRINT_CURRENT_STATEMENT, stream, context, activeContext, + level, totalDepth), GVAR_FUNC_1ARGS(CURRENT_STATEMENT_LOCATION, context), GVAR_FUNC_1ARGS(SetUserHasQuit, value), diff --git a/tst/testinstall/kernel/gap.tst b/tst/testinstall/kernel/gap.tst index 3b025a9ac0..493afea431 100644 --- a/tst/testinstall/kernel/gap.tst +++ b/tst/testinstall/kernel/gap.tst @@ -111,9 +111,10 @@ fail # gap> CURRENT_STATEMENT_LOCATION(GetCurrentLVars()); fail -gap> PRINT_CURRENT_STATEMENT("*errout*", GetCurrentLVars(), fail, 1); -gap> f:=function() local l; l:=GetCurrentLVars(); PRINT_CURRENT_STATEMENT("*errout*", l, fail, 1); Print("\n"); end;; f(); -PRINT_CURRENT_STATEMENT( "*errout*", l, fail, 1 ); at stream:1 +gap> PRINT_CURRENT_STATEMENT("*errout*", GetCurrentLVars(), fail, 1, 1); +gap> f:=function() local l; l:=GetCurrentLVars(); PRINT_CURRENT_STATEMENT("*errout*", l, fail, 1, 1); Print("\n"); end;; f(); +PRINT_CURRENT_STATEMENT( "*errout*", l, fail, 1, 1 ); + @ stream:1 # gap> CALL_WITH_CATCH(fail,fail); diff --git a/tst/testspecial/backtrace.g.out b/tst/testspecial/backtrace.g.out index 976b2ee066..f2130d7a95 100644 --- a/tst/testspecial/backtrace.g.out +++ b/tst/testspecial/backtrace.g.out @@ -14,20 +14,22 @@ gap> f(); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `[]:=' on 3 arguments Stack trace: -*[1] l[[ 1 .. 3 ]] := 1; at *stdin*:11 called from +*[1] l[[ 1 .. 3 ]] := 1; + @ *stdin*:11 ( ) called from read-eval loop at *stdin*:13 type 'quit;' to quit to outer loop brk> Where(); -*[1] l[[ 1 .. 3 ]] := 1; at *stdin*:11 called from +*[1] l[[ 1 .. 3 ]] := 1; + @ *stdin*:11 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); -*[1] l[[ 1 .. 3 ]] := 1; at *stdin*:11 +*[1] l[[ 1 .. 3 ]] := 1; + @ *stdin*:11 arguments: local variables: l := [ 0, 0, 0, 0, 0, 0 ] - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -37,19 +39,21 @@ gap> f:=function() if true = 1/0 then return 1; fi; return 2; end;; gap> f(); Error, Rational operations: must not be zero Stack trace: -*[1] 1 / 0 at *stdin*:15 called from +*[1] 1 / 0 + @ *stdin*:15 ( ) called from read-eval loop at *stdin*:16 type 'quit;' to quit to outer loop brk> Where(); -*[1] 1 / 0 at *stdin*:15 called from +*[1] 1 / 0 + @ *stdin*:15 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); -*[1] 1 / 0 at *stdin*:15 +*[1] 1 / 0 + @ *stdin*:15 arguments: local variables: - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -61,24 +65,26 @@ Error, Variable: 'x' must have an assigned value Stack trace: *[1] if x then return 1; -fi; at *stdin*:18 called from +fi; + @ *stdin*:18 ( ) called from read-eval loop at *stdin*:19 type 'quit;' to quit to outer loop brk> Where(); *[1] if x then return 1; -fi; at *stdin*:18 called from +fi; + @ *stdin*:18 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); *[1] if x then return 1; -fi; at *stdin*:18 +fi; + @ *stdin*:18 arguments: local variables: x := - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -90,23 +96,25 @@ Error, must be 'true' or 'false' (not the integer 1) Stack trace: *[1] if 1 then return 1; -fi; at *stdin*:21 called from +fi; + @ *stdin*:21 ( ) called from read-eval loop at *stdin*:22 type 'quit;' to quit to outer loop brk> Where(); *[1] if 1 then return 1; -fi; at *stdin*:21 called from +fi; + @ *stdin*:21 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); *[1] if 1 then return 1; -fi; at *stdin*:21 +fi; + @ *stdin*:21 arguments: local variables: - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -120,7 +128,8 @@ Stack trace: return 1; elif 1 then return 2; -fi; at *stdin*:24 called from +fi; + @ *stdin*:24 ( ) called from read-eval loop at *stdin*:25 type 'quit;' to quit to outer loop @@ -129,7 +138,8 @@ brk> Where(); return 1; elif 1 then return 2; -fi; at *stdin*:24 called from +fi; + @ *stdin*:24 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); @@ -137,10 +147,10 @@ brk> WhereWithVars(); return 1; elif 1 then return 2; -fi; at *stdin*:24 +fi; + @ *stdin*:24 arguments: local variables: - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -152,23 +162,25 @@ Error, must be 'true' or 'false' (not the integer 1) Stack trace: *[1] while 1 do return 1; -od; at *stdin*:27 called from +od; + @ *stdin*:27 ( ) called from read-eval loop at *stdin*:28 type 'quit;' to quit to outer loop brk> Where(); *[1] while 1 do return 1; -od; at *stdin*:27 called from +od; + @ *stdin*:27 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); *[1] while 1 do return 1; -od; at *stdin*:27 +od; + @ *stdin*:27 arguments: local variables: - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -178,34 +190,38 @@ gap> f:=function() local i; for i in 1 do return 1; od; return 2; end;; gap> f(); Error, You cannot loop over the integer 1 did you mean the range [1..1] Stack trace: -*[1] Error( "You cannot loop over the integer ", n, " did you mean the range [1..", n, "]" ); at GAPROOT/lib/integer.gi:LINE called from +*[1] Error( "You cannot loop over the integer ", n, " did you mean the range [1..", n, "]" ); + @ GAPROOT/lib/integer.gi:LINE [2] for i in 1 do return 1; -od; at *stdin*:30 called from +od; + @ *stdin*:30 ( ) called from read-eval loop at *stdin*:31 you can 'quit;' to quit to outer loop, or you can 'return;' to continue brk> Where(); -*[1] Error( "You cannot loop over the integer ", n, " did you mean the range [1..", n, "]" ); at GAPROOT/lib/integer.gi:LINE called from +*[1] Error( "You cannot loop over the integer ", n, " did you mean the range [1..", n, "]" ); + @ GAPROOT/lib/integer.gi:LINE [2] for i in 1 do return 1; -od; at *stdin*:30 called from +od; + @ *stdin*:30 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); -*[1] Error( "You cannot loop over the integer ", n, " did you mean the range [1..", n, "]" ); at GAPROOT/lib/integer.gi:LINE +*[1] Error( "You cannot loop over the integer ", n, " did you mean the range [1..", n, "]" ); + @ GAPROOT/lib/integer.gi:LINE arguments: n := 1 local variables: - called from [2] for i in 1 do return 1; -od; at *stdin*:30 +od; + @ *stdin*:30 arguments: local variables: i := - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -218,24 +234,26 @@ Error, no 1st choice method found for `Iterator' on 1 arguments Stack trace: *[1] for i in true do return 1; -od; at *stdin*:33 called from +od; + @ *stdin*:33 ( ) called from read-eval loop at *stdin*:34 type 'quit;' to quit to outer loop brk> Where(); *[1] for i in true do return 1; -od; at *stdin*:33 called from +od; + @ *stdin*:33 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); *[1] for i in true do return 1; -od; at *stdin*:33 +od; + @ *stdin*:33 arguments: local variables: i := - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -247,26 +265,28 @@ Error, no 1st choice method found for `Iterator' on 1 arguments Stack trace: *[1] for i in true do return 1; -od; at *stdin*:35 called from +od; + @ *stdin*:35 ( ) called from read-eval loop at *stdin*:36 type 'quit;' to quit to outer loop brk> Where(); *[1] for i in true do return 1; -od; at *stdin*:35 called from +od; + @ *stdin*:35 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); *[1] for i in true do return 1; -od; at *stdin*:35 +od; + @ *stdin*:35 arguments: x := [ 1, 2, 3 ] local variables: i := j := - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -278,26 +298,28 @@ Error, no 1st choice method found for `Iterator' on 1 arguments Stack trace: *[1] for i in true do return 1; -od; at *stdin*:37 called from +od; + @ *stdin*:37 ( ) called from read-eval loop at *stdin*:38 type 'quit;' to quit to outer loop brk> Where(); *[1] for i in true do return 1; -od; at *stdin*:37 called from +od; + @ *stdin*:37 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); *[1] for i in true do return 1; -od; at *stdin*:37 +od; + @ *stdin*:37 arguments: x := local variables: i := j := - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -309,26 +331,28 @@ Error, no 1st choice method found for `Iterator' on 1 arguments Stack trace: *[1] for i in true do return 1; -od; at *stdin*:39 called from +od; + @ *stdin*:39 ( ) called from read-eval loop at *stdin*:40 type 'quit;' to quit to outer loop brk> Where(); *[1] for i in true do return 1; -od; at *stdin*:39 called from +od; + @ *stdin*:39 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); *[1] for i in true do return 1; -od; at *stdin*:39 +od; + @ *stdin*:39 arguments: x := local variables: i := j := 4 - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -339,24 +363,26 @@ Error, must be 'true' or 'false' (not the integer 1) Stack trace: *[1] repeat x := 1; -until 1; at *stdin*:41 called from +until 1; + @ *stdin*:41 ( ) called from read-eval loop at *stdin*:42 type 'quit;' to quit to outer loop brk> Where(); *[1] repeat x := 1; -until 1; at *stdin*:41 called from +until 1; + @ *stdin*:41 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); *[1] repeat x := 1; -until 1; at *stdin*:41 +until 1; + @ *stdin*:41 arguments: local variables: x := 1 - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -366,20 +392,22 @@ gap> f:=function() local x; Assert(0, 1); return 2; end;; gap> f(); Error, Assert: must be 'true' or 'false' (not the integer 1) Stack trace: -*[1] Assert( 0, 1 ); at *stdin*:44 called from +*[1] Assert( 0, 1 ); + @ *stdin*:44 ( ) called from read-eval loop at *stdin*:45 type 'quit;' to quit to outer loop brk> Where(); -*[1] Assert( 0, 1 ); at *stdin*:44 called from +*[1] Assert( 0, 1 ); + @ *stdin*:44 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); -*[1] Assert( 0, 1 ); at *stdin*:44 +*[1] Assert( 0, 1 ); + @ *stdin*:44 arguments: local variables: x := - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -389,20 +417,22 @@ gap> f:=function() local x; Assert(0, 1, "hello"); return 2; end;; gap> f(); Error, Assert: must be 'true' or 'false' (not the integer 1) Stack trace: -*[1] Assert( 0, 1, "hello" ); at *stdin*:47 called from +*[1] Assert( 0, 1, "hello" ); + @ *stdin*:47 ( ) called from read-eval loop at *stdin*:48 type 'quit;' to quit to outer loop brk> Where(); -*[1] Assert( 0, 1, "hello" ); at *stdin*:47 called from +*[1] Assert( 0, 1, "hello" ); + @ *stdin*:47 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); -*[1] Assert( 0, 1, "hello" ); at *stdin*:47 +*[1] Assert( 0, 1, "hello" ); + @ *stdin*:47 arguments: local variables: x := - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -417,37 +447,43 @@ gap> l := [[1]];; f := {} -> l[2,1];; gap> f(); Error, List Element: [2] must have an assigned value Stack trace: -*[1] return m[i][j]; at GAPROOT/lib/matrix.gi:LINE called from - [2] ELM_LIST( m, row, col ) at *stdin*:54 called from - [3] return l[2, 1]; at *stdin*:55 called from +*[1] return m[i][j]; + @ GAPROOT/lib/matrix.gi:LINE + [2] ELM_LIST( m, row, col ) + @ *stdin*:54 + [3] return l[2, 1]; + @ *stdin*:55 ( ) called from read-eval loop at *stdin*:56 type 'quit;' to quit to outer loop brk> Where(); -*[1] return m[i][j]; at GAPROOT/lib/matrix.gi:LINE called from - [2] ELM_LIST( m, row, col ) at *stdin*:54 called from - [3] return l[2, 1]; at *stdin*:55 called from +*[1] return m[i][j]; + @ GAPROOT/lib/matrix.gi:LINE + [2] ELM_LIST( m, row, col ) + @ *stdin*:54 + [3] return l[2, 1]; + @ *stdin*:55 ( ) called from read-eval loop at *errin*:1 brk> WhereWithVars(); -*[1] return m[i][j]; at GAPROOT/lib/matrix.gi:LINE +*[1] return m[i][j]; + @ GAPROOT/lib/matrix.gi:LINE arguments: m := [ [ 1 ] ] i := 2 j := 1 local variables: - called from - [2] ELM_LIST( m, row, col ) at *stdin*:54 + [2] ELM_LIST( m, row, col ) + @ *stdin*:54 arguments: m := [ [ 1 ] ] row := 2 col := 1 local variables: - called from - [3] return l[2, 1]; at *stdin*:55 + [3] return l[2, 1]; + @ *stdin*:55 arguments: local variables: - called from ( ) called from read-eval loop at *errin*:2 brk> quit; @@ -459,8 +495,10 @@ gap> ## gap> InstallMethod( Matrix, [IsFilter, IsSemiring, IsMatrixObj], {a,b,c} -> fail ); Error, FLAGS_FILTER: must be an operation (not a function) Stack trace: -*[1] <> from GAPROOT/lib/oper1.g:LINE in function INSTALL_METHOD called from - [2] <> from GAPROOT/lib/oper1.g:LINE in function InstallMethod called from +*[1] <> + @ GAPROOT/lib/oper1.g:LINE + [2] <> + @ GAPROOT/lib/oper1.g:LINE ( ) called from read-eval loop at *stdin*:61 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/backtrace2.g.out b/tst/testspecial/backtrace2.g.out index 547888026a..3583cc7588 100644 --- a/tst/testspecial/backtrace2.g.out +++ b/tst/testspecial/backtrace2.g.out @@ -27,60 +27,84 @@ gap> test:= function( n ) gap> test( 1 ); Error, ! Stack trace: -*[1] Error( "!\n" ); at *stdin*:24 called from - [2] test( n + 1 ); at *stdin*:26 called from - [3] test( n + 1 ); at *stdin*:26 called from +*[1] Error( "!\n" ); + @ *stdin*:24 + [2] test( n + 1 ); + @ *stdin*:26 + [3] test( n + 1 ); + @ *stdin*:26 ( ) called from read-eval loop at *stdin*:28 you can 'quit;' to quit to outer loop, or you can 'return;' to continue brk> n; Where(); 3 -*[1] Error( "!\n" ); at *stdin*:24 called from - [2] test( n + 1 ); at *stdin*:26 called from - [3] test( n + 1 ); at *stdin*:26 called from +*[1] Error( "!\n" ); + @ *stdin*:24 + [2] test( n + 1 ); + @ *stdin*:26 + [3] test( n + 1 ); + @ *stdin*:26 ( ) called from read-eval loop at *errin*:1 brk> DownEnv(); n; Where(); 2 - [1] Error( "!\n" ); at *stdin*:24 called from -*[2] test( n + 1 ); at *stdin*:26 called from - [3] test( n + 1 ); at *stdin*:26 called from + [1] Error( "!\n" ); + @ *stdin*:24 +*[2] test( n + 1 ); + @ *stdin*:26 + [3] test( n + 1 ); + @ *stdin*:26 ( ) called from read-eval loop at *errin*:2 brk> DownEnv(); n; Where(); 1 - [1] Error( "!\n" ); at *stdin*:24 called from - [2] test( n + 1 ); at *stdin*:26 called from -*[3] test( n + 1 ); at *stdin*:26 called from + [1] Error( "!\n" ); + @ *stdin*:24 + [2] test( n + 1 ); + @ *stdin*:26 +*[3] test( n + 1 ); + @ *stdin*:26 ( ) called from read-eval loop at *errin*:3 brk> DownEnv(); n; Where(); 1 - [1] Error( "!\n" ); at *stdin*:24 called from - [2] test( n + 1 ); at *stdin*:26 called from -*[3] test( n + 1 ); at *stdin*:26 called from + [1] Error( "!\n" ); + @ *stdin*:24 + [2] test( n + 1 ); + @ *stdin*:26 +*[3] test( n + 1 ); + @ *stdin*:26 ( ) called from read-eval loop at *errin*:4 brk> UpEnv(); n; Where(); 2 - [1] Error( "!\n" ); at *stdin*:24 called from -*[2] test( n + 1 ); at *stdin*:26 called from - [3] test( n + 1 ); at *stdin*:26 called from + [1] Error( "!\n" ); + @ *stdin*:24 +*[2] test( n + 1 ); + @ *stdin*:26 + [3] test( n + 1 ); + @ *stdin*:26 ( ) called from read-eval loop at *errin*:5 brk> UpEnv(); n; Where(); 3 -*[1] Error( "!\n" ); at *stdin*:24 called from - [2] test( n + 1 ); at *stdin*:26 called from - [3] test( n + 1 ); at *stdin*:26 called from +*[1] Error( "!\n" ); + @ *stdin*:24 + [2] test( n + 1 ); + @ *stdin*:26 + [3] test( n + 1 ); + @ *stdin*:26 ( ) called from read-eval loop at *errin*:6 brk> UpEnv(); n; Where(); 3 -*[1] Error( "!\n" ); at *stdin*:24 called from - [2] test( n + 1 ); at *stdin*:26 called from - [3] test( n + 1 ); at *stdin*:26 called from +*[1] Error( "!\n" ); + @ *stdin*:24 + [2] test( n + 1 ); + @ *stdin*:26 + [3] test( n + 1 ); + @ *stdin*:26 ( ) called from read-eval loop at *errin*:7 brk> quit; @@ -98,59 +122,83 @@ gap> test:= function( n ) gap> test( 1 ); Error, Rational operations: must not be zero Stack trace: -*[1] 1 / 0 at *stdin*:35 called from - [2] test( n + 1 ); at *stdin*:37 called from - [3] test( n + 1 ); at *stdin*:37 called from +*[1] 1 / 0 + @ *stdin*:35 + [2] test( n + 1 ); + @ *stdin*:37 + [3] test( n + 1 ); + @ *stdin*:37 ( ) called from read-eval loop at *stdin*:39 type 'quit;' to quit to outer loop brk> n; Where(); 3 -*[1] 1 / 0 at *stdin*:35 called from - [2] test( n + 1 ); at *stdin*:37 called from - [3] test( n + 1 ); at *stdin*:37 called from +*[1] 1 / 0 + @ *stdin*:35 + [2] test( n + 1 ); + @ *stdin*:37 + [3] test( n + 1 ); + @ *stdin*:37 ( ) called from read-eval loop at *errin*:1 brk> DownEnv(); n; Where(); 2 - [1] 1 / 0 at *stdin*:35 called from -*[2] test( n + 1 ); at *stdin*:37 called from - [3] test( n + 1 ); at *stdin*:37 called from + [1] 1 / 0 + @ *stdin*:35 +*[2] test( n + 1 ); + @ *stdin*:37 + [3] test( n + 1 ); + @ *stdin*:37 ( ) called from read-eval loop at *errin*:2 brk> DownEnv(); n; Where(); 1 - [1] 1 / 0 at *stdin*:35 called from - [2] test( n + 1 ); at *stdin*:37 called from -*[3] test( n + 1 ); at *stdin*:37 called from + [1] 1 / 0 + @ *stdin*:35 + [2] test( n + 1 ); + @ *stdin*:37 +*[3] test( n + 1 ); + @ *stdin*:37 ( ) called from read-eval loop at *errin*:3 brk> DownEnv(); n; Where(); 1 - [1] 1 / 0 at *stdin*:35 called from - [2] test( n + 1 ); at *stdin*:37 called from -*[3] test( n + 1 ); at *stdin*:37 called from + [1] 1 / 0 + @ *stdin*:35 + [2] test( n + 1 ); + @ *stdin*:37 +*[3] test( n + 1 ); + @ *stdin*:37 ( ) called from read-eval loop at *errin*:4 brk> UpEnv(); n; Where(); 2 - [1] 1 / 0 at *stdin*:35 called from -*[2] test( n + 1 ); at *stdin*:37 called from - [3] test( n + 1 ); at *stdin*:37 called from + [1] 1 / 0 + @ *stdin*:35 +*[2] test( n + 1 ); + @ *stdin*:37 + [3] test( n + 1 ); + @ *stdin*:37 ( ) called from read-eval loop at *errin*:5 brk> UpEnv(); n; Where(); 3 -*[1] 1 / 0 at *stdin*:35 called from - [2] test( n + 1 ); at *stdin*:37 called from - [3] test( n + 1 ); at *stdin*:37 called from +*[1] 1 / 0 + @ *stdin*:35 + [2] test( n + 1 ); + @ *stdin*:37 + [3] test( n + 1 ); + @ *stdin*:37 ( ) called from read-eval loop at *errin*:6 brk> UpEnv(); n; Where(); 3 -*[1] 1 / 0 at *stdin*:35 called from - [2] test( n + 1 ); at *stdin*:37 called from - [3] test( n + 1 ); at *stdin*:37 called from +*[1] 1 / 0 + @ *stdin*:35 + [2] test( n + 1 ); + @ *stdin*:37 + [3] test( n + 1 ); + @ *stdin*:37 ( ) called from read-eval loop at *errin*:7 brk> quit; @@ -170,59 +218,83 @@ gap> test( 1 ); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `IsCommutative' on 1 arguments Stack trace: -*[1] IsAbelian( 1 ) at *stdin*:47 called from - [2] test( n + 1 ); at *stdin*:49 called from - [3] test( n + 1 ); at *stdin*:49 called from +*[1] IsAbelian( 1 ) + @ *stdin*:47 + [2] test( n + 1 ); + @ *stdin*:49 + [3] test( n + 1 ); + @ *stdin*:49 ( ) called from read-eval loop at *stdin*:51 type 'quit;' to quit to outer loop brk> n; Where(); 3 -*[1] IsAbelian( 1 ) at *stdin*:47 called from - [2] test( n + 1 ); at *stdin*:49 called from - [3] test( n + 1 ); at *stdin*:49 called from +*[1] IsAbelian( 1 ) + @ *stdin*:47 + [2] test( n + 1 ); + @ *stdin*:49 + [3] test( n + 1 ); + @ *stdin*:49 ( ) called from read-eval loop at *errin*:1 brk> DownEnv(); n; Where(); 3 -*[1] IsAbelian( 1 ) at *stdin*:47 called from - [2] test( n + 1 ); at *stdin*:49 called from - [3] test( n + 1 ); at *stdin*:49 called from +*[1] IsAbelian( 1 ) + @ *stdin*:47 + [2] test( n + 1 ); + @ *stdin*:49 + [3] test( n + 1 ); + @ *stdin*:49 ( ) called from read-eval loop at *errin*:2 brk> DownEnv(); n; Where(); 2 - [1] IsAbelian( 1 ) at *stdin*:47 called from -*[2] test( n + 1 ); at *stdin*:49 called from - [3] test( n + 1 ); at *stdin*:49 called from + [1] IsAbelian( 1 ) + @ *stdin*:47 +*[2] test( n + 1 ); + @ *stdin*:49 + [3] test( n + 1 ); + @ *stdin*:49 ( ) called from read-eval loop at *errin*:3 brk> DownEnv(); n; Where(); 1 - [1] IsAbelian( 1 ) at *stdin*:47 called from - [2] test( n + 1 ); at *stdin*:49 called from -*[3] test( n + 1 ); at *stdin*:49 called from + [1] IsAbelian( 1 ) + @ *stdin*:47 + [2] test( n + 1 ); + @ *stdin*:49 +*[3] test( n + 1 ); + @ *stdin*:49 ( ) called from read-eval loop at *errin*:4 brk> UpEnv(); n; Where(); 2 - [1] IsAbelian( 1 ) at *stdin*:47 called from -*[2] test( n + 1 ); at *stdin*:49 called from - [3] test( n + 1 ); at *stdin*:49 called from + [1] IsAbelian( 1 ) + @ *stdin*:47 +*[2] test( n + 1 ); + @ *stdin*:49 + [3] test( n + 1 ); + @ *stdin*:49 ( ) called from read-eval loop at *errin*:5 brk> UpEnv(); n; Where(); 3 -*[1] IsAbelian( 1 ) at *stdin*:47 called from - [2] test( n + 1 ); at *stdin*:49 called from - [3] test( n + 1 ); at *stdin*:49 called from +*[1] IsAbelian( 1 ) + @ *stdin*:47 + [2] test( n + 1 ); + @ *stdin*:49 + [3] test( n + 1 ); + @ *stdin*:49 ( ) called from read-eval loop at *errin*:6 brk> UpEnv(); n; Where(); 3 -*[1] IsAbelian( 1 ) at *stdin*:47 called from - [2] test( n + 1 ); at *stdin*:49 called from - [3] test( n + 1 ); at *stdin*:49 called from +*[1] IsAbelian( 1 ) + @ *stdin*:47 + [2] test( n + 1 ); + @ *stdin*:49 + [3] test( n + 1 ); + @ *stdin*:49 ( ) called from read-eval loop at *errin*:7 brk> quit; diff --git a/tst/testspecial/bad-add.g.out b/tst/testspecial/bad-add.g.out index cfa76fecbd..9259da66d3 100644 --- a/tst/testspecial/bad-add.g.out +++ b/tst/testspecial/bad-add.g.out @@ -6,7 +6,8 @@ gap> f(); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `+' on 2 arguments Stack trace: -*[1] 1 + "abc" at *stdin*:3 called from +*[1] 1 + "abc" + @ *stdin*:3 ( ) called from read-eval loop at *stdin*:5 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/bad-array-double-1.g.out b/tst/testspecial/bad-array-double-1.g.out index 0f77b5cb9a..a68076d65a 100644 --- a/tst/testspecial/bad-array-double-1.g.out +++ b/tst/testspecial/bad-array-double-1.g.out @@ -6,7 +6,8 @@ gap> f(); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `[,]' on 3 arguments Stack trace: -*[1] return "abc"[1, 1]; at *stdin*:3 called from +*[1] return "abc"[1, 1]; + @ *stdin*:3 ( ) called from read-eval loop at *stdin*:5 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/bad-array-int-0.g.out b/tst/testspecial/bad-array-int-0.g.out index 06c965e890..17e703a17a 100644 --- a/tst/testspecial/bad-array-int-0.g.out +++ b/tst/testspecial/bad-array-int-0.g.out @@ -8,7 +8,8 @@ gap> f(); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `[]' on 2 arguments Stack trace: -*[1] return l[0]; at *stdin*:5 called from +*[1] return l[0]; + @ *stdin*:5 ( ) called from read-eval loop at *stdin*:7 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/bad-array-int-1.g.out b/tst/testspecial/bad-array-int-1.g.out index 1bb696a6b3..cd7a87a095 100644 --- a/tst/testspecial/bad-array-int-1.g.out +++ b/tst/testspecial/bad-array-int-1.g.out @@ -5,7 +5,8 @@ function( ) ... end gap> f(); Error, List Element: must be a list (not the integer 1) Stack trace: -*[1] return 1[1]; at *stdin*:3 called from +*[1] return 1[1]; + @ *stdin*:3 ( ) called from read-eval loop at *stdin*:5 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/bad-array-string.g.out b/tst/testspecial/bad-array-string.g.out index 754cc970e6..d0bd81ee20 100644 --- a/tst/testspecial/bad-array-string.g.out +++ b/tst/testspecial/bad-array-string.g.out @@ -6,7 +6,8 @@ gap> f(); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `[]' on 2 arguments Stack trace: -*[1] return 1["abc"]; at *stdin*:3 called from +*[1] return 1["abc"]; + @ *stdin*:3 ( ) called from read-eval loop at *stdin*:5 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/bad-array-undef-0.g.out b/tst/testspecial/bad-array-undef-0.g.out index 150bad14b6..5ea205de9a 100644 --- a/tst/testspecial/bad-array-undef-0.g.out +++ b/tst/testspecial/bad-array-undef-0.g.out @@ -6,7 +6,8 @@ function( ) ... end gap> f(); Error, Variable: 'l' must have an assigned value Stack trace: -*[1] return l[1]; at *stdin*:4 called from +*[1] return l[1]; + @ *stdin*:4 ( ) called from read-eval loop at *stdin*:6 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/bad-array-undef-1.g.out b/tst/testspecial/bad-array-undef-1.g.out index 63ff49e3ac..7efcc85219 100644 --- a/tst/testspecial/bad-array-undef-1.g.out +++ b/tst/testspecial/bad-array-undef-1.g.out @@ -7,7 +7,8 @@ function( ) ... end gap> f(); Error, Variable: 'm' must have an assigned value Stack trace: -*[1] return l[m]; at *stdin*:5 called from +*[1] return l[m]; + @ *stdin*:5 ( ) called from read-eval loop at *stdin*:7 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/bad-minus.g.out b/tst/testspecial/bad-minus.g.out index a8ebc320f6..ec55c46e87 100644 --- a/tst/testspecial/bad-minus.g.out +++ b/tst/testspecial/bad-minus.g.out @@ -6,9 +6,12 @@ gap> f(); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `AdditiveInverseMutable' on 1 arguments Stack trace: -*[1] AdditiveInverseMutable( elm ) at GAPROOT/lib/arith.gi:LINE called from - [2] AdditiveInverseImmutable( elm ) at GAPROOT/lib/arith.gi:LINE called from - [3] 1 - "abc" at *stdin*:3 called from +*[1] AdditiveInverseMutable( elm ) + @ GAPROOT/lib/arith.gi:LINE + [2] AdditiveInverseImmutable( elm ) + @ GAPROOT/lib/arith.gi:LINE + [3] 1 - "abc" + @ *stdin*:3 ( ) called from read-eval loop at *stdin*:5 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/break-loop-loop.g.out b/tst/testspecial/break-loop-loop.g.out index 3159319d09..4da0087abd 100644 --- a/tst/testspecial/break-loop-loop.g.out +++ b/tst/testspecial/break-loop-loop.g.out @@ -5,7 +5,8 @@ gap> i:=0; gap> f(1); Error, bar Stack trace: -*[1] Error( "bar" ); at *stdin*:3 called from +*[1] Error( "bar" ); + @ *stdin*:3 ( ) called from read-eval loop at *stdin*:5 you can 'quit;' to quit to outer loop, or diff --git a/tst/testspecial/broken-test.g.out b/tst/testspecial/broken-test.g.out index 72dc2a443e..bbe429da39 100644 --- a/tst/testspecial/broken-test.g.out +++ b/tst/testspecial/broken-test.g.out @@ -1,9 +1,12 @@ gap> Test("broken-test-2.tst", rec(width := 800)); Error, Invalid test file: #@ command found in the middle of a single test at broken-test-2.tst:5 Stack trace: -*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); at GAPROOT/lib/test.gi:LINE called from - [2] testError( "Invalid test file: #@ command found in the middle of a single test" ); at GAPROOT/lib/test.gi:LINE called from - [3] ParseTestInput( full, opts.ignoreComments, fnam ) at GAPROOT/lib/test.gi:LINE called from +*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); + @ GAPROOT/lib/test.gi:LINE + [2] testError( "Invalid test file: #@ command found in the middle of a single test" ); + @ GAPROOT/lib/test.gi:LINE + [3] ParseTestInput( full, opts.ignoreComments, fnam ) + @ GAPROOT/lib/test.gi:LINE ( ) called from read-eval loop at *stdin*:2 type 'quit;' to quit to outer loop @@ -11,9 +14,12 @@ brk> quit; gap> Test("broken-test-3.tst", rec(width := 800)); Error, Invalid test file at broken-test-3.tst:5 Stack trace: -*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); at GAPROOT/lib/test.gi:LINE called from - [2] testError( "Invalid test file" ); at GAPROOT/lib/test.gi:LINE called from - [3] ParseTestInput( full, opts.ignoreComments, fnam ) at GAPROOT/lib/test.gi:LINE called from +*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); + @ GAPROOT/lib/test.gi:LINE + [2] testError( "Invalid test file" ); + @ GAPROOT/lib/test.gi:LINE + [3] ParseTestInput( full, opts.ignoreComments, fnam ) + @ GAPROOT/lib/test.gi:LINE ( ) called from read-eval loop at *stdin*:2 type 'quit;' to quit to outer loop @@ -21,9 +27,12 @@ brk> quit; gap> Test("broken-test-4.tst", rec(width := 800)); Error, Invalid test file: Nested #@if at broken-test-4.tst:2 Stack trace: -*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); at GAPROOT/lib/test.gi:LINE called from - [2] testError( "Invalid test file: Nested #@if" ); at GAPROOT/lib/test.gi:LINE called from - [3] ParseTestInput( full, opts.ignoreComments, fnam ) at GAPROOT/lib/test.gi:LINE called from +*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); + @ GAPROOT/lib/test.gi:LINE + [2] testError( "Invalid test file: Nested #@if" ); + @ GAPROOT/lib/test.gi:LINE + [3] ParseTestInput( full, opts.ignoreComments, fnam ) + @ GAPROOT/lib/test.gi:LINE ( ) called from read-eval loop at *stdin*:2 type 'quit;' to quit to outer loop @@ -31,9 +40,12 @@ brk> quit; gap> Test("broken-test-5.tst", rec(width := 800)); Error, Invalid test file: two #@else at broken-test-5.tst:7 Stack trace: -*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); at GAPROOT/lib/test.gi:LINE called from - [2] testError( "Invalid test file: two #@else" ); at GAPROOT/lib/test.gi:LINE called from - [3] ParseTestInput( full, opts.ignoreComments, fnam ) at GAPROOT/lib/test.gi:LINE called from +*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); + @ GAPROOT/lib/test.gi:LINE + [2] testError( "Invalid test file: two #@else" ); + @ GAPROOT/lib/test.gi:LINE + [3] ParseTestInput( full, opts.ignoreComments, fnam ) + @ GAPROOT/lib/test.gi:LINE ( ) called from read-eval loop at *stdin*:2 type 'quit;' to quit to outer loop @@ -41,9 +53,12 @@ brk> quit; gap> Test("broken-test-6.tst", rec(width := 800)); Error, Invalid test file: Continuation prompt '> ' followed by a tab, expected a regular space at broken-test-6.tst:3 Stack trace: -*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); at GAPROOT/lib/test.gi:LINE called from - [2] testError( "Invalid test file: Continuation prompt '> ' followed by a tab, expected a regular space" ); at GAPROOT/lib/test.gi:LINE called from - [3] ParseTestInput( full, opts.ignoreComments, fnam ) at GAPROOT/lib/test.gi:LINE called from +*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); + @ GAPROOT/lib/test.gi:LINE + [2] testError( "Invalid test file: Continuation prompt '> ' followed by a tab, expected a regular space" ); + @ GAPROOT/lib/test.gi:LINE + [3] ParseTestInput( full, opts.ignoreComments, fnam ) + @ GAPROOT/lib/test.gi:LINE ( ) called from read-eval loop at *stdin*:2 type 'quit;' to quit to outer loop @@ -51,9 +66,12 @@ brk> quit; gap> Test("broken-test-7.tst", rec(width := 800)); Error, Invalid test file: #@elif after #@else at broken-test-7.tst:7 Stack trace: -*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); at GAPROOT/lib/test.gi:LINE called from - [2] testError( "Invalid test file: #@elif after #@else" ); at GAPROOT/lib/test.gi:LINE called from - [3] ParseTestInput( full, opts.ignoreComments, fnam ) at GAPROOT/lib/test.gi:LINE called from +*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); + @ GAPROOT/lib/test.gi:LINE + [2] testError( "Invalid test file: #@elif after #@else" ); + @ GAPROOT/lib/test.gi:LINE + [3] ParseTestInput( full, opts.ignoreComments, fnam ) + @ GAPROOT/lib/test.gi:LINE ( ) called from read-eval loop at *stdin*:2 type 'quit;' to quit to outer loop @@ -61,9 +79,12 @@ brk> quit; gap> Test("broken-test-8.tst", rec(width := 800)); Error, Invalid test file: #@elif without #@if at broken-test-8.tst:1 Stack trace: -*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); at GAPROOT/lib/test.gi:LINE called from - [2] testError( "Invalid test file: #@elif without #@if" ); at GAPROOT/lib/test.gi:LINE called from - [3] ParseTestInput( full, opts.ignoreComments, fnam ) at GAPROOT/lib/test.gi:LINE called from +*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); + @ GAPROOT/lib/test.gi:LINE + [2] testError( "Invalid test file: #@elif without #@if" ); + @ GAPROOT/lib/test.gi:LINE + [3] ParseTestInput( full, opts.ignoreComments, fnam ) + @ GAPROOT/lib/test.gi:LINE ( ) called from read-eval loop at *stdin*:2 type 'quit;' to quit to outer loop @@ -71,9 +92,12 @@ brk> quit; gap> Test("broken-test-9.tst", rec(width := 800)); Error, Invalid test file: Unterminated #@if at broken-test-9.tst:7 Stack trace: -*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); at GAPROOT/lib/test.gi:LINE called from - [2] testError( "Invalid test file: Unterminated #@if" ); at GAPROOT/lib/test.gi:LINE called from - [3] ParseTestInput( full, opts.ignoreComments, fnam ) at GAPROOT/lib/test.gi:LINE called from +*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); + @ GAPROOT/lib/test.gi:LINE + [2] testError( "Invalid test file: Unterminated #@if" ); + @ GAPROOT/lib/test.gi:LINE + [3] ParseTestInput( full, opts.ignoreComments, fnam ) + @ GAPROOT/lib/test.gi:LINE ( ) called from read-eval loop at *stdin*:2 type 'quit;' to quit to outer loop @@ -81,9 +105,12 @@ brk> quit; gap> Test("invalidtestfile.tst", rec(width := 800)); Error, Invalid test file at invalidtestfile.tst:7 Stack trace: -*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); at GAPROOT/lib/test.gi:LINE called from - [2] testError( "Invalid test file" ); at GAPROOT/lib/test.gi:LINE called from - [3] ParseTestInput( full, opts.ignoreComments, fnam ) at GAPROOT/lib/test.gi:LINE called from +*[1] ErrorNoReturn( s, " at ", fnam, ":", i ); + @ GAPROOT/lib/test.gi:LINE + [2] testError( "Invalid test file" ); + @ GAPROOT/lib/test.gi:LINE + [3] ParseTestInput( full, opts.ignoreComments, fnam ) + @ GAPROOT/lib/test.gi:LINE ( ) called from read-eval loop at *stdin*:2 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/current-env.g.out b/tst/testspecial/current-env.g.out index 319c9a58d2..e90991e7e2 100644 --- a/tst/testspecial/current-env.g.out +++ b/tst/testspecial/current-env.g.out @@ -8,10 +8,12 @@ gap> f := function() gap> f(); Error, You cannot loop over the integer 1 did you mean the range [1..1] Stack trace: -*[1] Error( "You cannot loop over the integer ", n, " did you mean the range [1..", n, "]" ); at GAPROOT/lib/integer.gi:LINE called from +*[1] Error( "You cannot loop over the integer ", n, " did you mean the range [1..", n, "]" ); + @ GAPROOT/lib/integer.gi:LINE [2] for i in 1 do return 1; -od; at *stdin*:6 called from +od; + @ *stdin*:6 ( ) called from read-eval loop at *stdin*:9 you can 'quit;' to quit to outer loop, or diff --git a/tst/testspecial/debug-var.g.out b/tst/testspecial/debug-var.g.out index 60ec4ed89e..c39af18014 100644 --- a/tst/testspecial/debug-var.g.out +++ b/tst/testspecial/debug-var.g.out @@ -13,8 +13,10 @@ gap> f:=function(a) gap> f(1); Error, breakpoint Stack trace: -*[1] Error( "breakpoint" ); at *stdin*:9 called from - [2] g( 10 ) at *stdin*:12 called from +*[1] Error( "breakpoint" ); + @ *stdin*:9 + [2] g( 10 ) + @ *stdin*:12 ( ) called from read-eval loop at *stdin*:14 you can 'quit;' to quit to outer loop, or @@ -36,8 +38,10 @@ unbound_global; ^^^^^^^^^^^^^^ Error, Variable: 'unbound_global' must have a value Stack trace: -*[1] Error( "breakpoint" ); at *stdin*:9 called from - [2] g( 10 ) at *stdin*:12 called from +*[1] Error( "breakpoint" ); + @ *stdin*:9 + [2] g( 10 ) + @ *stdin*:12 ( ) called from read-eval loop at *errin*:6 brk> @@ -51,8 +55,10 @@ true brk> unbound_higher; Error, Variable: 'unbound_higher' must have an assigned value Stack trace: -*[1] Error( "breakpoint" ); at *stdin*:9 called from - [2] g( 10 ) at *stdin*:12 called from +*[1] Error( "breakpoint" ); + @ *stdin*:9 + [2] g( 10 ) + @ *stdin*:12 ( ) called from read-eval loop at *errin*:12 type 'quit;' to quit to outer loop @@ -68,8 +74,10 @@ true brk> unbound_local; Error, Variable: 'unbound_local' must have an assigned value Stack trace: -*[1] Error( "breakpoint" ); at *stdin*:9 called from - [2] g( 10 ) at *stdin*:12 called from +*[1] Error( "breakpoint" ); + @ *stdin*:9 + [2] g( 10 ) + @ *stdin*:12 ( ) called from read-eval loop at *errin*:17 type 'quit;' to quit to outer loop @@ -93,8 +101,10 @@ function( p ) ... end gap> f(1); Error, breakpoint Stack trace: -*[1] Error( "breakpoint" ); at *stdin*:9 called from - [2] g( 10 ) at *stdin*:12 called from +*[1] Error( "breakpoint" ); + @ *stdin*:9 + [2] g( 10 ) + @ *stdin*:12 ( ) called from read-eval loop at *stdin*:23 you can 'quit;' to quit to outer loop, or @@ -102,9 +112,12 @@ you can 'return;' to continue brk> h(2); Error, foobar Stack trace: -*[1] Error( "foobar" ); at *stdin*:20 called from - [2] Error( "breakpoint" ); at *stdin*:9 called from - [3] g( 10 ) at *stdin*:12 called from +*[1] Error( "foobar" ); + @ *stdin*:20 + [2] Error( "breakpoint" ); + @ *stdin*:9 + [3] g( 10 ) + @ *stdin*:12 ( ) called from read-eval loop at *errin*:1 you can 'quit;' to quit to outer loop, or @@ -120,9 +133,12 @@ true brk_2> unbound_higher; Error, Variable: must have a value Stack trace: -*[1] Error( "foobar" ); at *stdin*:20 called from - [2] Error( "breakpoint" ); at *stdin*:9 called from - [3] g( 10 ) at *stdin*:12 called from +*[1] Error( "foobar" ); + @ *stdin*:20 + [2] Error( "breakpoint" ); + @ *stdin*:9 + [3] g( 10 ) + @ *stdin*:12 ( ) called from read-eval loop at *errin*:6 brk_2> @@ -130,33 +146,45 @@ brk_2> # check coding of dvars brk_2> function() return unbound_higher; end; Error, Variable: cannot be used here Stack trace: -*[1] Error( "foobar" ); at *stdin*:20 called from - [2] Error( "breakpoint" ); at *stdin*:9 called from - [3] g( 10 ) at *stdin*:12 called from +*[1] Error( "foobar" ); + @ *stdin*:20 + [2] Error( "breakpoint" ); + @ *stdin*:9 + [3] g( 10 ) + @ *stdin*:12 ( ) called from read-eval loop at *errin*:9 brk_2> function() return IsBound(unbound_higher); end; Error, Variable: cannot be used here Stack trace: -*[1] Error( "foobar" ); at *stdin*:20 called from - [2] Error( "breakpoint" ); at *stdin*:9 called from - [3] g( 10 ) at *stdin*:12 called from +*[1] Error( "foobar" ); + @ *stdin*:20 + [2] Error( "breakpoint" ); + @ *stdin*:9 + [3] g( 10 ) + @ *stdin*:12 ( ) called from read-eval loop at *errin*:10 brk_2> function() Unbind(unbound_higher); end; Error, Variable: cannot be used here Stack trace: -*[1] Error( "foobar" ); at *stdin*:20 called from - [2] Error( "breakpoint" ); at *stdin*:9 called from - [3] g( 10 ) at *stdin*:12 called from +*[1] Error( "foobar" ); + @ *stdin*:20 + [2] Error( "breakpoint" ); + @ *stdin*:9 + [3] g( 10 ) + @ *stdin*:12 ( ) called from read-eval loop at *errin*:11 brk_2> function() unbound_higher:=0; end; Error, Variable: cannot be used here Stack trace: -*[1] Error( "foobar" ); at *stdin*:20 called from - [2] Error( "breakpoint" ); at *stdin*:9 called from - [3] g( 10 ) at *stdin*:12 called from +*[1] Error( "foobar" ); + @ *stdin*:20 + [2] Error( "breakpoint" ); + @ *stdin*:9 + [3] g( 10 ) + @ *stdin*:12 ( ) called from read-eval loop at *errin*:12 brk_2> QUIT; diff --git a/tst/testspecial/func-and-proc-call-trace.g.out b/tst/testspecial/func-and-proc-call-trace.g.out index 8e91f92570..046b27f874 100644 --- a/tst/testspecial/func-and-proc-call-trace.g.out +++ b/tst/testspecial/func-and-proc-call-trace.g.out @@ -6,7 +6,8 @@ gap> informproc0([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( ); at *stdin*:4 called from +*[1] l( ); + @ *stdin*:4 ( ) called from read-eval loop at *stdin*:6 type 'quit;' to quit to outer loop @@ -22,7 +23,8 @@ gap> informproc1([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1 ); at *stdin*:9 called from +*[1] l( 1 ); + @ *stdin*:9 ( ) called from read-eval loop at *stdin*:11 type 'quit;' to quit to outer loop @@ -38,7 +40,8 @@ gap> informproc2([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2 ); at *stdin*:14 called from +*[1] l( 1, 2 ); + @ *stdin*:14 ( ) called from read-eval loop at *stdin*:16 type 'quit;' to quit to outer loop @@ -54,7 +57,8 @@ gap> informproc3([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2, 3 ); at *stdin*:19 called from +*[1] l( 1, 2, 3 ); + @ *stdin*:19 ( ) called from read-eval loop at *stdin*:21 type 'quit;' to quit to outer loop @@ -70,7 +74,8 @@ gap> informproc4([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2, 3, 4 ); at *stdin*:24 called from +*[1] l( 1, 2, 3, 4 ); + @ *stdin*:24 ( ) called from read-eval loop at *stdin*:26 type 'quit;' to quit to outer loop @@ -86,7 +91,8 @@ gap> informproc5([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2, 3, 4, 5 ); at *stdin*:29 called from +*[1] l( 1, 2, 3, 4, 5 ); + @ *stdin*:29 ( ) called from read-eval loop at *stdin*:31 type 'quit;' to quit to outer loop @@ -102,7 +108,8 @@ gap> informproc6([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2, 3, 4, 5, 6 ); at *stdin*:34 called from +*[1] l( 1, 2, 3, 4, 5, 6 ); + @ *stdin*:34 ( ) called from read-eval loop at *stdin*:36 type 'quit;' to quit to outer loop @@ -118,7 +125,8 @@ gap> informprocmore([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2, 3, 4, 5, 6, 7 ); at *stdin*:39 called from +*[1] l( 1, 2, 3, 4, 5, 6, 7 ); + @ *stdin*:39 ( ) called from read-eval loop at *stdin*:41 type 'quit;' to quit to outer loop @@ -134,7 +142,8 @@ gap> informfunc0([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( ) at *stdin*:44 called from +*[1] l( ) + @ *stdin*:44 ( ) called from read-eval loop at *stdin*:46 type 'quit;' to quit to outer loop @@ -150,7 +159,8 @@ gap> informfunc1([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1 ) at *stdin*:49 called from +*[1] l( 1 ) + @ *stdin*:49 ( ) called from read-eval loop at *stdin*:51 type 'quit;' to quit to outer loop @@ -166,7 +176,8 @@ gap> informfunc2([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2 ) at *stdin*:54 called from +*[1] l( 1, 2 ) + @ *stdin*:54 ( ) called from read-eval loop at *stdin*:56 type 'quit;' to quit to outer loop @@ -182,7 +193,8 @@ gap> informfunc3([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2, 3 ) at *stdin*:59 called from +*[1] l( 1, 2, 3 ) + @ *stdin*:59 ( ) called from read-eval loop at *stdin*:61 type 'quit;' to quit to outer loop @@ -198,7 +210,8 @@ gap> informfunc4([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2, 3, 4 ) at *stdin*:64 called from +*[1] l( 1, 2, 3, 4 ) + @ *stdin*:64 ( ) called from read-eval loop at *stdin*:66 type 'quit;' to quit to outer loop @@ -214,7 +227,8 @@ gap> informfunc5([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2, 3, 4, 5 ) at *stdin*:69 called from +*[1] l( 1, 2, 3, 4, 5 ) + @ *stdin*:69 ( ) called from read-eval loop at *stdin*:71 type 'quit;' to quit to outer loop @@ -230,7 +244,8 @@ gap> informfunc6([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2, 3, 4, 5, 6 ) at *stdin*:74 called from +*[1] l( 1, 2, 3, 4, 5, 6 ) + @ *stdin*:74 ( ) called from read-eval loop at *stdin*:76 type 'quit;' to quit to outer loop @@ -246,7 +261,8 @@ gap> informfuncmore([]); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `CallFuncList' on 2 arguments Stack trace: -*[1] l( 1, 2, 3, 4, 5, 6, 7 ) at *stdin*:79 called from +*[1] l( 1, 2, 3, 4, 5, 6, 7 ) + @ *stdin*:79 ( ) called from read-eval loop at *stdin*:81 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/line-continuation.g.out b/tst/testspecial/line-continuation.g.out index 08a8f3b373..88f253686c 100644 --- a/tst/testspecial/line-continuation.g.out +++ b/tst/testspecial/line-continuation.g.out @@ -8,7 +8,8 @@ Stack trace: not in any function at stream:2 Error, Could not evaluate string. Stack trace: -*[1] Error( "Could not evaluate string.\n" ); at GAPROOT/lib/string.gi:LINE called from +*[1] Error( "Could not evaluate string.\n" ); + @ GAPROOT/lib/string.gi:LINE ( ) called from read-eval loop at *stdin*:6 you can 'quit;' to quit to outer loop, or @@ -20,7 +21,8 @@ Stack trace: not in any function at stream:2 Error, Could not evaluate string. Stack trace: -*[1] Error( "Could not evaluate string.\n" ); at GAPROOT/lib/string.gi:LINE called from +*[1] Error( "Could not evaluate string.\n" ); + @ GAPROOT/lib/string.gi:LINE ( ) called from read-eval loop at *stdin*:6 you can 'quit;' to quit to outer loop, or diff --git a/tst/testspecial/mem-overflow.g.out b/tst/testspecial/mem-overflow.g.out index df6e77c763..82620ab76a 100644 --- a/tst/testspecial/mem-overflow.g.out +++ b/tst/testspecial/mem-overflow.g.out @@ -3,7 +3,8 @@ gap> l:=[1];; while true do Append(l,l); od; Error, reached the pre-set memory limit (change it with the -o command line option) Stack trace: -*[1] Append( l, l ); at *stdin*:3 called from +*[1] Append( l, l ); + @ *stdin*:3 ( ) called from read-eval loop at *stdin*:3 you can 'return;' diff --git a/tst/testspecial/method-not-found-where.g.out b/tst/testspecial/method-not-found-where.g.out index e2a843aeb7..c7496f32b2 100644 --- a/tst/testspecial/method-not-found-where.g.out +++ b/tst/testspecial/method-not-found-where.g.out @@ -4,7 +4,8 @@ gap> f(()); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `+' on 2 arguments Stack trace: -*[1] a + a at *stdin*:3 called from +*[1] a + a + @ *stdin*:3 ( ) called from read-eval loop at *stdin*:4 type 'quit;' to quit to outer loop @@ -12,7 +13,8 @@ brk> ShowMethods(1); #I Searching Method for + with 2 arguments: #I Total: 138 entries brk> Where(5); -*[1] a + a at *stdin*:3 called from +*[1] a + a + @ *stdin*:3 ( ) called from read-eval loop at *errin*:2 brk> quit; diff --git a/tst/testspecial/method-not-found.g.out b/tst/testspecial/method-not-found.g.out index e982bc5443..fa8a04ad87 100644 --- a/tst/testspecial/method-not-found.g.out +++ b/tst/testspecial/method-not-found.g.out @@ -3,7 +3,8 @@ gap> f:=a->a+a;; f(()); Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `+' on 2 arguments Stack trace: -*[1] a + a at *stdin*:3 called from +*[1] a + a + @ *stdin*:3 ( ) called from read-eval loop at *stdin*:3 type 'quit;' to quit to outer loop diff --git a/tst/testspecial/repl-syntax-err.g.out b/tst/testspecial/repl-syntax-err.g.out index 5e160ce41f..9b4f6bc090 100644 --- a/tst/testspecial/repl-syntax-err.g.out +++ b/tst/testspecial/repl-syntax-err.g.out @@ -6,7 +6,7 @@ gap> # error then is displayed. The next line then contains another syntax gap> # error, which wasn't reported correctly before the above issues was gap> # fixed. gap> Error(""): -Error, +Error, Stack trace: not in any function at *stdin*:9 you can 'quit;' to quit to outer loop, or diff --git a/tst/testspecial/stack-depth-func.g.out b/tst/testspecial/stack-depth-func.g.out index 584e40e9be..60ab11d2a3 100644 --- a/tst/testspecial/stack-depth-func.g.out +++ b/tst/testspecial/stack-depth-func.g.out @@ -3,21 +3,31 @@ function( ) ... end gap> f(); Error, recursion depth trap (5000) Stack trace: -*[1] f( ); at *stdin*:2 called from - [2] f( ); at *stdin*:2 called from - [3] f( ); at *stdin*:2 called from - [4] f( ); at *stdin*:2 called from - [5] f( ); at *stdin*:2 called from +*[1] f( ); + @ *stdin*:2 + [2] f( ); + @ *stdin*:2 + [3] f( ); + @ *stdin*:2 + [4] f( ); + @ *stdin*:2 + [5] f( ); + @ *stdin*:2 ... at *stdin*:3 you may 'return;' brk> return; # try once more Error, recursion depth trap (10000) Stack trace: -*[1] f( ); at *stdin*:2 called from - [2] f( ); at *stdin*:2 called from - [3] f( ); at *stdin*:2 called from - [4] f( ); at *stdin*:2 called from - [5] f( ); at *stdin*:2 called from +*[1] f( ); + @ *stdin*:2 + [2] f( ); + @ *stdin*:2 + [3] f( ); + @ *stdin*:2 + [4] f( ); + @ *stdin*:2 + [5] f( ); + @ *stdin*:2 ... at *stdin*:3 you may 'return;' brk> QUIT; diff --git a/tst/testspecial/stack-depth-func2.g.out b/tst/testspecial/stack-depth-func2.g.out index d3dbc9bed8..7027f3df17 100644 --- a/tst/testspecial/stack-depth-func2.g.out +++ b/tst/testspecial/stack-depth-func2.g.out @@ -3,21 +3,31 @@ function( ) ... end gap> y := f(); Error, recursion depth trap (5000) Stack trace: -*[1] f( ) at *stdin*:2 called from - [2] f( ) at *stdin*:2 called from - [3] f( ) at *stdin*:2 called from - [4] f( ) at *stdin*:2 called from - [5] f( ) at *stdin*:2 called from +*[1] f( ) + @ *stdin*:2 + [2] f( ) + @ *stdin*:2 + [3] f( ) + @ *stdin*:2 + [4] f( ) + @ *stdin*:2 + [5] f( ) + @ *stdin*:2 ... at *stdin*:3 you may 'return;' brk> return; # try once more Error, recursion depth trap (10000) Stack trace: -*[1] f( ) at *stdin*:2 called from - [2] f( ) at *stdin*:2 called from - [3] f( ) at *stdin*:2 called from - [4] f( ) at *stdin*:2 called from - [5] f( ) at *stdin*:2 called from +*[1] f( ) + @ *stdin*:2 + [2] f( ) + @ *stdin*:2 + [3] f( ) + @ *stdin*:2 + [4] f( ) + @ *stdin*:2 + [5] f( ) + @ *stdin*:2 ... at *stdin*:3 you may 'return;' brk> QUIT; diff --git a/tst/testspecial/stack-depth-rec.g.out b/tst/testspecial/stack-depth-rec.g.out index e9192f564b..af205e7582 100644 --- a/tst/testspecial/stack-depth-rec.g.out +++ b/tst/testspecial/stack-depth-rec.g.out @@ -71,21 +71,31 @@ rec( gap> String(r); Error, recursion depth trap (5000) Stack trace: -*[1] String( record.(nam) ) at GAPROOT/lib/record.gi:LINE called from - [2] String( record.(nam) ) at GAPROOT/lib/record.gi:LINE called from - [3] String( record.(nam) ) at GAPROOT/lib/record.gi:LINE called from - [4] String( record.(nam) ) at GAPROOT/lib/record.gi:LINE called from - [5] String( record.(nam) ) at GAPROOT/lib/record.gi:LINE called from +*[1] String( record.(nam) ) + @ GAPROOT/lib/record.gi:LINE + [2] String( record.(nam) ) + @ GAPROOT/lib/record.gi:LINE + [3] String( record.(nam) ) + @ GAPROOT/lib/record.gi:LINE + [4] String( record.(nam) ) + @ GAPROOT/lib/record.gi:LINE + [5] String( record.(nam) ) + @ GAPROOT/lib/record.gi:LINE ... at *stdin*:4 you may 'return;' brk> return; # try once more Error, recursion depth trap (5000) Stack trace: -*[1] String( record.(nam) ) at GAPROOT/lib/record.gi:LINE called from - [2] String( record.(nam) ) at GAPROOT/lib/record.gi:LINE called from - [3] String( record.(nam) ) at GAPROOT/lib/record.gi:LINE called from - [4] String( record.(nam) ) at GAPROOT/lib/record.gi:LINE called from - [5] String( record.(nam) ) at GAPROOT/lib/record.gi:LINE called from +*[1] String( record.(nam) ) + @ GAPROOT/lib/record.gi:LINE + [2] String( record.(nam) ) + @ GAPROOT/lib/record.gi:LINE + [3] String( record.(nam) ) + @ GAPROOT/lib/record.gi:LINE + [4] String( record.(nam) ) + @ GAPROOT/lib/record.gi:LINE + [5] String( record.(nam) ) + @ GAPROOT/lib/record.gi:LINE ... at *stdin*:4 you may 'return;' brk> QUIT; diff --git a/tst/testspecial/stack-trace-depth.g b/tst/testspecial/stack-trace-depth.g new file mode 100644 index 0000000000..dde6f2571b --- /dev/null +++ b/tst/testspecial/stack-trace-depth.g @@ -0,0 +1,36 @@ +f11 := function() + Error("foo"); +end;; +f10 := function() + return f11(); +end;; +f9 := function() + return f10(); +end;; +f8 := function() + return f9(); +end;; +f7 := function() + return f8(); +end;; +f6 := function() + return f7(); +end;; +f5 := function() + return f6(); +end;; +f4 := function() + return f5(); +end;; +f3 := function() + return f4(); +end;; +f2 := function() + return f3(); +end;; +f1 := function() + return f2(); +end;; +f1(); +Where(12); +quit; diff --git a/tst/testspecial/stack-trace-depth.g.out b/tst/testspecial/stack-trace-depth.g.out new file mode 100644 index 0000000000..0005d8c5c7 --- /dev/null +++ b/tst/testspecial/stack-trace-depth.g.out @@ -0,0 +1,76 @@ +gap> f11 := function() +> Error("foo"); +> end;; +gap> f10 := function() +> return f11(); +> end;; +gap> f9 := function() +> return f10(); +> end;; +gap> f8 := function() +> return f9(); +> end;; +gap> f7 := function() +> return f8(); +> end;; +gap> f6 := function() +> return f7(); +> end;; +gap> f5 := function() +> return f6(); +> end;; +gap> f4 := function() +> return f5(); +> end;; +gap> f3 := function() +> return f4(); +> end;; +gap> f2 := function() +> return f3(); +> end;; +gap> f1 := function() +> return f2(); +> end;; +gap> f1(); +Error, foo +Stack trace: +*[1] Error( "foo" ); + @ *stdin*:3 + [2] f11( ) + @ *stdin*:6 + [3] f10( ) + @ *stdin*:9 + [4] f9( ) + @ *stdin*:12 + [5] f8( ) + @ *stdin*:15 +... at *stdin*:35 +you can 'quit;' to quit to outer loop, or +you can 'return;' to continue +brk> Where(12); +* [1] Error( "foo" ); + @ *stdin*:3 + [2] f11( ) + @ *stdin*:6 + [3] f10( ) + @ *stdin*:9 + [4] f9( ) + @ *stdin*:12 + [5] f8( ) + @ *stdin*:15 + [6] f7( ) + @ *stdin*:18 + [7] f6( ) + @ *stdin*:21 + [8] f5( ) + @ *stdin*:24 + [9] f4( ) + @ *stdin*:27 + [10] f3( ) + @ *stdin*:30 + [11] f2( ) + @ *stdin*:33 +( ) + called from read-eval loop at *errin*:1 +brk> quit; +gap> QUIT; diff --git a/tst/testspecial/stack-trace-label.g.out b/tst/testspecial/stack-trace-label.g.out index bd31c1584b..a7a71b90c8 100644 --- a/tst/testspecial/stack-trace-label.g.out +++ b/tst/testspecial/stack-trace-label.g.out @@ -4,7 +4,8 @@ gap> f := function() gap> f(); Error, foo Stack trace: -*[1] Error( "foo" ); at *stdin*:3 called from +*[1] Error( "foo" ); + @ *stdin*:3 ( ) called from read-eval loop at *stdin*:5 you can 'quit;' to quit to outer loop, or diff --git a/tst/testspecial/syntax-tree-error.g b/tst/testspecial/syntax-tree-error.g index c2c6880920..f944007879 100644 --- a/tst/testspecial/syntax-tree-error.g +++ b/tst/testspecial/syntax-tree-error.g @@ -1,5 +1,5 @@ func := function ( ) - Error( ); + Error( "oops" ); end; func := SYNTAX_TREE_CODE( SYNTAX_TREE( func ) ); diff --git a/tst/testspecial/syntax-tree-error.g.out b/tst/testspecial/syntax-tree-error.g.out index 16b8ded9f9..96794103f1 100644 --- a/tst/testspecial/syntax-tree-error.g.out +++ b/tst/testspecial/syntax-tree-error.g.out @@ -1,5 +1,5 @@ gap> func := function ( ) -> Error( ); +> Error( "oops" ); > end; function( ) ... end gap> @@ -7,9 +7,9 @@ gap> func := SYNTAX_TREE_CODE( SYNTAX_TREE( func ) ); function( ) ... end gap> gap> func( ); -Error, +Error, oops Stack trace: -*[1] called from +*[1] ( ) called from read-eval loop at *stdin*:8 you can 'quit;' to quit to outer loop, or diff --git a/tst/testspecial/up-down-env.g.out b/tst/testspecial/up-down-env.g.out index a1e18d2a06..f27012aa67 100644 --- a/tst/testspecial/up-down-env.g.out +++ b/tst/testspecial/up-down-env.g.out @@ -8,11 +8,16 @@ function( lvl ) ... end gap> f(7); Error, Rational operations: must not be zero Stack trace: -*[1] 1 / lvl at *stdin*:7 called from - [2] f( lvl - 1 ) at *stdin*:7 called from - [3] f( lvl - 1 ) at *stdin*:7 called from - [4] f( lvl - 1 ) at *stdin*:7 called from - [5] f( lvl - 1 ) at *stdin*:7 called from +*[1] 1 / lvl + @ *stdin*:7 + [2] f( lvl - 1 ) + @ *stdin*:7 + [3] f( lvl - 1 ) + @ *stdin*:7 + [4] f( lvl - 1 ) + @ *stdin*:7 + [5] f( lvl - 1 ) + @ *stdin*:7 ... at *stdin*:8 type 'quit;' to quit to outer loop brk> UpEnv(1); lvl;