unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14129: 24.3.50; gdb/gud: wrong-type-argument
@ 2013-04-03 13:48 Miguel Guedes
  2013-04-03 19:49 ` Stefan Monnier
  2013-04-05  4:07 ` Jean-Philippe Gravel
  0 siblings, 2 replies; 5+ messages in thread
From: Miguel Guedes @ 2013-04-03 13:48 UTC (permalink / raw)
  To: 14129

 Description
-------------

An error is triggered when entering gdb and any subsequent action in
gdb/gud triggers the same error.

Error message:

error in process filter: Wrong type argument: number-or-marker-p, nil


 Backtrace
-----------

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p
nil)
  gdbmi-bnf-incomplete-record-result("5" (gdb-done . progressive))
  #[0 "\302\300\301@\"\207" ["5" ((gdb-done . progressive))
gdbmi-bnf-incomplete-record-result] 3 "\n\n(fn)"]()
  gdbmi-bnf-result-and-async-record-impl()
  gdbmi-bnf-async-record()
  gdbmi-bnf-out-of-band-record()
  gdbmi-bnf-output()
  gud-gdbmi-marker-filter(<SNIP <too long> >)
  


 Meta
------

In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.0)
 of 2013-03-27 on papaya, modified by Debian
 (emacs-snapshot package, version 2:20130325-1~ppa1~quantal1)
Windowing system distributor `The X.Org Foundation', version
11.0.11300000
System Description:	Ubuntu 12.10

Configured using:
 `configure --build x86_64-linux-gnu --host x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man
 --with-pop=yes

--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3.50/site-lisp:/usr/share/emacs/site-lisp
 --without-compress-info --with-crt-dir=/usr/lib/x86_64-linux-gnu/
 --with-x=yes --with-x-toolkit=gtk3 --with-imagemagick=yes
 CFLAGS='-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2'
 CPPFLAGS='-D_FORTIFY_SOURCE=2' LDFLAGS='-g -Wl,--as-needed
 -znocombreloc''

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Apropos

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-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x d e b u g <M-backspace> t o g g l e - d e b u g 
<tab> e r r o r <return> M-x g d b <return> 
<M-backspace> <backspace> ~ / p r j / o m n i s / o 
u t / s r c / o m n i s <return> 

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
error in process filter: Wrong type argument: number-or-marker-p, nil
[96 times]
Debug on Error enabled globally
Entering debugger...
Mark set
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils apropos help-mode easymenu debug cus-start
cus-load gdb-mi bindat json gud easy-mmode comint ansi-color ring
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
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
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind inotify
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)

-- 
Miguel






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

* bug#14129: 24.3.50; gdb/gud: wrong-type-argument
  2013-04-03 13:48 bug#14129: 24.3.50; gdb/gud: wrong-type-argument Miguel Guedes
@ 2013-04-03 19:49 ` Stefan Monnier
  2013-04-04  3:12   ` Miguel Guedes
  2013-04-05  4:07 ` Jean-Philippe Gravel
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2013-04-03 19:49 UTC (permalink / raw)
  To: Miguel Guedes; +Cc: 14129

>  Description
> -------------
> An error is triggered when entering gdb and any subsequent action in
> gdb/gud triggers the same error.

When does it happen?  Just doing M-x gdb RET RET?


        Stefan





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

* bug#14129: 24.3.50; gdb/gud: wrong-type-argument
  2013-04-03 19:49 ` Stefan Monnier
@ 2013-04-04  3:12   ` Miguel Guedes
  0 siblings, 0 replies; 5+ messages in thread
From: Miguel Guedes @ 2013-04-04  3:12 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 14129

On Wed, 2013-04-03 at 15:49 -0400, Stefan Monnier wrote:
> >  Description
> > -------------
> > An error is triggered when entering gdb and any subsequent action in
> > gdb/gud triggers the same error.
> 
> When does it happen?  Just doing M-x gdb RET RET?

After doing,

	M-x gdb RET

Then, when prompted with "Run gdb (like this): gdb -i=mi ",

	<enter /path/to/executable> RET

The error can then be seen.

Best Regards,

-- 
Miguel






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

* bug#14129: 24.3.50; gdb/gud: wrong-type-argument
  2013-04-03 13:48 bug#14129: 24.3.50; gdb/gud: wrong-type-argument Miguel Guedes
  2013-04-03 19:49 ` Stefan Monnier
@ 2013-04-05  4:07 ` Jean-Philippe Gravel
  2013-04-17  0:52   ` Stefan Monnier
  1 sibling, 1 reply; 5+ messages in thread
From: Jean-Philippe Gravel @ 2013-04-05  4:07 UTC (permalink / raw)
  To: 14129

Try the following patch.

The current buffer offset (gdbmi-bnf-offset) was incorrectly adjusted
when receiving incomplete responses from GDB.


=== modified file 'lisp/progmodes/gdb-mi.el'
*** lisp/progmodes/gdb-mi.el    2013-03-11 17:13:39 +0000
--- lisp/progmodes/gdb-mi.el    2013-04-05 03:47:08 +0000
***************
*** 2152,2167 ****
         (is-complete (not (null newline-pos)))
         result-str)

        ;; Update the gdbmi-bnf-offset only if the current chunk of data can
        ;; be processed by the class-command handler:
        (when (or is-complete is-progressive)
      (setq result-str
                (substring gud-marker-acc gdbmi-bnf-offset newline-pos))
-     (setq gdbmi-bnf-offset (+ 1 newline-pos)))

!       (if gdbmi-debug-mode
!           (message "gdbmi-bnf-incomplete-record-result: %s"
!                    (substring gud-marker-acc gdbmi-bnf-offset newline-pos)))

        ;; Update the parsing state before invoking the handler in class-command
        ;; to make sure it's not left in an invalid state if the handler was
--- 2152,2171 ----
         (is-complete (not (null newline-pos)))
         result-str)

+       (when gdbmi-debug-mode
+     (message "gdbmi-bnf-incomplete-record-result: %s"
+          (substring gud-marker-acc gdbmi-bnf-offset newline-pos)))
+
        ;; Update the gdbmi-bnf-offset only if the current chunk of data can
        ;; be processed by the class-command handler:
        (when (or is-complete is-progressive)
      (setq result-str
                (substring gud-marker-acc gdbmi-bnf-offset newline-pos))

!     ;; Move gdbmi-bnf-offset past the end of the chunk
!     (setq gdbmi-bnf-offset (+ gdbmi-bnf-offset (length result-str)))
!     (when newline-pos
!       (setq gdbmi-bnf-offset (1+ gdbmi-bnf-offset))))

        ;; Update the parsing state before invoking the handler in class-command
        ;; to make sure it's not left in an invalid state if the handler was





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

* bug#14129: 24.3.50; gdb/gud: wrong-type-argument
  2013-04-05  4:07 ` Jean-Philippe Gravel
@ 2013-04-17  0:52   ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2013-04-17  0:52 UTC (permalink / raw)
  To: Jean-Philippe Gravel; +Cc: 14129-done

> Try the following patch.
> The current buffer offset (gdbmi-bnf-offset) was incorrectly adjusted
> when receiving incomplete responses from GDB.

Installed, thank you,


        Stefan





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

end of thread, other threads:[~2013-04-17  0:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03 13:48 bug#14129: 24.3.50; gdb/gud: wrong-type-argument Miguel Guedes
2013-04-03 19:49 ` Stefan Monnier
2013-04-04  3:12   ` Miguel Guedes
2013-04-05  4:07 ` Jean-Philippe Gravel
2013-04-17  0:52   ` Stefan Monnier

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).