Init
This commit is contained in:
21
cppdraft/debugging/general.md
Normal file
21
cppdraft/debugging/general.md
Normal file
@@ -0,0 +1,21 @@
|
||||
[debugging.general]
|
||||
|
||||
# 19 Diagnostics library [[diagnostics]](./#diagnostics)
|
||||
|
||||
## 19.7 Debugging [[debugging]](debugging#general)
|
||||
|
||||
### 19.7.1 General [debugging.general]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2413)
|
||||
|
||||
Subclause [[debugging]](debugging "19.7 Debugging") describes functionality to introspect and
|
||||
interact with the execution of the program[.](#1.sentence-1)
|
||||
|
||||
[*Note [1](#note-1)*:
|
||||
|
||||
The facilities provided by the debugging functionality interact with a program
|
||||
that could be tracing the execution of a C++ program, such as a debugger[.](#1.sentence-2)
|
||||
|
||||
â *end note*]
|
||||
11
cppdraft/debugging/syn.md
Normal file
11
cppdraft/debugging/syn.md
Normal file
@@ -0,0 +1,11 @@
|
||||
[debugging.syn]
|
||||
|
||||
# 19 Diagnostics library [[diagnostics]](./#diagnostics)
|
||||
|
||||
## 19.7 Debugging [[debugging]](debugging#syn)
|
||||
|
||||
### 19.7.2 Header <debugging> synopsis [debugging.syn]
|
||||
|
||||
[ð](#header:%3cdebugging%3e)
|
||||
|
||||
// all freestandingnamespace std {// [[debugging.utility]](debugging.utility "19.7.3 Utility"), utilityvoid breakpoint() noexcept; void breakpoint_if_debugging() noexcept; bool is_debugger_present() noexcept;}
|
||||
82
cppdraft/debugging/utility.md
Normal file
82
cppdraft/debugging/utility.md
Normal file
@@ -0,0 +1,82 @@
|
||||
[debugging.utility]
|
||||
|
||||
# 19 Diagnostics library [[diagnostics]](./#diagnostics)
|
||||
|
||||
## 19.7 Debugging [[debugging]](debugging#utility)
|
||||
|
||||
### 19.7.3 Utility [debugging.utility]
|
||||
|
||||
[ð](#lib:breakpoint)
|
||||
|
||||
`void breakpoint() noexcept;
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2444)
|
||||
|
||||
The semantics of this function are implementation-defined[.](#1.sentence-1)
|
||||
|
||||
[*Note [1](#note-1)*:
|
||||
|
||||
It is intended that, when invoked with a debugger present, the execution of the
|
||||
program temporarily halts and execution is handed to the debugger until the
|
||||
program is either terminated by the debugger or the debugger resumes execution
|
||||
of the program as if the function was not invoked[.](#1.sentence-2)
|
||||
|
||||
In particular, there is no
|
||||
intent for a call to this function to accomodate resumption of the program in a
|
||||
different manner[.](#1.sentence-3)
|
||||
|
||||
If there is no debugger present, execution of the program can
|
||||
end abnormally[.](#1.sentence-4)
|
||||
|
||||
â *end note*]
|
||||
|
||||
[ð](#lib:breakpoint_if_debugging)
|
||||
|
||||
`void breakpoint_if_debugging() noexcept;
|
||||
`
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2466)
|
||||
|
||||
*Effects*: Equivalent to:if (is_debugger_present()) breakpoint();
|
||||
|
||||
[ð](#lib:is_debugger_present)
|
||||
|
||||
`bool is_debugger_present() noexcept;
|
||||
`
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2481)
|
||||
|
||||
*Required behavior*: This function has no preconditions[.](#3.sentence-1)
|
||||
|
||||
[4](#4)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2485)
|
||||
|
||||
*Default behavior*: implementation-defined[.](#4.sentence-1)
|
||||
|
||||
[*Note [2](#note-2)*:
|
||||
|
||||
It is intended that, using an immediate (uncached) query to determine if the
|
||||
program is being traced by a debugger, an implementation returns true only when tracing the execution of the program with a debugger[.](#4.sentence-2)
|
||||
|
||||
On Windows or
|
||||
equivalent systems, this can be achieved by calling the::IsDebuggerPresent() Win32 function[.](#4.sentence-3)
|
||||
|
||||
For systems compatible with
|
||||
ISO/IEC 23360:2021, this can be achieved by checking for a tracing process, with
|
||||
a best-effort determination that such a tracing process is a debugger[.](#4.sentence-4)
|
||||
|
||||
â *end note*]
|
||||
|
||||
[5](#5)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2499)
|
||||
|
||||
*Remarks*: This function is replaceable ([[dcl.fct.def.replace]](dcl.fct.def.replace#term.replaceable.function "9.6.5 Replaceable function definitions"))[.](#5.sentence-1)
|
||||
Reference in New Issue
Block a user