[BACK]Return to debug.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-doc / parts

Annotation of OpenXM/src/asir-doc/parts/debug.texi, Revision 1.2

1.2     ! noro        1: @comment $OpenXM$
        !             2: \BJP
1.1       noro        3: @node $B%G%P%C%,(B,,, Top
                      4: @chapter $B%G%P%C%,(B
1.2     ! noro        5: \E
        !             6: \BEG
        !             7: @node Debugger,,, Top
        !             8: @chapter Debugger
        !             9: \E
1.1       noro       10:
                     11: @menu
1.2     ! noro       12: \BJP
1.1       noro       13: * $B%G%P%C%,$H$O(B::
                     14: * $B%3%^%s%I$N2r@b(B::
                     15: * $B%G%P%C%,$N;HMQNc(B::
                     16: * $B%G%P%C%,$N=i4|2=%U%!%$%k$NNc(B::
1.2     ! noro       17: \E
        !            18: \BEG
        !            19: * What is Debugger::
        !            20: * Debugger commands::
        !            21: * Execution example of debugger::
        !            22: * Sample file of initialization file for Debugger::
        !            23: \E
1.1       noro       24: @end menu
                     25:
1.2     ! noro       26: \BJP
1.1       noro       27: @node $B%G%P%C%,$H$O(B,,, $B%G%P%C%,(B
                     28: @section $B%G%P%C%,$H$O(B
1.2     ! noro       29: \E
        !            30: \BEG
        !            31: @node What is Debugger,,, Debugger
        !            32: @section What is Debugger
        !            33: \E
1.1       noro       34:
                     35: @noindent
1.2     ! noro       36: \BJP
1.1       noro       37: C $B8@8l$G=q$+$l$?%W%m%0%i%`$N$?$a$N%G%P%C%,(B @code{dbx}
                     38: $B$O(B, $B%=!<%9%l%Y%k$G$N%V%l!<%/%]%$%s%H$N@_Dj(B, $B%9%F%C(B
                     39: $B%W<B9T(B, $BJQ?t$N;2>H$J$I$,2DG=$J6/NO$J%G%P%C%,$G$"$k(B. @b{Asir} $B$G$O(B,
                     40: @code{dbx} $BIw$N%G%P%C%,$rMQ0U$7$F$$$k(B. $B%G%P%C%0%b!<%I$KF~$k$K$O(B, $B%H%C(B
                     41: $B%W%l%Y%k$G(B @code{debug;} $B$HF~NO$9$k(B.
1.2     ! noro       42: \E
        !            43: \BEG
        !            44: A debugger @code{dbx} is available for C programs on @code{Sun},
        !            45: @code{VAX} etc.
        !            46: In @code{dbx}, one can use commands such as setting break-point on
        !            47: a source line, stepwise execution, inspecting a variable's value etc.
        !            48: @b{Asir} provides such a @code{dbx}-like debugger.
        !            49: In addition to such commands, we adopted several useful commands
        !            50: from @code{gdb}.
        !            51: In order to enter the debug-mode, type @code{debug;} at the top level
        !            52: of @b{Asir}.
        !            53: \E
        !            54:
1.1       noro       55: @example
                     56: [10] debug;
                     57: (debug)
                     58: @end example
                     59:
                     60: @noindent
1.2     ! noro       61: \JP $B$=$NB>(B, $B<!$NJ}K!(B, $B$"$k$$$O>u67$G%G%P%C%0%b!<%I$KF~$k(B.
        !            62: \BEG
        !            63: @code{Asir} also enters the debug-mode by the following means or in the
        !            64: following situations.
        !            65: \E
1.1       noro       66:
                     67: @itemize @bullet
                     68: @item
1.2     ! noro       69: \JP $B<B9TCf%V%l!<%/%]%$%s%H$KC#$7$?>l9g(B
        !            70: \EG When it reaches a break point while executing a program.
1.1       noro       71:
                     72: @item
1.2     ! noro       73: \JP $B3d$j9~$_$G(B @samp{d} $B$rA*Br$7$?>l9g(B
        !            74: \EG When the @samp{d} option is selected at an interruption.
1.1       noro       75:
                     76: @item
1.2     ! noro       77: \JP $B<B9TCf%(%i!<$r5/$3$7$?>l9g(B
        !            78: \EG When it detects errors while executing a program.
1.1       noro       79:
1.2     ! noro       80: \BJP
1.1       noro       81: $B$3$N>l9g(B, $B<B9T$N7QB3$OIT2DG=$G$"$k$,(B, $BD>@\$N%(%i!<$N860x$H$J$C$?(B
                     82: $B%f!<%6Dj5AH!?t$NJ8$rI=<($7$F%G%P%C%0%b!<%I$KF~$k$?$a(B, $B%(%i!<;~(B
                     83: $B$K$*$1$kJQ?t$NCM$r;2>H$G$-(B, $B%G%P%C%0$KLrN)$?$;$k$3$H$,$G$-$k(B.
1.2     ! noro       84: \E
        !            85: \BEG
        !            86: In this case, to continue the execution of the program is impossible.
        !            87: But because it reports the statement in the user defined function
        !            88: that caused the error, then enters the debug-mode, user can inspect
        !            89: the values of variables at the error state.  This helps to analyze
        !            90: the error and debug the program.
        !            91: \E
1.1       noro       92:
                     93: @item
1.2     ! noro       94: \JP @code{error()} $B$,8F$S=P$5$l$?>l9g(B
        !            95: \EG When built-in function @code{error()} is called.
1.1       noro       96: @end itemize
                     97:
1.2     ! noro       98: \BJP
1.1       noro       99: @node $B%3%^%s%I$N2r@b(B,,, $B%G%P%C%,(B
                    100: @section $B%3%^%s%I$N2r@b(B
1.2     ! noro      101: \E
        !           102: \BEG
        !           103: @node Debugger commands,,, Debugger
        !           104: @section Debugger commands
        !           105: \E
1.1       noro      106:
                    107: @noindent
1.2     ! noro      108: \BJP
1.1       noro      109: $B%3%^%s%I$O(B @code{dbx} $B$N%3%^%s%I$NFbI,MW:G>.8B$N$b$N$r:NMQ$7$?(B.
                    110: $B99$K(B, @code{gdb} $B$N%3%^%s%I$+$i$b$$$/$D$+JXMx$J$b$N$r:NMQ$7$?(B.
                    111: $B<B:]$N5!G=$O(B @code{dbx} $B$H$[$\F1MM$G$"$k$,(B, @code{step}, @code{next} $B$O(B,
                    112:  $B<!$N9T$G$O$J$/<!$NJ8$r<B9T$9$k(B.
                    113: $B=>$C$F(B, 1$B9T$KJ#?t$NJ8$,$"$k>l9g$O(B, $B$=$NJ8$N?t$@$1(B @code{next}
                    114: $B$r<B9T$7$J$1$l$P<!$N9T$K?J$a$J$$(B. $B$^$?(B, @code{dbx} $B$HF1MM(B
                    115: @file{.dbxinit} $B$rFI$_9~$`$N$G(B, @code{dbx} $B$HF1$8(B alias $B$r;H$&$3$H$,$G(B
                    116: $B$-$k(B.
1.2     ! noro      117: \E
        !           118: \BEG
        !           119: Only indispensable commands of @code{dbx} are supported
        !           120: in the current version.
        !           121: Generally, the effect of a command is the same as that of @code{dbx}.
        !           122: There are, however, slight differences:
        !           123: Commands @code{step} and @code{next} execute the next statement, but not
        !           124: the next line; therefore, if there are multiple statements in one line,
        !           125: one should issue such commands several times to proceed the next line.
        !           126: The debugger reads in @file{.dbxinit}, which allows the same aliases
        !           127: as is used in @code{dbx}.
        !           128: \E
1.1       noro      129:
                    130: @table @code
                    131: @item step
1.2     ! noro      132: \JP $B<!$NJ8$r<B9T$9$k(B. $B<!$NJ8$,H!?t$r4^$`$H$-(B, $B$=$NH!?t$KF~$k(B.
        !           133: \BEG
        !           134: Executes the next statement; if the next statement contains a
        !           135: function call, then enters the function.
        !           136: \E
1.1       noro      137: @item next
1.2     ! noro      138: \JP $B<!$NJ8$r<B9T$9$k(B.
        !           139: \EG Executes the next statement.
1.1       noro      140: @item finish
1.2     ! noro      141: \BJP
1.1       noro      142: $B8=:_<B9TCf$NH!?t$N<B9T$,=*N;$7$?;~E@$G:F$S%G%P%C%0%b!<%I$KF~$k(B.
                    143: $B8m$C$F(B @code{step} $B$r<B9T$7$?>l9g$KM-8z$G$"$k(B.
1.2     ! noro      144: \E
        !           145: \BEG
        !           146: Enter the debug-mode again after finishing
        !           147: the execuction of the current function.
        !           148: This is useful when an unnecessary @code{step} has been executed.
        !           149: \E
1.1       noro      150: @item cont
                    151: @itemx quit
1.2     ! noro      152: \JP $B%G%P%C%0%b!<%I$+$iH4$1(B, $B<B9T$r7QB3$9$k(B.
        !           153: \EG Exits from the debug-mode and continues execution.
1.1       noro      154: @item up [@var{n}]
1.2     ! noro      155: \BJP
1.1       noro      156: $B%9%?%C%/%U%l!<%`$r(B 1 $BCJ(B ($B0z?t(B @var{n} $B$,$"$k;~$O(B @var{n} $BCJ(B) $B>e$,$k(B.
                    157: $B$3$l$K$h$j(B, $B$=$N%9%?%C%/%U%l!<%`$KB0$9$kJQ?t$NCM$N;2>H(B, $BJQ99$,$G$-$k(B.
1.2     ! noro      158: \E
        !           159: \BEG
        !           160: Move up the call stack one level.
        !           161: Move up the call stack @var{n} levels if @var{n} is specified.
        !           162: \E
1.1       noro      163: @item down [@var{n}]
1.2     ! noro      164: \JP $B%9%?%C%/%U%l!<%`$r(B 1 $BCJ(B ($B0z?t(B @var{n} $B$,$"$k;~$O(B @var{n} $BCJ(B) $B2<$,$k(B.
        !           165: \BEG
        !           166: Move down the call stack one level.
        !           167: Move down the call stack @var{n} levels if @var{n} is specified.
        !           168: \E
1.1       noro      169: @item frame [@var{n}]
1.2     ! noro      170: \BJP
1.1       noro      171: $B0z?t$,$J$$$H$-(B, $B8=:_<B9TCf$NH!?t$rI=<($9$k(B.
                    172: $B0z?t$,$"$k$H$-(B, $B%9%?%C%/%U%l!<%`$rHV9f(B @var{n} $B$N$b$N$K@_Dj$9$k(B. $B$3$3$G(B
                    173: $B%9%?%C%/%U%l!<%`$NHV9f$H$O(B
                    174: @code{where} $B$K$h$jI=<($5$l$k8F$S=P$7Ns$K$*$$$F(B, $B@hF,$KI=<($5$l$kHV9f$N(B
                    175: $B$3$H$G$"$k(B.
1.2     ! noro      176: \E
        !           177: \BEG
        !           178: Print the current stack frame with no argument. @var{n}
        !           179: specifies the stack frame number to be selected. Here the
        !           180: stack frame number is a number at the top of lines displayed
        !           181: by executing @code{where}.
        !           182: \E
1.1       noro      183: @item list [@var{startline}]
                    184: @itemx list @var{function}
1.2     ! noro      185: \BJP
1.1       noro      186: $B8=:_9T(B, $B$^$?$O(B @var{startline}, $B$^$?$O(B @var{function}$B$N@hF,$+$i(B 10 $B9T%=!<(B
                    187: $B%9%U%!%$%k$rI=<($9$k(B.
1.2     ! noro      188: \E
        !           189: \BEG
        !           190: Displays ten lines in a source file from @var{startline},
        !           191: the current line if the @var{startline} is not specified,
        !           192: or from the top line of current target @var{function}.
        !           193: \E
1.1       noro      194: @item print @var{expr}
1.2     ! noro      195: \JP @var{expr} $B$rI=<($9$k(B.
        !           196: \EG Displays @var{expr}.
1.1       noro      197: @item func @var{function}
1.2     ! noro      198: \JP $BBP>]H!?t$r(B @var{function} $B$K@_Dj$9$k(B.
        !           199: \EG Set the target function to @var{function}.
1.1       noro      200: @item stop at @var{sourceline} [if @var{cond}]
                    201: @itemx stop in @var{function}
1.2     ! noro      202: \BJP
1.1       noro      203: @var{sourceline}$B9TL\(B, $B$^$?$O(B @var{function} $B$N@hF,$K%V%l!<%/%]%$%s%H$r(B
                    204: $B@_Dj$9$k(B. $B%V%l!<%/%]%$%s%H$O(B, $BH!?t$,:FDj5A$5$l$?>l9g<+F0E*$K<h$j>C$5$l(B
                    205: $B$k(B. @code{if} $B$,B3$/>l9g(B, @var{cond} $B$,I>2A$5$l(B, $B$=$l$,(B 0 $B$G$J$$>l9g$K(B
                    206: $B<B9T$,CfCG$7(B, $B%G%P%C%0%b!<%I$KF~$k(B.
1.2     ! noro      207: \E
        !           208: \BEG
        !           209: Set a break-point at the @var{sourceline}-th line of the source file,
        !           210: or at the top of the target function.
        !           211: Break-points are removed whenever the relevant function is redefined.
        !           212: When @code{if} statements are repeatedly encountered,
        !           213: @b{Asir} enters debug-mode only when the corresponding
        !           214: @var{cond} parts are evaluated to a non-zero value.
        !           215: \E
1.1       noro      216: @item trace @var{expr} at @var{sourceline} [if @var{cond}]
                    217: @item trace @var{expr} in @var{function}
1.2     ! noro      218: \BJP
1.1       noro      219: @code{stop} $B$HF1MM$G$"$k$,(B, @code{trace} $B$G$OC1$K(B @var{expr} $B$rI=<($9$k(B
                    220: $B$N$_$G(B, $B%G%P%C%0%b!<%I$K$OF~$i$J$$(B.
1.2     ! noro      221: \E
        !           222: \BEG
        !           223: These are similar to @code{stop}. @code{trace} simply displays the value
        !           224: of @var{expr} and without entering the debug-mode.
        !           225: \E
1.1       noro      226: @item delete @var{n}
1.2     ! noro      227: \JP $B%V%l!<%/%]%$%s%H(B @var{n} $B$r<h$j>C$9(B.
        !           228: \BEG
        !           229: Remove the break point specified by a number @var{n}, which can be
        !           230: known by the @code{status} command.
        !           231: \E
1.1       noro      232: @item status
1.2     ! noro      233: \JP $B%V%l!<%/%]%$%s%H$N0lMw$rI=<($9$k(B.
        !           234: \EG Displays a list of the break-points.
1.1       noro      235: @item where
1.2     ! noro      236: \JP $B8=:_$NDd;_E@$^$G$N8F$S=P$7Ns$rI=<($9$k(B.
        !           237: \BEG
        !           238: Displays the calling sequence of functions from the top level
        !           239: through the current level.
        !           240: \E
1.1       noro      241: @item alias @var{alias} @var{command}
1.2     ! noro      242: \JP @var{command} $B$K(B @var{alias} $B$NJLL>$rM?$($k(B.
        !           243: \EG Create an alias @var{alias} for @var{command}
1.1       noro      244: @end table
                    245:
                    246: @noindent
1.2     ! noro      247: \BJP
1.1       noro      248: @code{print} $B$N0z?t$H$7$F(B, $B%H%C%W%l%Y%k$K$*$1$k$[$H$s$I$9$Y$F$N<0(B
                    249: $B$,$H$l$k(B. $BDL>o$O(B, $BJQ?t$NFbMF$NI=<($,<g$G$"$k$,(B, $BI,MW$K1~$8$F<!$N(B
                    250: $B$h$&$J;H$$J}$,$G$-$k(B.
1.2     ! noro      251: \E
        !           252: \BEG
        !           253: The debugger command @code{print} can take almost all expressions
        !           254: as its argument.  The ordinary usage is to print the values of
        !           255: (programming) variables.  However, the following usage is worth to
        !           256: remember.
        !           257: \E
1.1       noro      258:
                    259: @itemize @bullet
                    260: @item
1.2     ! noro      261: \JP @b{$BJQ?t$N=q$-49$((B}
        !           262: \EG @b{overwriting the variable}
1.1       noro      263:
1.2     ! noro      264: \BJP
1.1       noro      265: $B<B9TCf$N%V%l!<%/%]%$%s%H$K$*$$$F(B, $BJQ?t$NCM$rJQ99$7$F<B9T$r7QB3$5$;$?$$(B
                    266: $B>l9g(B, $B<!$N$h$&$JA`:n$r9T$($P$h$$(B.
1.2     ! noro      267: \E
        !           268: \BEG
        !           269: One might sometimes wish to continue the execution with several values of
        !           270: variables modified.  For such an purpose, take the following procedure.
        !           271: \E
1.1       noro      272:
                    273: @example
                    274: (debug) print A
                    275: A = 2
                    276: (debug) print A=1
                    277: A=1 = 1
                    278: (debug) print A
                    279: A = 1
                    280: @end example
                    281:
                    282:
                    283: @item
1.2     ! noro      284: \JP @b{$BH!?t$N8F$S=P$7(B}
        !           285: \EG @b{function call}
1.1       noro      286:
1.2     ! noro      287: \JP $BH!?t8F$S=P$7$b<0$G$"$k$+$i(B, @code{print} $B$N0z?t$H$7$F$H$l$k(B.
        !           288: \BEG
        !           289: A function call is also an expression, therefore, it can appear at
        !           290: the argument place of @code{print}.
        !           291: \E
1.1       noro      292:
                    293: @example
                    294: (debug) print length(List)
                    295: length(List) = 14
                    296: @end example
                    297:
1.2     ! noro      298: \BJP
1.1       noro      299: $B$3$NNc$G$O(B, $BJQ?t(B @code{List} $B$K3JG<$5$l$F$$$k%j%9%H$ND9$5$r(B @code{length()}
                    300: $B$K$h$jD4$Y$F$$$k(B.
1.2     ! noro      301: \E
        !           302: \BEG
        !           303: In this example, the length of the list assigned to the variable
        !           304: @code{List} is examined by a function @code{length()}.
        !           305: \E
1.1       noro      306:
                    307: @example
                    308: (debug) print ctrl("cputime",1)
                    309: ctrl("cputime",1) = 1
                    310: @end example
                    311:
1.2     ! noro      312: \BJP
1.1       noro      313: $B$3$NNc$O(B, $B7W;;3+;O;~$K(B CPU $B;~4V$NI=<($N;XDj$r$7K:$l$?>l9g$J$I$K(B, $B7W;;(B
                    314: $BESCf$G%G%P%C%0%b!<%I$+$i;XDj$r9T$($k$3$H$r<($7$F$$$k(B.
                    315:
                    316: $B$^$?(B, $B;_$`$rF@$:7W;;$rCfCG$7$J$1$l$P$J$i$J$$>l9g(B, $B%G%P%C%0%b!<%I$+$i(B
                    317: @code{bsave()} $B$J$I$N%3%^%s%I$K$h$jESCf7k2L$r%U%!%$%k$KJ]B8$9$k$3$H$b(B
                    318: $B$G$-$k(B.
1.2     ! noro      319: \E
        !           320: \BEG
        !           321: This example shows such a usage where measuring CPU time is activated
        !           322: from within the debug-mode, even if one might have forgotten to specify
        !           323: the activation of CPU time measurement.
        !           324:
        !           325: It is also useful to save intermediate results to files from within
        !           326: the debug-mode by the built-in function @code{bsave()} when one is
        !           327: forced to quit the computation by any reason.
        !           328: \E
1.1       noro      329:
                    330: @example
                    331: (debug) print bsave(A,"savefile")
                    332: bsave(A,"savefile") = 1
                    333: @end example
                    334:
1.2     ! noro      335: \BJP
1.1       noro      336: $B%G%P%C%0%b!<%I$+$i$NH!?t8F$S=P$7$GCm0U$9$Y$-$3$H$O(B,
                    337: @code{print} $B$N0z?t$,%f!<%6Dj5AH!?t$N8F$S=P$7$r4^$`>l9g(B,
                    338: $B$=$NH!?t8F$S=P$7$G%(%i!<$,5/$3$C$?>l9g$K85$NH!?t$N<B9T7QB3$,IT2DG=(B
                    339: $B$K$J$k>l9g$,$"$k$H$$$&$3$H$G$"$k(B.
1.2     ! noro      340: \E
        !           341: \BEG
        !           342: Note that continuation of the parent function will be impossible if
        !           343: an error will occur in the function call from within the debug-mode.
        !           344: \E
1.1       noro      345: @end itemize
                    346:
1.2     ! noro      347: \BJP
1.1       noro      348: @node $B%G%P%C%,$N;HMQNc(B,,, $B%G%P%C%,(B
                    349: @section $B%G%P%C%,$N;HMQNc(B
1.2     ! noro      350: \E
        !           351: \BEG
        !           352: @node Execution example of debugger,,, Debugger
        !           353: @section Execution example of debugger
        !           354: \E
1.1       noro      355:
                    356: @noindent
1.2     ! noro      357: \BJP
1.1       noro      358: $B$3$3$G$O(B, $B3,>h$r:F5"E*$K7W;;$5$;$k%f!<%6Dj5AH!?t$rNc$H$7$F(B, $B%G%P%C%,$N(B
                    359: $B<B:]$N;HMQK!$r<($9(B.
1.2     ! noro      360: \E
        !           361: \BEG
        !           362: Here, the usage of the Debugger is explained by showing an example
        !           363: for debugging a program which computes the integer factorial by a
        !           364: recursive definition.
        !           365: \E
1.1       noro      366:
                    367: @example
                    368: % asir
                    369: [0] load("fac")$
                    370: [3] debug$
                    371: (debug) list factorial
                    372: 1   def factorial(X) @{
                    373: 2       if ( !X )
                    374: 3           return 1;
                    375: 4       else
                    376: 5           return X * factorial(X - 1);
                    377: 6   @}
                    378: 7   end$
1.2     ! noro      379: \BJP
1.1       noro      380: (debug) stop at 5                     <-- $B%V%l!<%/%]%$%s%H$N@_Dj(B
                    381: (0) stop at "./fac":5
                    382: (debug) quit                          <-- $B%G%P%C%0%b!<%I$rH4$1$k(B
                    383: [4] factorial(6);                     <-- factorial(6) $B$N8F$S=P$7(B
                    384: stopped in factorial at line 5 in file "./fac"
                    385: 5           return X * factorial(X - 1);
                    386: (debug) where                         <-- $B%V%l!<%/%]%$%s%H$^$G$N8F$S=P$7Ns$NI=<((B
                    387: factorial(), line 5 in "./fac"
                    388: (debug) print X                       <-- X $B$NCM$NI=<((B
                    389: X = 6
                    390: (debug) step                          <-- $B%9%F%C%W<B9T(B ($BH!?t$KF~$k(B)
                    391: stopped in factorial at line 2 in file "./fac"
                    392: 2              if ( !X )
                    393: (debug) where
                    394: factorial(), line 2 in "./fac"
                    395: factorial(), line 5 in "./fac"
                    396: (debug) print X
                    397: X = 5
                    398: (debug) delete 0                      <-- $B%V%l!<%/%]%$%s%H(B 0 $B$N>C5n(B
                    399: (debug) cont                          <-- $B<B9T7QB3(B
                    400: 720                                   <-- $B7k2L(B = 6!
                    401: [5] quit;
1.2     ! noro      402: \E
        !           403: \BEG
        !           404: (debug) stop at 5                     <-- setting a break point
        !           405: (0) stop at "./fac":5
        !           406: (debug) quit                          <-- leaving the debug-mode
        !           407: [4] factorial(6);                     <-- call for factorial(6)
        !           408: stopped in factorial at line 5 in file "./fac"
        !           409: 5           return X * factorial(X - 1);
        !           410: (debug) where                         <-- display the calling sequence up to
        !           411: factorial(), line 5 in "./fac"            this break point
        !           412: (debug) print X                       <-- Display the value of X
        !           413: X = 6
        !           414: (debug) step                          <-- step execution (enters function)
        !           415: stopped in factorial at line 2 in file "./fac"
        !           416: 2       if ( !X )
        !           417: (debug) where
        !           418: factorial(), line 2 in "./fac"
        !           419: factorial(), line 5 in "./fac"
        !           420: (debug) print X
        !           421: X = 5
        !           422: (debug) delete 0                      <-- delete the break point 0
        !           423: (debug) cont                          <-- continue execution
        !           424: 720                                   <-- result = 6!
        !           425: [5] quit;
        !           426: \E
1.1       noro      427: @end example
                    428:
1.2     ! noro      429: \BJP
1.1       noro      430: @node $B%G%P%C%,$N=i4|2=%U%!%$%k$NNc(B,,, $B%G%P%C%,(B
                    431: @section $B%G%P%C%,$N=i4|2=%U%!%$%k$NNc(B
1.2     ! noro      432: \E
        !           433: \BEG
        !           434: @node Sample file of initialization file for Debugger,,, Debugger
        !           435: @section Sample file of initialization file for Debugger
        !           436: \E
1.1       noro      437:
                    438: @noindent
1.2     ! noro      439: \BJP
1.1       noro      440: $BA0$K=R$Y$?DL$j(B, @b{Asir} $B$O(B, $B5/F0;~$K(B @samp{$HOME/.dbxinit} $B$rFI$_9~$`(B.
                    441: $B$3$N%U%!%$%k$O(B, @code{dbx} $B$N$5$^$6$^$J=i4|@_DjMQ$N%3%^%s%I$r5-=R$7$F$*$/(B
                    442: $B%U%!%$%k$G$"$k$,(B, @b{Asir} $B$O(B, @code{alias} $B9T$N$_$rG'<1$9$k(B. $BNc$($P(B,
1.2     ! noro      443: \E
        !           444: \BEG
        !           445: As is previously mentioned, @b{Asir} reads in the file
        !           446: @samp{$HOME/.dbxinit} at its invocation.
        !           447: This file is originally used to define various initializing commands
        !           448: for @code{dbx} debugger, but @b{Asir} recognizes only @code{alias}
        !           449: lines. For example, by the setting
        !           450: \E
1.1       noro      451:
                    452: @example
                    453: % cat ~/.dbxinit
                    454: alias n next
                    455: alias c cont
                    456: alias p print
                    457: alias s step
                    458: alias d delete
                    459: alias r run
                    460: alias l list
                    461: alias q quit
                    462: @end example
                    463:
                    464: @noindent
1.2     ! noro      465: \BJP
1.1       noro      466: $B$J$k@_Dj$K$h$j(B, @code{print}, @code{cont} $B$J$I(B, $B%G%P%C%0%b!<%I$K$*$$$F(B
                    467: $BIQHK$KMQ$$$i$l$k%3%^%s%I$,(B, $B$=$l$>$l(B @code{p}, @code{c} $B$J$I(B, $BC;$$(B
                    468: $BJ8;zNs$GBeMQ$G$-$k(B. $B$^$?(B, $B%G%P%C%0%b!<%I$K$*$$$F(B, @code{alias} $B%3%^%s%I(B
                    469: $B$K$h$j(B alias $B$NDI2C$,$G$-$k(B.
1.2     ! noro      470: \E
        !           471: \BEG
        !           472: one can use short aliases, e.g., @code{p}, @code{c} etc., for frequently
        !           473: used commands such as @code{print}, @code{cont} etc. One can create
        !           474: new aliases in the debug-mode during an execution.
        !           475: \E
1.1       noro      476:
                    477: @example
                    478: lex_hensel(La,[a,b,c],0,[a,b,c],0);
                    479: stopped in gennf at line 226 in file "/home/usr3/noro/asir/gr"
                    480: 226             N = length(V); Len = length(G); dp_ord(O); PS = newvect(Len);
                    481: (debug) p V
                    482: V = [a,b,c]
                    483: (debug) c
                    484: ...
                    485: @end example
                    486:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>