aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo.1
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2013-06-21 15:46:30 -0500
committerPeter Seebach <peter.seebach@windriver.com>2013-06-25 20:32:25 -0500
commite199ed80a0a67a2135d419e169ba378621dd55bd (patch)
treec284919558317f6a122df93438e2c93ce96acd68 /pseudo.1
parent62177dc38fabb880132e63aeef3b8d3878f9584c (diff)
downloadpseudo-e199ed80a0a67a2135d419e169ba378621dd55bd.tar.gz
pseudo-e199ed80a0a67a2135d419e169ba378621dd55bd.tar.bz2
pseudo-e199ed80a0a67a2135d419e169ba378621dd55bd.zip
Change debugging to use flags rather than levels
This is a moderately intrusive change. The basic overall effect: Debugging messages are now controlled, not by a numeric "level", but by a series of flags, which are expressed as a string of letters. Each flag has a single-letter form used for string specifications, a name, a description, a numeric value (1 through N), and a flag value (which is 1 << the numeric value). (This does mean that no flag has the value 1, so we only have 31 bits available. Tiny violins play.) The other significant change is that the pseudo_debug calls are now implemented with a do/while macro containing a conditional, so that computationally-expensive arguments are never evaluated if the corresponding debug flags weren't set. The assumption is that in the vast majority of cases (specifically, all of them so far) the debug flags for a given call are a compile-time constant, so the nested conditional will never actually show up in code when compiled with optimization; we'll just see the appropriate conditional test. The VERBOSE flag is magical, in that if the VERBOSE flag is used in a message, the debug flags have to have both VERBOSE and at least one other flag for the call to be made. This should dramatically improve performance for a lot of cases without as much need for PSEUDO_NDEBUG, and improve the ability of users to get coherent debugging output that means something and is relevant to a given case. It's also intended to set the stage for future development work involving improving the clarity and legibility of pseudo's diagnostic messages in general. Old things which used numeric values for PSEUDO_DEBUG will sort of continue to work, though they will almost always be less verbose than they used to. There should probably be a pass through adding "| PDBGF_CONSISTENCY" to a lot of the messages that are specific to some other type.
Diffstat (limited to 'pseudo.1')
-rw-r--r--pseudo.179
1 files changed, 68 insertions, 11 deletions
diff --git a/pseudo.1 b/pseudo.1
index f7f5bca..a929a54 100644
--- a/pseudo.1
+++ b/pseudo.1
@@ -19,29 +19,74 @@
.SH SYNOPSIS
.B pseudo
.RB [ \-dflv ]
-.RB [ \-P\ prefix ]
-.RB [ \-rR\ root ]
-.RB [ \-t\ timeout ]
-.RB [ command ]
+[
+.B \-x
+.I flags
+]
+[
+.B \-P
+.I prefix
+]
+[
+.B \-rR
+.I root
+]
+[
+.B \-t
+.I timeout
+]
+.RI [ command ]
.PP
.B pseudo \-h
.PP
.B pseudo
-.RB [ \-P\ prefix ]
+.RB [ \-dflv ]
+[
+.B \-x
+.I flags
+]
+[
+.B \-P
+.I prefix
+]
.RB [ \-BC ]
.BR \-i\ path
.PP
.B pseudo
-.RB [ \-P\ prefix ]
+.RB [ \-dflv ]
+[
+.B \-x
+.I flags
+]
+[
+.B \-P
+.I prefix
+]
.RB [ \-BC ]
.BR \-m\ from\ \-M\ to
.PP
.B pseudo
-.RB [ \-P\ prefix ]
+.RB [ \-dflv ]
+[
+.B \-x
+.I flags
+]
+[
+.B \-P
+.I prefix
+]
.B \-S
.PP
.B pseudo
-.RB [ \-P\ prefix ]
+.RB [ \-dflv ]
+[
+.B \-x
+.I flags
+]
+[
+.B \-P
+.I prefix
+]
.B \-V
.SH DESCRIPTION
The
@@ -240,12 +285,21 @@ Increase the verbosity of the
daemon, and the client library for any programs started by this
invocation of
.IR pseudo .
-This is equivalent to the
+This is equivalent to the numeric form of the
.B PSEUDO_DEBUG
environment variable; multiple
.B \-v
options increase the debugging level.
+.TP 8
+.BI \-x\ (debug)
+Set specific deugging flags (the
+.I pseudo
+utility's help message lists them). This is equivalent to the string
+form of the
+.B PSEUDO_DEBUG
+environment variable.
+
.SH EXAMPLES
The two most common usages of
.I pseudo
@@ -378,9 +432,12 @@ path. Paths that are relative to this are treated as though they were
instead relative to the filesystem root.
.TP 8
.B PSEUDO_DEBUG
-This variable holds the "debug level" for
+This variable holds either a numeric "debug level" for
.I pseudo
-to run at. In general, this is useful only for debugging
+to run at, or a set of specific debugging flags, generally letters.
+Use
+.B pseudo -h
+to see the available flags. In general, this is useful only for debugging
.I pseudo
itself.
.TP 8