|
23 | 23 | \ref{execpol} & Execution policies & \tcode{<execution>} \\ \rowsep
|
24 | 24 | \ref{charconv} & Primitive numeric conversions & \tcode{<charconv>} \\ \rowsep
|
25 | 25 | \ref{format} & Formatting & \tcode{<format>} \\ \rowsep
|
26 |
| -\ref{bit} & Bit manipulation & \tcode{<bit>} \\ |
| 26 | +\ref{bit} & Bit manipulation & \tcode{<bit>} \\ \rowsep |
| 27 | +\ref{debugging} & Debugging & \tcode{<debugging>} \\ |
27 | 28 | \end{libsumtab}
|
28 | 29 |
|
29 | 30 | \rSec1[utility]{Utility components}
|
|
19170 | 19171 | Otherwise, \tcode{endian::native} is not equal
|
19171 | 19172 | to either \tcode{endian::big} or \tcode{endian::little}.
|
19172 | 19173 | \end{itemdescr}
|
| 19174 | + |
| 19175 | +\rSec1[debugging]{Debugging} |
| 19176 | + |
| 19177 | +\rSec2[debugging.general]{General} |
| 19178 | + |
| 19179 | +\pnum |
| 19180 | +Subclause \ref{debugging} describes functionality to introspect and |
| 19181 | +interact with the execution of the program. |
| 19182 | + |
| 19183 | +\begin{note} |
| 19184 | +The facilities provided by the debugging functionality interact with a program |
| 19185 | +that could be tracing the execution of a \Cpp{} program, such as a debugger. |
| 19186 | +\end{note} |
| 19187 | + |
| 19188 | +\rSec2[debugging.syn]{Header \tcode{<debugging>} synopsis} |
| 19189 | + |
| 19190 | +\indexheader{debugging}% |
| 19191 | +\begin{codeblock} |
| 19192 | +// all freestanding |
| 19193 | +namespace std { |
| 19194 | + // \ref{debugging.utility}, utility |
| 19195 | + void breakpoint() noexcept; |
| 19196 | + void breakpoint_if_debugging() noexcept; |
| 19197 | + bool is_debugger_present() noexcept; |
| 19198 | +} |
| 19199 | +\end{codeblock} |
| 19200 | + |
| 19201 | +\rSec2[debugging.utility]{Utility} |
| 19202 | + |
| 19203 | +\indexlibraryglobal{breakpoint}% |
| 19204 | +\begin{itemdecl} |
| 19205 | +void breakpoint() noexcept; |
| 19206 | +\end{itemdecl} |
| 19207 | + |
| 19208 | +\begin{itemdescr} |
| 19209 | + |
| 19210 | +\pnum |
| 19211 | +The semantics of this function are \impldef{semantics of \tcode{breakpoint}}. |
| 19212 | + |
| 19213 | +\begin{note} |
| 19214 | +When invoked, the execution of the program temporarily halts and execution is |
| 19215 | +handed to the debugger until such a time as: The program is terminated by the |
| 19216 | +debugger, or the debugger resumes execution of the program as if the function |
| 19217 | +was not invoked. |
| 19218 | +\end{note} |
| 19219 | + |
| 19220 | +\end{itemdescr} |
| 19221 | + |
| 19222 | +\indexlibraryglobal{breakpoint_if_debugging}% |
| 19223 | +\begin{itemdecl} |
| 19224 | +void breakpoint_if_debugging() noexcept; |
| 19225 | +\end{itemdecl} |
| 19226 | + |
| 19227 | +\begin{itemdescr} |
| 19228 | + |
| 19229 | +\pnum |
| 19230 | +\effects |
| 19231 | +Equivalent to: |
| 19232 | +\begin{codeblock} |
| 19233 | +if (is_debugger_present()) breakpoint(); |
| 19234 | +\end{codeblock} |
| 19235 | + |
| 19236 | +\end{itemdescr} |
| 19237 | + |
| 19238 | +\indexlibraryglobal{is_debugger_present}% |
| 19239 | +\begin{itemdecl} |
| 19240 | +bool is_debugger_present() noexcept; |
| 19241 | +\end{itemdecl} |
| 19242 | + |
| 19243 | +\begin{itemdescr} |
| 19244 | + |
| 19245 | +\pnum |
| 19246 | +The semantics of this function are \impldef{semantics of \tcode{is_debugger_present}}. |
| 19247 | + |
| 19248 | +\begin{note} |
| 19249 | +When tracing the execution of a program with a debugger, an implementation |
| 19250 | +returns \tcode{true}. An implementation performs an immediate query, as needed, |
| 19251 | +to determine if the program is traced by a debugger. On Windows or equivalent |
| 19252 | +systems, this can be achieved by calling the \tcode{::IsDebuggerPresent()} Win32 |
| 19253 | +function. On POSIX, this can be achieved by checking for a tracer parent process, |
| 19254 | +with best effort determination that such a tracer parent process is a debugger. |
| 19255 | +\end{note} |
| 19256 | + |
| 19257 | +\end{itemdescr} |
0 commit comments