* bug#56515: [PATCH] Add ,delete-all to delete all traps
@ 2022-07-12 8:47 Ekaitz Zarraga
0 siblings, 0 replies; only message in thread
From: Ekaitz Zarraga @ 2022-07-12 8:47 UTC (permalink / raw)
To: guile-devel, 56515
[-- Attachment #1: Type: text/plain, Size: 265 bytes --]
Hi all,
I attach a patch to add a ,delete-all or ,dela command to the REPL that deletes
all traps.
I considered it could be useful once the debugging is done to be able to
continue with the normal execution of the program.
I hope it's useful.
Ekaitz
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-delete-all-to-delete-all-traps.patch --]
[-- Type: text/x-patch; name=0001-Add-delete-all-to-delete-all-traps.patch, Size: 1336 bytes --]
From 066d20e1f0a2b4bb864d23517c96f8fb94b9bdcb Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Tue, 12 Jul 2022 10:05:46 +0200
Subject: [PATCH] Add ,delete-all to delete all traps
* module/system/repl/command.scm (delete-all): New meta-command.
---
module/system/repl/command.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm
index ac1fa0933..3eb383c63 100644
--- a/module/system/repl/command.scm
+++ b/module/system/repl/command.scm
@@ -65,7 +65,7 @@
(next n) (next-instruction ni)
(finish)
(tracepoint tp)
- (traps) (delete del) (disable) (enable)
+ (traps) (delete del) (delete-all dela) (disable) (enable)
(registers regs))
(inspect (inspect i) (pretty-print pp))
(system (gc) (statistics stat) (option o)
@@ -806,6 +806,13 @@ Delete a trap."
(error "expected a trap index (a non-negative integer)" idx)
(delete-trap! idx)))
+(define-meta-command (delete-all repl)
+ "delete-all
+Delete all traps.
+
+Delete all traps."
+(map delete-trap! (list-traps)))
+
(define-meta-command (disable repl idx)
"disable IDX
Disable a trap.
base-commit: 118ee0c50ba90ea7ad7ff1fd2a212bbbb7a66d99
--
2.36.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-12 8:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12 8:47 bug#56515: [PATCH] Add ,delete-all to delete all traps Ekaitz Zarraga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).