* gud-mode --annotate=3 and synchronization problems
@ 2007-08-30 15:58 Pierre-Louis Escouflaire
2007-08-31 5:18 ` Nick Roberts
2007-09-02 3:26 ` Nick Roberts
0 siblings, 2 replies; 8+ messages in thread
From: Pierre-Louis Escouflaire @ 2007-08-30 15:58 UTC (permalink / raw)
To: bug-gnu-emacs
Typing commands before gdb is ready makes gud-mode confused.
Also note the command being repeated on quit using Ctrl-D (^D).
Current directory is /auto/home/esf/TACTDEV_HOME/carp_esf_G!67.IP.L3_12.348/tact/12.348/data_files/
GNU gdb 6.6 for GNAT Pro 6.1.0w (20070825) [rev:14057]
Copyright 2005-2007 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
See your support agreement for details of warranty and support.
If you do not have a current support agreement, then there is absolutely
no warranty for this version of GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...help
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) help
No breakpoints or watchpoints.
(gdb) No breakpoints or watchpoints.
(gdb) No breakpoints or watchpoints.
(gdb)
Debugger finished
We also noticed some other synchronization problems.
We are currently trying to reproduce them.
Thanks for your concern.
Regards,
Pierre-Louis ESCOUFLAIRE.
In GNU Emacs 22.1.1 (i686-pc-linux-gnu, X toolkit)
of 2007-08-30 on pike
Windowing system distributor `Hewlett-Packard Company', version 11.0.600000
configured using `configure '--prefix=/cm/ot/TOOL/GNU!12.48/build_G!67.IP.L3/generated' '--exec-prefix=/cm/ot/TOOL/GNU!12.48/build_G!67.IP.L3/generated/libexec/emacs-22.1' '--mandir=/cm/ot/TOOL/GNU!12.48/build_G!67.IP.L3/generated/man' '--with-xpm' 'CFLAGS=-g' 'LDFLAGS= -L/cm/ot/TOOL/GNU!12.48/build_G!67.IP.L3/generated/work/emacs-22.1/xpm-3.4k/lib' 'CPPFLAGS=-I/cm/ot/TOOL/GNU!12.48/build_G!67.IP.L3/generated/work/emacs-22.1/xpm-3.4k ''
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: C
locale-coding-system: nil
default-enable-multibyte-characters: nil
Major mode: Debugger
Minor modes in effect:
iswitchb-mode: t
show-paren-mode: t
which-function-mode: t
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
M-x g d b <return> m o n o _ p r o c e s s <return> h e l p
<return> h e l p <backspace> <backspace> <backspace> <backspace>
h e l p <return> C-d C-d C-d C-d <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> <help-menu>
<report-emacs-bug>
Recent messages:
For information about the GNU Project and its goals, type C-h C-p.
Unable to load color "grey30" [3 times]
Loading gud...
Loading easy-mmode...done
Loading gud...done
call-interactively: Text is read-only
Quit [2 times]
run-hooks: Symbol's value as variable is void: gud-break
comint-delchar-or-maybe-eof: End of buffer [2 times]
Loading emacsbug...done
____
This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.
Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.
Any views expressed in this message are those of the sender.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: gud-mode --annotate=3 and synchronization problems
2007-08-30 15:58 Pierre-Louis Escouflaire
@ 2007-08-31 5:18 ` Nick Roberts
2007-09-01 4:06 ` Richard Stallman
2007-09-02 3:26 ` Nick Roberts
1 sibling, 1 reply; 8+ messages in thread
From: Nick Roberts @ 2007-08-31 5:18 UTC (permalink / raw)
To: Pierre-Louis Escouflaire; +Cc: bug-gnu-emacs
> Typing commands before gdb is ready makes gud-mode confused.
> Also note the command being repeated on quit using Ctrl-D (^D).
I think this and your earlier bug report are consequences of the way input for
GDB is queued using annotations. I have code for using MI which uses tokens
rather than queues, so shouldn't have these problems, but it's not pretty and
really needs GDB to work asynchronously. These changes are substantial, and I
don't have approval for the those to GDB yet, so it's a work in progress and
not a currently practical option. All I can really say, for the moment, is
"Don't do that." which I realise is a bit weak.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: gud-mode --annotate=3 and synchronization problems
2007-08-31 5:18 ` Nick Roberts
@ 2007-09-01 4:06 ` Richard Stallman
0 siblings, 0 replies; 8+ messages in thread
From: Richard Stallman @ 2007-09-01 4:06 UTC (permalink / raw)
To: Nick Roberts; +Cc: bug-gnu-emacs, esf
> Typing commands before gdb is ready makes gud-mode confused.
> Also note the command being repeated on quit using Ctrl-D (^D).
I think this and your earlier bug report are consequences of the way input for
GDB is queued using annotations.
Can you program the Lisp code to discard user input, and not send it
to GDB, until GDBs's output shows it is ready?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: gud-mode --annotate=3 and synchronization problems
2007-08-30 15:58 Pierre-Louis Escouflaire
2007-08-31 5:18 ` Nick Roberts
@ 2007-09-02 3:26 ` Nick Roberts
1 sibling, 0 replies; 8+ messages in thread
From: Nick Roberts @ 2007-09-02 3:26 UTC (permalink / raw)
To: Pierre-Louis Escouflaire; +Cc: bug-gnu-emacs
> Typing commands before gdb is ready makes gud-mode confused.
I've looked at this more carefully now. Does the patch below fix it if you use
M-x gdba? (As a general note, if you want to use GDB in graphical mode it's
better to use M-x gdba than M-x gdb)
> Also note the command being repeated on quit using Ctrl-D (^D).
I thought we had solved this problem. Can you be more specific? Does it
still happen with M-x gdba
> We also noticed some other synchronization problems.
> We are currently trying to reproduce them.
Please post them here when possible.
--
Nick http://www.inet.net.nz/~nickrob
*** gud.el 13 Aug 2007 20:51:56 +1200 1.129.2.6
--- gud.el 02 Sep 2007 15:20:41 +1200
*************** If SOFT is non-nil, returns nil if the s
*** 104,109 ****
--- 104,111 ----
"Non-nil if debugged program is running.
Used to grey out relevant toolbar icons.")
+ (defvar gdb-ready nil)
+
;; Use existing Info buffer, if possible.
(defun gud-goto-info ()
"Go to relevant Emacs info node."
*************** session."
*** 764,769 ****
--- 766,772 ----
(setq comint-prompt-regexp "^(.*gdb[+]?) *")
(setq paragraph-start comint-prompt-regexp)
(setq gdb-first-prompt t)
+ (setq gdb-ready nil)
(setq gud-filter-pending-text nil)
(run-hooks 'gdb-mode-hook))
*** gdb-ui.el 13 Aug 2007 20:51:56 +1200 1.206.2.4
--- gdb-ui.el 02 Sep 2007 15:23:48 +1200
*************** detailed description of this mode.
*** 270,275 ****
--- 270,279 ----
;;
(interactive (list (gud-query-cmdline 'gdba)))
;;
+ ;; Do this early in case user enters commands before GDB is ready.
+ (setq comint-input-sender 'gdb-send)
+ (setq gdb-ready nil)
+
;; Let's start with a basic gud-gdb buffer and then modify it a bit.
(gdb command-line)
(gdb-init-1))
*************** The key should be one of the cars in `gd
*** 1124,1143 ****
(defun gdb-send (proc string)
"A comint send filter for gdb.
This filter may simply queue input for a later time."
! (with-current-buffer gud-comint-buffer
! (let ((inhibit-read-only t))
! (remove-text-properties (point-min) (point-max) '(face))))
! (if gud-running
! (progn
! (let ((item (concat string "\n")))
! (if gdb-enable-debug (push (cons 'send item) gdb-debug-log))
! (process-send-string proc item)))
! (if (string-match "\\\\\\'" string)
! (setq gdb-continuation (concat gdb-continuation string "\n"))
! (let ((item (concat gdb-continuation string
! (if (not comint-input-sender-no-newline) "\n"))))
! (gdb-enqueue-input item)
! (setq gdb-continuation nil)))))
;; Note: Stuff enqueued here will be sent to the next prompt, even if it
;; is a query, or other non-top-level prompt.
--- 1128,1148 ----
(defun gdb-send (proc string)
"A comint send filter for gdb.
This filter may simply queue input for a later time."
! (when gdb-ready
! (with-current-buffer gud-comint-buffer
! (let ((inhibit-read-only t))
! (remove-text-properties (point-min) (point-max) '(face))))
! (if gud-running
! (progn
! (let ((item (concat string "\n")))
! (if gdb-enable-debug (push (cons 'send item) gdb-debug-log))
! (process-send-string proc item)))
! (if (string-match "\\\\\\'" string)
! (setq gdb-continuation (concat gdb-continuation string "\n"))
! (let ((item (concat gdb-continuation string
! (if (not comint-input-sender-no-newline) "\n"))))
! (gdb-enqueue-input item)
! (setq gdb-continuation nil))))))
;; Note: Stuff enqueued here will be sent to the next prompt, even if it
;; is a query, or other non-top-level prompt.
*************** buffers."
*** 2996,3002 ****
(gdb-get-buffer-create 'gdb-breakpoints-buffer)
(if gdb-show-main
(let ((pop-up-windows t))
! (display-buffer (gud-find-file gdb-main-file))))))
(defun gdb-get-location (bptno line flag)
"Find the directory containing the relevant source file.
--- 3001,3008 ----
(gdb-get-buffer-create 'gdb-breakpoints-buffer)
(if gdb-show-main
(let ((pop-up-windows t))
! (display-buffer (gud-find-file gdb-main-file)))))
! (setq gdb-ready t))
(defun gdb-get-location (bptno line flag)
"Find the directory containing the relevant source file.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: gud-mode --annotate=3 and synchronization problems
@ 2007-09-04 11:47 Pierre-Louis Escouflaire
2007-09-05 5:20 ` Nick Roberts
0 siblings, 1 reply; 8+ messages in thread
From: Pierre-Louis Escouflaire @ 2007-09-04 11:47 UTC (permalink / raw)
To: bug-gnu-emacs
Nick Roberts wrote:
>> Typing commands before gdb is ready makes gud-mode confused.
>
> I've looked at this more carefully now. Does the patch below fix it
> if you use M-x gdba? (As a general note, if you want to use GDB in
> graphical mode it's better to use M-x gdba than M-x gdb)
With M-x gdb, gdb does not execute the first command (before prompt) and
gets stuck (freezes) with the second (during prompt).
With M-x gdba, it is exactly the same.
Here are some tests I have performed.
With M-x gdb:
Not doing anything before gdb prompt appears is OK.
Not doing anything but `M-x describe-variable RET gdb-ready' before gdb
prompt appears tells "No match" and then commands make gdb freeze. Plus,
hre are some messages I had:
when: Symbol's value as variable is void: gdb-ready
error in process filter: cond: Phase error in gdb-pre-prompt (got
pre-emacs)
error in process filter: Phase error in gdb-pre-prompt (got pre-emacs)
Note that all goes along with the --annotate=3 option.
With M-x gdba:
Not doing anything before gdb prompt appears is OK.
Not doing anything but `M-x describe-variable RET gdb-ready' before gdb
prompt appears tells "No match" and then commands make gdb freeze.
The gdb-ready variable is defined everytime.
However, it is still set to 'nil' after the first prompt appeared.
>> Also note the command being repeated on quit using Ctrl-D (^D).
>
> I thought we had solved this problem. Can you be more specific? Does
> it still happen with M-x gdba
With M-x gdb:
Not doing anything before gdb prompt appears, I receive this message:
when: Symbol's value as variable is void: gdb-ready
With M-x gdba:
Not doing anything before gdb prompt appears, it does not do anything
until gdb is in the 'ready' state. Then it quits normally.
Thanks for your concern
Regards,
Pierre-Louis ESCOUFLAIRE
____
This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.
Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.
Any views expressed in this message are those of the sender.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: gud-mode --annotate=3 and synchronization problems
2007-09-04 11:47 gud-mode --annotate=3 and synchronization problems Pierre-Louis Escouflaire
@ 2007-09-05 5:20 ` Nick Roberts
2007-09-05 15:53 ` Pierre-Louis Escouflaire
0 siblings, 1 reply; 8+ messages in thread
From: Nick Roberts @ 2007-09-05 5:20 UTC (permalink / raw)
To: pierre-louis.escouflaire; +Cc: bug-gnu-emacs
> Not doing anything but `M-x describe-variable RET gdb-ready' before gdb
> prompt appears tells "No match" and then commands make gdb freeze. Plus,
> hre are some messages I had:
> when: Symbol's value as variable is void: gdb-ready
>...
I don't get that because:
*** gud.el 13 Aug 2007 20:51:56 +1200 1.129.2.6
--- gud.el 02 Sep 2007 15:20:41 +1200
*************** If SOFT is non-nil, returns nil if the s
*** 104,109 ****
--- 104,111 ----
"Non-nil if debugged program is running.
Used to grey out relevant toolbar icons.")
+ (defvar gdb-ready nil)
+
...
Have you byte compiled gud.el? (You may be loading an old version).
These diffs were made against Emacs in CVS (EMACS_22_BASE branch) so you might
need to adjust them a bit for Emacs 22.1.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: gud-mode --annotate=3 and synchronization problems
2007-09-05 5:20 ` Nick Roberts
@ 2007-09-05 15:53 ` Pierre-Louis Escouflaire
2007-09-06 7:08 ` Nick Roberts
0 siblings, 1 reply; 8+ messages in thread
From: Pierre-Louis Escouflaire @ 2007-09-05 15:53 UTC (permalink / raw)
To: Nick Roberts; +Cc: bug-gnu-emacs
Nick Roberts wrote:
> > Not doing anything but `M-x describe-variable RET gdb-ready' before gdb
> > prompt appears tells "No match" and then commands make gdb freeze. Plus,
> > hre are some messages I had:
> > when: Symbol's value as variable is void: gdb-ready
> >...
>
> I don't get that because:
>
> *** gud.el 13 Aug 2007 20:51:56 +1200 1.129.2.6
> --- gud.el 02 Sep 2007 15:20:41 +1200
> *************** If SOFT is non-nil, returns nil if the s
> *** 104,109 ****
> --- 104,111 ----
> "Non-nil if debugged program is running.
> Used to grey out relevant toolbar icons.")
>
> + (defvar gdb-ready nil)
> +
> ...
>
> Have you byte compiled gud.el? (You may be loading an old version).
> These diffs were made against Emacs in CVS (EMACS_22_BASE branch) so you might
> need to adjust them a bit for Emacs 22.1.
OK, I just took the one from CVS (with no gdb-ready variable) and tested
a bit with different configurations and I don't have any synchronization
problems remaining.
I have seen that the default behavior is now 'gdb' with no option which
I think to be much better (one generally removes the --annotate=3 option).
However, I have tested with the --annotate=3 option and I have seen that
navigation through files is broken. In fact, it is due to the file
location: it tries to open the file within directory "$(pwd)/source
${REAL_LOCATION}" (strings concatenation).
Note that gud-mode also behaves as gdb outside emacs, i.e. outputting
those ^Z characters and current operation (pre-prompt, starting,
breakpoint, etc.) sequence. I do not know if it is normal, but to me
Anyways, to me, it seems much better this way since one is not lost with
options (s)he never used before and since the use of gdb is now much easier.
Thanks a lot for your concern.
Regards,
Pierre-Louis ESCOUFLAIRE
____
This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.
Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.
Any views expressed in this message are those of the sender.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: gud-mode --annotate=3 and synchronization problems
2007-09-05 15:53 ` Pierre-Louis Escouflaire
@ 2007-09-06 7:08 ` Nick Roberts
0 siblings, 0 replies; 8+ messages in thread
From: Nick Roberts @ 2007-09-06 7:08 UTC (permalink / raw)
To: pierre-louis.escouflaire; +Cc: bug-gnu-emacs
> OK, I just took the one from CVS (with no gdb-ready variable) and tested
> a bit with different configurations and I don't have any synchronization
> problems remaining.
>
> I have seen that the default behavior is now 'gdb' with no option which
> I think to be much better (one generally removes the --annotate=3 option).
If you remove the --annotate=3 option M-x gdb will just behave like the command
line with the tool bar and keybindings, i.e., no source will be displayed.
> However, I have tested with the --annotate=3 option and I have seen that
> navigation through files is broken. In fact, it is due to the file
> location: it tries to open the file within directory "$(pwd)/source
> ${REAL_LOCATION}" (strings concatenation).
Is REAL_LOCATION an environment variable or meta-language?
> Note that gud-mode also behaves as gdb outside emacs, i.e. outputting
> those ^Z characters and current operation (pre-prompt, starting,
> breakpoint, etc.) sequence. I do not know if it is normal, but to me
This shouldn't happen. Does anybody else see these problems?
> Anyways, to me, it seems much better this way since one is not lost with
> options (s)he never used before and since the use of gdb is now much easier.
If by "this way" you mean 'gdb' with no option, you might as well use GDB
from the command line as you won't get many of the features that GUD mode
offers.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-09-06 7:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-04 11:47 gud-mode --annotate=3 and synchronization problems Pierre-Louis Escouflaire
2007-09-05 5:20 ` Nick Roberts
2007-09-05 15:53 ` Pierre-Louis Escouflaire
2007-09-06 7:08 ` Nick Roberts
-- strict thread matches above, loose matches on Subject: below --
2007-08-30 15:58 Pierre-Louis Escouflaire
2007-08-31 5:18 ` Nick Roberts
2007-09-01 4:06 ` Richard Stallman
2007-09-02 3:26 ` Nick Roberts
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).