1 <chapter id='Debugging_Aids'>
2 <title>Debugging Aids</title>
5 The debugging aids are intended for use primarily by Xkb implementors and are
6 optional in any implementation.
11 There are two bitmasks that may be used to control debugging. One bitmask
12 controls the output of debugging information, and the other controls behavior.
13 Both bitmasks are initially all zeros.
18 To change the values of any of the debug controls, use <emphasis>
19 XkbSetDebuggingFlags</emphasis>
23 <informaltable frame='none'>
24 <?dbfo keep-together="always" ?>
25 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
26 <colspec colname='c1' colwidth='1.0*'/>
29 <entry role='functiondecl'>
31 XkbSetDebuggingFlags</emphasis>
33 display, mask, flags, msg, ctrls_mask, ctrls, ret_flags, ret_ctrls</emphasis>
38 <entry role='functionargdecl'>
41 ; /* connection to X server */
45 <entry role='functionargdecl'>
46 unsigned int <emphasis>
48 ; /* mask selecting debug output flags to change */
52 <entry role='functionargdecl'>
53 unsigned int <emphasis>
55 ; /* values for debug output flags selected by <emphasis>
61 <entry role='functionargdecl'>
64 ; /* message to print right now */
68 <entry role='functionargdecl'>
69 unsigned int <emphasis>
71 ; /* mask selecting debug controls to change */
75 <entry role='functionargdecl'>
76 unsigned int <emphasis>
78 ; /* values for debug controls selected by <emphasis>
84 <entry role='functionargdecl'>
85 unsigned int * <emphasis>
87 ; /* resulting state of all debug output flags */
91 <entry role='functionargdecl'>
92 unsigned int * <emphasis>
94 ; /* resulting state of all debug controls */
103 XkbSetDebuggingFlags</emphasis>
104 modifies the debug output flags as specified by <emphasis>
108 , modifies the debug controls flags as specified by <emphasis>
109 ctrls_mask</emphasis>
112 , prints the message <emphasis>
114 , and backfills <emphasis>
118 with the resulting debug output and debug controls flags.
123 When bits are set in the debug output masks, <emphasis>
127 , Xkb prints debug information corresponding to each bit at appropriate points
128 during its processing. The device to which the output is written is
129 implementation-dependent, but is normally the same device to which X server
130 error messages are directed; thus the bits that can be set in <emphasis>
134 is implementation-specific. To turn on a debug output selection, set the bit
135 for the output in the <emphasis>
137 parameter and set the corresponding bit in the <emphasis>
139 parameter. To turn off event selection for an event, set the bit for the
140 output in the <emphasis>
142 parameter and do not set the corresponding bit in the <emphasis>
149 When bits are set in the debug controls masks, <emphasis>
150 ctrls_mask</emphasis>
153 , Xkb modifies its behavior according to each controls bit. <emphasis>
154 ctrls_mask</emphasis>
157 are related in the same way that <emphasis>
161 are. The valid controls bits are defined in Table 22.1.
164 <table frame='topbot'>
165 <title>Debug Control Masks</title>
166 <?dbfo keep-together="always" ?>
167 <tgroup cols='3' align='left' colsep='0' rowsep='0'>
168 <colspec colname='c1' colwidth='1.5*'/>
169 <colspec colname='c2' colwidth='1.0*'/>
170 <colspec colname='c3' colwidth='2.0*'/>
173 <entry>Debug Control Mask</entry>
175 <entry>Meaning</entry>
180 <entry>XkbDF_DisableLocks</entry>
181 <entry>(1 << 0)</entry>
182 <entry>Disable actions that lock modifiers</entry>
190 XkbSetDebuggingFlags</emphasis>
193 if successful and <emphasis>
195 otherwise. The only protocol error it may generate is <emphasis>
197 , if for some reason it is unable to allocate storage.
203 XkbSetDebuggingFlags</emphasis>
204 is intended for developer use and may be disabled in production X servers. If
205 it is disabled, <emphasis>
206 XkbSetDebuggingFlags</emphasis>
207 has no effect and does not generate any protocol errors.
212 The message in <emphasis>
214 is written immediately. The device to which it is written is implementation
215 dependent but is normally the same device where X server error messages are