From: Jean-Philippe Gravel <jpgravel@gmail.com>
To: 14129@debbugs.gnu.org
Subject: bug#14129: 24.3.50; gdb/gud: wrong-type-argument
Date: Fri, 5 Apr 2013 00:07:36 -0400 [thread overview]
Message-ID: <CAB3yAohXbKouWmVxgN=eUFpJcomq4WnmehMYMsv1qFSjs6aKpw@mail.gmail.com> (raw)
In-Reply-To: <1364996905.4008.6.camel@athena.config>
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
next prev parent reply other threads:[~2013-04-05 4:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2013-04-17 0:52 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAB3yAohXbKouWmVxgN=eUFpJcomq4WnmehMYMsv1qFSjs6aKpw@mail.gmail.com' \
--to=jpgravel@gmail.com \
--cc=14129@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).