Module attach

This module provide debugger attachment for a Prolog engine. The ordinary spy points and break points from the default debugger are stored on the knowledge base level. The spy points and break points provided by this module are stored in the current engine.

The predicate tdebugging/0 allows listing all the Prolog engine locale spy points and break points. The predicates tspy/1 and tbreak/2 allow adding spy points respectively break points. The predicates tnospy/1 and tnobreak/2 allow removing them.

The following attach predicates are provided:

tclear:
The predicate switches the engine to the inherit mode.
tdebug:
The predicate switches the engine to the on mode.
ttrace:
The predicate switches the engine to the step in mode.
tskip:
The predicate switches the engine to the step over mode.
tup:
The predicate switches the engine to the step out mode.
tnodebug:
The predicate switches the engine to the off mode.
tleash(L):
Leash the ports of the engine that are listed in L, unleash the of the engine ports that are not listed in L. When prompted, unleashed ports do not await user interaction but simply continue. The predicate accepts the same mnemonics as the predicate visible/1.
tvisible(L):
Show the ports of the engine that are listed in L, hide the ports of the engine that are not listed in L. In debug mode, hidden ports are not further debugged but simply continue. The predicate accepts the same mnemonics as the predicate visible/1.
tdebugging:
The predicate shows the engine spy points and the engine break points.
tspy(P):
The predicate adds the predicate P to the engine spy points.
tnospy(P):
The predicate removes the predicate P from the engine spy points.
tspying(P):
The predicate succeeds in P for every engine spy point.
tbreak(F, L):
The predicate adds the file F and the line number L to the engine break points.
tnobreak(F, L):
The predicate removes the file F and the line number L from the engine break points.
tbreaking(F, L):
For every engine break point the predicate succeeds with the file F and the line number L.

The following attach thread flags are provided:

sys_tdebug:
The legal values are inherit, on, step_in, step_over, step_out and off. The value indi-cates the debugging mode of the given thread. The default value is inherit. The value can be changed..
sys_top_frame:
The value is a stack frame or null. The value is the top frame of the given thread. The value cannot be changed.
sys_thread_store:
The value is a knowledge base. The value is the knowledge base of the given thread. The value cannot be changed.
sys_tleash:
Legal values are lists of debugger ports. Legal debugger ports are call, exit, redo, fail, head and chop. The value indicates the engine prompt leashing. The default value is [call,exit,redo,fail]. The value can be changed.
sys_tvisible:
Legal values are lists of debugger ports. Legal debugger ports are call, exit, redo, fail, head and chop. The value indicates the engine tracing visibility. The default value is [call,exit,redo,fail]. The value can be changed.
sys_tskip_frame:
The legal values are stack frames or the atom null. The value indicates the skip desti-nation frame. Default value is null. The value can be changed.

Comments