Skip to content

Commit

Permalink
is_debugger_present: Clarify intent to avoid false positives
Browse files Browse the repository at this point in the history
The wording implies a preference to return `true` in case it is unknown
whether a debugger is present. Add a critical "only" to fix that.
  • Loading branch information
Hubert Tong committed Feb 14, 2025
1 parent a5c7585 commit 67706d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/diagnostics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2493,13 +2493,13 @@
\impldef{default semantics of \tcode{is_debugger_present}}.

\begin{note}
It is intended that, when tracing the execution of a program with a debugger, an
implementation returns \tcode{true} with the use of an immediate query, as
needed, to determine if the program is being traced by a debugger. On Windows or
It is intended that, using an immediate (uncached) query to determine if the
program is being traced by a debugger, an implementation returns \tcode{true}
only when tracing the execution of the program with a debugger. On Windows or
equivalent systems, this can be achieved by calling the
\tcode{::IsDebuggerPresent()} Win32 function. For systems compatible with
ISO/IEC 23360:2021, this can be achieved by checking for a tracing process, with
best effort determination that such a tracing process is a debugger.
a best-effort determination that such a tracing process is a debugger.
\end{note}

\end{itemdescr}

0 comments on commit 67706d2

Please sign in to comment.