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