<!DOCTYPE html>
<!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;opacity:0;overflow:hidden;">
The skeleton's BEGIN and ERROR clauses use "\\n" where "\n" is meant. In a D string literal that is an escaped backslash followed by 'n', so printf() emits a stray backslash instead of a newline. Agents copy the skeleton verbatim, and "\\n"</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;opacity:0;overflow:hidden;"></div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<html>
<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBanner8nvomvc { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #c2d4d4 !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButton8nvomvc:hover, .pfptPrimaryButton8nvomvc:focus {
background-color: #a2b1b1 !important; }
.pfptPrimaryButton8nvomvc:active {
background-color: #828e8e !important; }
html:root, html:root>body { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><body><pre style="font-family: sans-serif; font-size: 100%; white-space: pre-wrap; word-wrap: break-word">The skeleton's BEGIN and ERROR clauses use "\\n" where "\n" is meant.
In a D string literal that is an escaped backslash followed by 'n', so
printf() emits a stray backslash instead of a newline.
Agents copy the skeleton verbatim, and "\\n" is a valid literal, so the
'dtrace -e' check prescribed in the same file does not catch it.
Every other D snippet in the tree uses a single backslash.
Assisted-by: Kiro:claude-opus-4.8
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
---
Not tested under DTrace; this is purely a string-literal escape.
Applies to devel (30c9c22).
One thing I left alone: the skeleton's ERROR clause prints probeprov/
probemod/probefunc/probename, but those describe the probe that is
currently firing, which inside an ERROR clause is dtrace:::ERROR itself
rather than the probe that faulted.
doc/userguide/reference/dtrace_providers_dtrace.md gives the culprit as
arg1 (its EPID) and the fault type as arg4, and
examples/language_features/001intro-ERROR-probe.d sidesteps this by
printing a static message. Should the skeleton use arg1/arg4?
Also minor: the "Target one process" pattern needs -p PID or -c CMD,
which the suggested "sudo dtrace -s script.d" does not provide.
llm/SKILL.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llm/SKILL.md b/llm/SKILL.md
index e5e2f3e..a6ff502 100644
--- a/llm/SKILL.md
+++ b/llm/SKILL.md
@@ -66,7 +66,7 @@ probe-descriptions
dtrace:::BEGIN
{
- printf("Tracing started...\\n");
+ printf("Tracing started...\n");
}
/* tracing clauses */
@@ -78,7 +78,7 @@ dtrace:::END
dtrace:::ERROR
{
- printf("DTrace error at %s:%s:%s:%s\\n", probeprov, probemod, probefunc, probename);
+ printf("DTrace error at %s:%s:%s:%s\n", probeprov, probemod, probefunc, probename);
}
```
--
2.43.0
</pre></body></html>