From 1ead06d37240af16c74bc5a045553262c0f968b3 Mon Sep 17 00:00:00 2001 From: wl Date: Wed, 1 Oct 2008 20:33:14 +0000 Subject: * tmac/trace.tmac: Much improved. (trace-full): New register to be set on the command line; it controls whether number and string register assignments get traced also. (!!c): New macro for comments. (rm): New traced macro. (de, de1, am, am1): Use \\[xxx]\\ calling method to pass \$0 to `!!xxx'; this makes doc.tmac completely traceable. Trace call of .de and friends also. * tmac/groff_tmac.man, NEWS: Update. --- tmac/groff_trace.man | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) (limited to 'tmac/groff_trace.man') diff --git a/tmac/groff_trace.man b/tmac/groff_trace.man index 9404e52d..49632c6d 100644 --- a/tmac/groff_trace.man +++ b/tmac/groff_trace.man @@ -3,11 +3,11 @@ groff_trace.7 File position: /tmac/groff_trace.man -Last update: 20 Feb 2007 +Last update: 01 Oct 2008 This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2002, 2006, 2007 Free Software Foundation, Inc. +Copyright (C) 2002, 2006, 2007, 2008 Free Software Foundation, Inc. written by Bernd Warken. Permission is granted to copy, distribute and/or modify this document @@ -28,9 +28,8 @@ FDL in the main directory of the groff source package. groff_trace \- groff macro package trace.tmac . .\" -------------------------------------------------------------------- -.\" SH SYNOPSIS -.\" -------------------------------------------------------------------- .SH SYNOPSIS +.\" -------------------------------------------------------------------- . .SY "groff \-m trace" .RI [ options @@ -50,7 +49,7 @@ macro package of can be a valuable tool for debugging documents written in the roff formatting language. . -A call stack trace is protocolled on standard error, that means, a +A call stack trace is protocolled on standard error, this is, a diagnostic message is emitted on entering and exiting of a macro call. . This greatly eases to track down an error in some macro. @@ -71,6 +70,13 @@ Only macros that are defined after this line are traced. . . .P +If command line option +.B \-r\ trace-full=1 +is given (or if this register is set in the document), number and string +register assignments together with some other requests are traced also. +. +. +.P If some other macro package should be traced as well it must be specified after .B \-m\ trace @@ -96,7 +102,7 @@ standard input. . As we are only interested in the diagnostic messages (standard error) on the terminal, the normal formatted output (standard output) is -redirected into the nirvana device +redirected to the nirvana device .IR /dev/null . The resulting diagnostic messages are displayed directly below the corresponding example. @@ -116,10 +122,11 @@ Example: > .test_macro some dummy arguments > ' | groff -m trace >/dev/null -*** de trace enter: test_macro -*** trace exit: test_macro -*** de trace enter: test_macro "some" "dummy" "arguments" -*** trace exit: test_macro "some" "dummy" "arguments" +*** .de test_macro +*** de trace enter: .test_macro +*** trace exit: .test_macro +*** de trace enter: .test_macro "some" "dummy" "arguments" +*** trace exit: .test_macro "some" "dummy" "arguments" .EE .RE . @@ -144,10 +151,12 @@ Example: > .parent > ' | groff -m trace >/dev/null -*** de trace enter: parent -*** de trace enter: child -*** trace exit: child -*** trace exit: parent +*** .de child +*** .de parent +*** de trace enter: .parent + *** de trace enter: .child + *** trace exit: .child +*** trace exit: .parent .EE .RE . @@ -175,8 +184,8 @@ Example: > .before > ' | groff >/dev/null -*** de trace enter: after -*** trace exit: after +*** de trace enter: .after +*** trace exit: .after .EE .RE . @@ -259,7 +268,7 @@ for details. .SH AUTHOR .\" -------------------------------------------------------------------- . -Copyright (C) 2002, 2006, 2007 Free Software Foundation, Inc. +Copyright (C) 2002, 2006, 2007, 2008 Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free -- cgit v1.2.1