[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10106: 23.2; how to pass command arguments to gud-go
From: |
Lars Ingebrigtsen |
Subject: |
bug#10106: 23.2; how to pass command arguments to gud-go |
Date: |
Wed, 11 May 2022 13:31:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> The first request indeed makes sense, I think. We'd need to use the
> -exec-arguments command before -exec-run.
Here's a completely untested patch. Does this look correct to you?
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 3b9e1231ab..6c2a0b5584 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -955,11 +955,15 @@ gdb
(forward-char 2)
(gud-call "-exec-until *%a" arg)))
"\C-u" "Continue to current line or address.")
- ;; TODO Why arg here?
(gud-def
- gud-go (gud-call (if gdb-active-process
- (gdb-gud-context-command "-exec-continue")
- "-exec-run") arg)
+ gud-go (progn
+ (when arg
+ (gud-call (concat "-exec-arguments "
+ (read-string "Arguments to exec-run: "))))
+ (gud-call
+ (if gdb-active-process
+ (gdb-gud-context-command "-exec-continue")
+ "-exec-run")))
nil "Start or continue execution.")
;; For debugging Emacs only.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no