~ubuntu-branches/ubuntu/wily/eso-midas/wily-proposed

« back to all changes in this revision

Viewing changes to prim/help/debug_modu.hlq

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
% @(#)debug_modu.hlq    1.1 (ESO-IPG) 7/9/91 13:27:05 
 
2
\rightpage
 
3
\se
 
4
SECTION./MODU
 
5
\es\co
 
6
DEBUG/MODULE                                    14-JAN-2003  KB
 
7
\oc\su
 
8
DEBUG/MODULE [low_lev,hi_lev] [switch]
 
9
        run MIDAS\ modules in debug mode
 
10
\us\pu
 
11
Purpose:
 
12
          Run Midas (executable) modules in debug mode.
 
13
\up\sub
 
14
Subject:
 
15
          Debugging
 
16
\bus\sy
 
17
Syntax:
 
18
          DEBUG/MODULE [low_lev,hi_lev] [switch]
 
19
\ys\pa
 
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.
 
24
              Defaulted to 1,1.
 
25
\ap\pa
 
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;
 
31
              defaulted to ON
 
32
\ap\sa
 
33
See also: 
 
34
          DEBUG/PROCEDURE
 
35
\as\no
 
36
Note:  
 
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.
 
41
 
 
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
 
50
          in Linux.
 
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"
 
55
\on\exs
 
56
Examples:
 
57
\ex
 
58
          DEBUG/MODU  1,2
 
59
            Run all Midas modules which are executed in a procedure at level 1
 
60
            or level 2 in debug mode.
 
61
\xe\ex
 
62
          DEBUG/MODU off
 
63
            Turn debug mode off for all levels.
 
64
\xe\ex
 
65
          DEBUG/MODU 2,2 no
 
66
            Skip all executable modules at procedure level 2.
 
67
\xe \sxe