all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#10106: 23.2; how to pass command arguments to gud-go
@ 2011-11-22 11:08 Krzysztof =17belechowski
  2022-05-10  4:24 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof =17belechowski @ 2011-11-22 11:08 UTC (permalink / raw)
  To: 10106

<menu-bar> <tools> <gdb> ls C-u <tool-bar> <go> 

The command, when invoked under C-u, should ask for command line
arguments to pass to the program.

Example interaction:
*Minibuffer* Run with arguments: -l

Also, please add a keyboard binding for gud-go (e.g. C-c !)


In GNU Emacs 23.2.1 (i586-suse-linux-gnu, GTK+ Version 2.22.1)
 of 2011-02-22 on build27
Windowing system distributor `The X.Org Foundation', version 11.0.10903000
configured using `configure  '--with-pop' '--without-hesiod' '--with-kerberos' '--with-kerberos5' '--with-xim' '--enable-autodepend' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--with-x' '--with-sound' '--with-sync-input' '--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-rsvg' '--with-dbus' '--without-gpm' '--with-x-toolkit=gtk' '--x-includes=/usr/include' '--x-libraries=/usr/lib:/usr/share/X11' '--with-xft' '--with-libotf' '--with-m17n-flt' '--build=i586-suse-linux' 'build_alias=i586-suse-linux' 'CC=gcc-4.3' 'CFLAGS=-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -D_GNU_SOURCE -std=gnu89 -pipe -Wno-pointer-sign -Wno-unused-variable -Wno-unused-label -Wno-unprototyped-calls -fno-optimize-sibling-calls -DSYSTEM_PURESIZE_EXTRA=55000 	 -DSITELOAD_PURESIZE_EXTRA=10000 ' 'LDFLAGS=-Wl,-O2 -Wl,--hash-size=65521''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: pl_PL.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <menu-bar> <tools> <gdb> <backspace> 
<backspace> <backspace> <backspace> l s <return> C-u 
<down-mouse-4> <mouse-4> <double-down-mouse-4> <double-mouse-4> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <tool-bar> <go> C-u <tool-bar> 
<go> M-x r [ <backspace> e p o r t <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
byte-code: Beginning of buffer [2 times]
Command: run [2 times]

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message idna sendmail regexp-opt ecomplete rfc822
mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode
mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev
nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug gdb-ui
byte-opt bytecomp byte-compile advice help-fns advice-preload bindat
json gud easy-mmode comint ring lpr disp-table tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces
cus-face files text-properties overlay md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote
make-network-process dbusbind system-font-setting font-render-setting
gtk x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#10106: 23.2; how to pass command arguments to gud-go
  2011-11-22 11:08 bug#10106: 23.2; how to pass command arguments to gud-go Krzysztof =17belechowski
@ 2022-05-10  4:24 ` Lars Ingebrigtsen
  2022-05-10 11:56   ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-10  4:24 UTC (permalink / raw)
  To: Krzysztof =17belechowski; +Cc: 10106, Eli Zaretskii

giecrilj@stegny.2a.pl (Krzysztof =17belechowski) writes:

> <menu-bar> <tools> <gdb> ls C-u <tool-bar> <go> 
>
> The command, when invoked under C-u, should ask for command line
> arguments to pass to the program.
>
> Example interaction:
> *Minibuffer* Run with arguments: -l

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I'm not quite sure I understand the request, but you just want to be
able to type in further switches to be used here?

  ;; TODO Why arg here?
  (gud-def
   gud-go (gud-call (if gdb-active-process
                        (gdb-gud-context-command "-exec-continue")
                      "-exec-run") arg)
   nil "Start or continue execution.")

That seems easy enough to add, I guess.

> Also, please add a keyboard binding for gud-go (e.g. C-c !)

There's:

gud-until is an interactive compiled Lisp function.
It is bound to C-x C-a C-u.

So perhaps something else under C-x C-a?

I don't use these functions a lot myself, so I don't really have much of
an opinion on either requests.  Perhaps Eli has an opinion here; added
to the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#10106: 23.2; how to pass command arguments to gud-go
  2022-05-10  4:24 ` Lars Ingebrigtsen
@ 2022-05-10 11:56   ` Eli Zaretskii
  2022-05-11 11:31     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-05-10 11:56 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: giecrilj, 10106

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 10106@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
> Date: Tue, 10 May 2022 06:24:16 +0200
> 
> giecrilj@stegny.2a.pl (Krzysztof =17belechowski) writes:
> 
> > <menu-bar> <tools> <gdb> ls C-u <tool-bar> <go> 
> >
> > The command, when invoked under C-u, should ask for command line
> > arguments to pass to the program.
> >
> > Example interaction:
> > *Minibuffer* Run with arguments: -l
> 
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
> 
> I'm not quite sure I understand the request, but you just want to be
> able to type in further switches to be used here?
> 
>   ;; TODO Why arg here?
>   (gud-def
>    gud-go (gud-call (if gdb-active-process
>                         (gdb-gud-context-command "-exec-continue")
>                       "-exec-run") arg)
>    nil "Start or continue execution.")
> 
> That seems easy enough to add, I guess.
> 
> > Also, please add a keyboard binding for gud-go (e.g. C-c !)
> 
> There's:
> 
> gud-until is an interactive compiled Lisp function.
> It is bound to C-x C-a C-u.
> 
> So perhaps something else under C-x C-a?
> 
> I don't use these functions a lot myself, so I don't really have much of
> an opinion on either requests.  Perhaps Eli has an opinion here; added
> to the CCs.

The first request indeed makes sense, I think.  We'd need to use the
-exec-arguments command before -exec-run.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#10106: 23.2; how to pass command arguments to gud-go
  2022-05-10 11:56   ` Eli Zaretskii
@ 2022-05-11 11:31     ` Lars Ingebrigtsen
  2022-05-11 12:02       ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-11 11:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: giecrilj, 10106

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





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#10106: 23.2; how to pass command arguments to gud-go
  2022-05-11 11:31     ` Lars Ingebrigtsen
@ 2022-05-11 12:02       ` Eli Zaretskii
  2022-05-11 12:27         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-05-11 12:02 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: giecrilj, 10106

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: giecrilj@stegny.2a.pl,  10106@debbugs.gnu.org
> Date: Wed, 11 May 2022 13:31:03 +0200
> 
> 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?

Yes, I think this is correct.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#10106: 23.2; how to pass command arguments to gud-go
  2022-05-11 12:02       ` Eli Zaretskii
@ 2022-05-11 12:27         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-11 12:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: giecrilj, 10106

Eli Zaretskii <eliz@gnu.org> writes:

> Yes, I think this is correct.

Thanks; pushed to the trunk now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-11 12:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-22 11:08 bug#10106: 23.2; how to pass command arguments to gud-go Krzysztof =17belechowski
2022-05-10  4:24 ` Lars Ingebrigtsen
2022-05-10 11:56   ` Eli Zaretskii
2022-05-11 11:31     ` Lars Ingebrigtsen
2022-05-11 12:02       ` Eli Zaretskii
2022-05-11 12:27         ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.