From Jason Turner

[debugging.utility]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpf9tnus9z/{from.md → to.md} +134 -0
tmp/tmpf9tnus9z/{from.md → to.md} RENAMED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Utility <a id="debugging.utility">[[debugging.utility]]</a>
2
+
3
+ ``` cpp
4
+ void breakpoint() noexcept;
5
+ ```
6
+
7
+ The semantics of this function are *implementation-defined*.
8
+
9
+ [*Note 1*: It is intended that, when invoked with a debugger present,
10
+ the execution of the program temporarily halts and execution is handed
11
+ to the debugger until the program is either terminated by the debugger
12
+ or the debugger resumes execution of the program as if the function was
13
+ not invoked. In particular, there is no intent for a call to this
14
+ function to accomodate resumption of the program in a different manner.
15
+ If there is no debugger present, execution of the program can end
16
+ abnormally. — *end note*]
17
+
18
+ ``` cpp
19
+ void breakpoint_if_debugging() noexcept;
20
+ ```
21
+
22
+ *Effects:* Equivalent to:
23
+
24
+ ``` cpp
25
+ if (is_debugger_present()) breakpoint();
26
+ ```
27
+
28
+ ``` cpp
29
+ bool is_debugger_present() noexcept;
30
+ ```
31
+
32
+ *Required behavior:* This function has no preconditions.
33
+
34
+ *Default behavior:* *implementation-defined*.
35
+
36
+ [*Note 2*: It is intended that, using an immediate (uncached) query to
37
+ determine if the program is being traced by a debugger, an
38
+ implementation returns `true` only when tracing the execution of the
39
+ program with a debugger. On Windows or equivalent systems, this can be
40
+ achieved by calling the `::IsDebuggerPresent()` Win32 function. For
41
+ systems compatible with ISO/IEC 23360:2021, this can be achieved by
42
+ checking for a tracing process, with a best-effort determination that
43
+ such a tracing process is a debugger. — *end note*]
44
+
45
+ *Remarks:* This function is replaceable [[term.replaceable.function]].
46
+
47
+ <!-- Link reference definitions -->
48
+ [assertions]: #assertions
49
+ [assertions.assert]: #assertions.assert
50
+ [assertions.general]: #assertions.general
51
+ [bad.alloc]: support.md#bad.alloc
52
+ [cassert.syn]: #cassert.syn
53
+ [cerrno.syn]: #cerrno.syn
54
+ [cmp.concept]: support.md#cmp.concept
55
+ [comparisons.three.way]: utilities.md#comparisons.three.way
56
+ [concepts.object]: concepts.md#concepts.object
57
+ [container.alloc.reqmts]: containers.md#container.alloc.reqmts
58
+ [container.rev.reqmts]: containers.md#container.rev.reqmts
59
+ [conv]: expr.md#conv
60
+ [cpp.predefined]: cpp.md#cpp.predefined
61
+ [debugging]: #debugging
62
+ [debugging.general]: #debugging.general
63
+ [debugging.syn]: #debugging.syn
64
+ [debugging.utility]: #debugging.utility
65
+ [defns.const.subexpr]: intro.md#defns.const.subexpr
66
+ [diagnostics]: #diagnostics
67
+ [diagnostics.general]: #diagnostics.general
68
+ [diagnostics.summary]: #diagnostics.summary
69
+ [domain.error]: #domain.error
70
+ [errno]: #errno
71
+ [errno.general]: #errno.general
72
+ [format.string.std]: text.md#format.string.std
73
+ [intro.execution]: basic.md#intro.execution
74
+ [invalid.argument]: #invalid.argument
75
+ [iterator.concept.random.access]: iterators.md#iterator.concept.random.access
76
+ [length.error]: #length.error
77
+ [logic.error]: #logic.error
78
+ [out.of.range]: #out.of.range
79
+ [overflow.error]: #overflow.error
80
+ [random.access.iterators]: iterators.md#random.access.iterators
81
+ [range.error]: #range.error
82
+ [res.on.exception.handling]: library.md#res.on.exception.handling
83
+ [runtime.error]: #runtime.error
84
+ [sequence.reqmts]: containers.md#sequence.reqmts
85
+ [stacktrace]: #stacktrace
86
+ [stacktrace.basic]: #stacktrace.basic
87
+ [stacktrace.basic.cmp]: #stacktrace.basic.cmp
88
+ [stacktrace.basic.cons]: #stacktrace.basic.cons
89
+ [stacktrace.basic.hash]: #stacktrace.basic.hash
90
+ [stacktrace.basic.mod]: #stacktrace.basic.mod
91
+ [stacktrace.basic.nonmem]: #stacktrace.basic.nonmem
92
+ [stacktrace.basic.obs]: #stacktrace.basic.obs
93
+ [stacktrace.basic.overview]: #stacktrace.basic.overview
94
+ [stacktrace.entry]: #stacktrace.entry
95
+ [stacktrace.entry.cmp]: #stacktrace.entry.cmp
96
+ [stacktrace.entry.cons]: #stacktrace.entry.cons
97
+ [stacktrace.entry.obs]: #stacktrace.entry.obs
98
+ [stacktrace.entry.overview]: #stacktrace.entry.overview
99
+ [stacktrace.entry.query]: #stacktrace.entry.query
100
+ [stacktrace.format]: #stacktrace.format
101
+ [stacktrace.general]: #stacktrace.general
102
+ [stacktrace.syn]: #stacktrace.syn
103
+ [std.exceptions]: #std.exceptions
104
+ [std.exceptions.general]: #std.exceptions.general
105
+ [stdexcept.syn]: #stdexcept.syn
106
+ [syserr]: #syserr
107
+ [syserr.compare]: #syserr.compare
108
+ [syserr.errcat]: #syserr.errcat
109
+ [syserr.errcat.derived]: #syserr.errcat.derived
110
+ [syserr.errcat.nonvirtuals]: #syserr.errcat.nonvirtuals
111
+ [syserr.errcat.objects]: #syserr.errcat.objects
112
+ [syserr.errcat.overview]: #syserr.errcat.overview
113
+ [syserr.errcat.virtuals]: #syserr.errcat.virtuals
114
+ [syserr.errcode]: #syserr.errcode
115
+ [syserr.errcode.constructors]: #syserr.errcode.constructors
116
+ [syserr.errcode.modifiers]: #syserr.errcode.modifiers
117
+ [syserr.errcode.nonmembers]: #syserr.errcode.nonmembers
118
+ [syserr.errcode.observers]: #syserr.errcode.observers
119
+ [syserr.errcode.overview]: #syserr.errcode.overview
120
+ [syserr.errcondition]: #syserr.errcondition
121
+ [syserr.errcondition.constructors]: #syserr.errcondition.constructors
122
+ [syserr.errcondition.modifiers]: #syserr.errcondition.modifiers
123
+ [syserr.errcondition.nonmembers]: #syserr.errcondition.nonmembers
124
+ [syserr.errcondition.observers]: #syserr.errcondition.observers
125
+ [syserr.errcondition.overview]: #syserr.errcondition.overview
126
+ [syserr.general]: #syserr.general
127
+ [syserr.hash]: #syserr.hash
128
+ [syserr.syserr]: #syserr.syserr
129
+ [syserr.syserr.members]: #syserr.syserr.members
130
+ [syserr.syserr.overview]: #syserr.syserr.overview
131
+ [system.error.syn]: #system.error.syn
132
+ [term.replaceable.function]: dcl.md#term.replaceable.function
133
+ [underflow.error]: #underflow.error
134
+ [unord.hash]: utilities.md#unord.hash