1
% @(#)debug_modu.hlq 1.1 (ESO-IPG) 7/9/91 13:27:05
6
DEBUG/MODULE 14-JAN-2003 KB
8
DEBUG/MODULE [low_lev,hi_lev] [switch]
9
run MIDAS\ modules in debug mode
12
Run Midas (executable) modules in debug mode.
18
DEBUG/MODULE [low_lev,hi_lev] [switch]
20
low_lev,hi_lev = \\ defines interval of levels, only if the Midas
21
module is executed at a level inside that interval, it is
22
run in debug mode. Modules which are executed at a different
23
level are not (!) run in debug mode.
26
switch = ON, NO, TIME or OFF;
27
ON - run module with debugger;
28
NO - do not execute the module, i.e. continue with procedure;
29
TIME - run module normally + show time before and after execution
30
OFF - disable debug mode, execute module normally;
37
'Levels' are the levels at which the relevant Midas procedures
38
containing the module to be debugged are executed.
39
To turn off debug mode at all levels, enter simply DEBUG/MODU OFF .
40
If switch = TIME, the times are also stored in the MIDAS logfile.
42
Since the 02SEP release the char. keyword array MID$DEBUG (of three
43
40 char. strings) is used to store all info for the chosen debugger:
44
MID$DEBUG(1) holds the name of the debugger, e.g. /usr/bin/gdb
45
MID$DEBUG(2) holds any debug flags (entered before the executable)
46
MID$DEBUG(3) holds any options (following the executable)
47
For example, to use "valgrind" on a Linux system and send all its
48
output to a file valgrind.log, you have to enter the command line:
49
$ valgrind --logfile-fd=9 my_executable 9>valgrind.log
51
To achieve this inside Midas, set MID$DEBUG as follows:
52
(1) = "/usr/bin/valgrind"
53
(2) = "--logfile-fd=9"
54
(3) = "9>valgrind.log"
59
Run all Midas modules which are executed in a procedure at level 1
60
or level 2 in debug mode.
63
Turn debug mode off for all levels.
66
Skip all executable modules at procedure level 2.