ref: 3d331f34dd9acf77e0c124e9509b4f1d744aa595
parent: a837405f1b0bb374a490bbd9fb458aa050a7074a
author: spew <spew@cbza.org>
date: Tue Mar 25 09:40:28 EDT 2025
lsd: use new literal comillas latinas
--- a/src/plan9/lsd.sl
+++ b/src/plan9/lsd.sl
@@ -147,7 +147,7 @@
(del! bptbl addr)))))
(doc-for (bpset loc)
- "Set a breakpoint.
+ «Set a breakpoint.
The location can be one of the following:
@@ -155,7 +155,7 @@
the global text symbols of the process,
2. A num which is the address at which to place the break.
3. An LSD symbol in which the case the symbol's address is used.
- 4. A string of the form \"file:line\" which specifies a line in a
+ 4. A string of the form "file:line" which specifies a line in a
file of source code.
Examples:
@@ -162,11 +162,11 @@
(bpset 'strcpy) ; breakpoint on strcpy function.
(bpset (curPC)) ; breakpoint on current instruction.
- (bpset \"/sys/src/cmd/cat.c:26\") ; breakpoint on line 26."
+ (bpset "/sys/src/cmd/cat.c:26") ; breakpoint on line 26.»
:doc-group lsd)
(doc-for (bpdel loc)
- "Delete a breakpoint.
+ «Delete a breakpoint.
The location can be one of the following:
@@ -174,7 +174,7 @@
the global text symbols of the process,
2. A num which is the address at which to place the break.
3. An LSD symbol in which the case the symbol's address is used.
- 4. A string of the form \"file:line\" which specifies a line in a
+ 4. A string of the form "file:line" which specifies a line in a
file of source code.
Examples:
@@ -181,7 +181,7 @@
(bpdel 'strcpy) ; remove breakpoint on strcpy function.
(bpdel (curPC)) ; remove breakpoint on current instruction.
- (bpdel \"/sys/src/cmd/cat.c:26\") ; remove breakpoint on line 26."
+ (bpdel "/sys/src/cmd/cat.c:26") ; remove breakpoint on line 26.»
:doc-group lsd)
(def (detach)
@@ -387,30 +387,30 @@
(Bsrc))
(def (filepc f (line NIL))
- "Return the instruction address corresponding to a filename and line
+ «Return the instruction address corresponding to a filename and line
number. It is the inverse of `(src addr)`.
Examples:
- (filepc \"/sys/src/cmd/cat.c:5\") → 2097192
- (filepc \"/sys/src/cmd/cat.c\" 5) → 2097192
- (src 2097192) → \"/sys/src/cmd/cat.c:5\""
+ (filepc "/sys/src/cmd/cat.c:5") → 2097192
+ (filepc "/sys/src/cmd/cat.c" 5) → 2097192
+ (src 2097192) → "/sys/src/cmd/cat.c:5"»
:doc-group lsd
(if line
(lsd-file2pc f line)
(let {[s (str-split f ":")]}
- (unless (= (length s) 2) (error "invalid \"file:line\" format"))
+ (unless (= (length s) 2) (error «invalid "file:line" format»))
(let {[line (str->num (cadr s))]}
(unless line (error "bad line number"))
(lsd-file2pc (car s) line)))))
(def (sym-global s)
- "Return a symbol from the attached proc's symbol table or `NIL`. Input
+ «Return a symbol from the attached proc's symbol table or `NIL`. Input
is a `sym`.
Examples:
- (sym-global 'strecpy) → #(symbol \"strecpy\" #\\T 2276784)"
+ (sym-global 'strecpy) → #(symbol "strecpy" #\T 2276784)»
:doc-group lsd
(def (find tbl k) (and (has? tbl k) (get tbl k)))
(or (find (global-text globals) s)
@@ -417,13 +417,13 @@
(find (global-data globals) s)))
(def (sym-local s)
- "Return a local symbol from the attached proc's current stack frame or
- `NIL`. Input is a `sym`.
+ «Return a local symbol from the attached proc's current stack frame
+ or `NIL`. Input is a `sym`.
Examples:
- (sym-local 'i) → #(symbol \"i\" #\\a 140737488350940)
- (symbol-read (sym-local 'argc) 's32) → #s32(2)"
+ (sym-local 'i) → #(symbol "i" #\a 140737488350940)
+ (symbol-read (sym-local 'argc) 's32) → #s32(2)»
:doc-group lsd
(let {[ss (str s)]}
(find ss
@@ -445,7 +445,7 @@
pids)))
(def (new . args)
- "Start a new process for debugging.
+ «Start a new process for debugging.
Args will be passed unparsed as the argument vector to the executable.
@@ -452,7 +452,7 @@
Examples:
(new) ; new process with no arguments
- (new \"-v\" \"/sys/src/cmd/sl/slmain.c\") ; two arguments."
+ (new "-v" "/sys/src/cmd/sl/slmain.c") ; two arguments.»
:doc-group lsd
(let {[v (apply lsd-new args)]}
(when proc-stdin (io-close proc-stdin))