public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug mi/15596] New: emacs interface with "gdb -i=mi" hangs on quoted newlines
@ 2013-06-07 3:25 stolfi at ic dot unicamp.br
2013-06-07 3:26 ` [Bug mi/15596] emacs interface with "gdb -i=mi" mishandles " stolfi at ic dot unicamp.br
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: stolfi at ic dot unicamp.br @ 2013-06-07 3:25 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15596
Bug ID: 15596
Summary: emacs interface with "gdb -i=mi" hangs on quoted
newlines
Product: gdb
Version: 7.5
Status: NEW
Severity: normal
Priority: P2
Component: mi
Assignee: unassigned at sourceware dot org
Reporter: stolfi at ic dot unicamp.br
I am running GDB 7.5 (Fedora 7.5.1-38.fc18) under emacs 24.2.1
(x86_64-redhat-linux-gnu, GTK+ Version 3.6.4) with the default command META-x
gdb ENTER ("gdb -i=mi")
It seems that GDB command lines that end with "\" just before the newline are
mishandled. The debugger apparently ignores the entire line.
For example, after loading the target program, try starting it with the command
line
(gdb) run FOO BAR \
BAZ QUX
and finish with an unquoted newline (ENTER). The response is
Undefined command: "BAZ". Try "help".
(gdb)
and the target program is NOT started.
This behavior is rather annoying since my target programs often have lots of
arguments and are executed from Makefiles by multiline commands with
backlash-quoted newlines, like
./myprogram \
-source s1_bl1 \
-subject 001 \
-outPrefix out/split \
-framesPerRun 5400 \
-firstRun 001 \
-pulsesPerRun 4 \
-trigger TR -nElectrodes 20 \
-fSampling 600 \
< foo.txt
With some older version of GBD I could simply copy-paste the command arguments
above from the "*compilation*" buffer to the GDB buffer and hit ENTER. Now I
have to manually remove the backslashes every time.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug mi/15596] emacs interface with "gdb -i=mi" mishandles quoted newlines
2013-06-07 3:25 [Bug mi/15596] New: emacs interface with "gdb -i=mi" hangs on quoted newlines stolfi at ic dot unicamp.br
@ 2013-06-07 3:26 ` stolfi at ic dot unicamp.br
2013-06-07 3:45 ` sergiodj at redhat dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: stolfi at ic dot unicamp.br @ 2013-06-07 3:26 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15596
stolfi at ic dot unicamp.br changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|emacs interface with "gdb |emacs interface with "gdb
|-i=mi" hangs on quoted |-i=mi" mishandles quoted
|newlines |newlines
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug mi/15596] emacs interface with "gdb -i=mi" mishandles quoted newlines
2013-06-07 3:25 [Bug mi/15596] New: emacs interface with "gdb -i=mi" hangs on quoted newlines stolfi at ic dot unicamp.br
2013-06-07 3:26 ` [Bug mi/15596] emacs interface with "gdb -i=mi" mishandles " stolfi at ic dot unicamp.br
@ 2013-06-07 3:45 ` sergiodj at redhat dot com
2013-06-07 3:55 ` stolfi at ic dot unicamp.br
2013-06-07 4:53 ` sergiodj at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: sergiodj at redhat dot com @ 2013-06-07 3:45 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15596
Sergio Durigan Junior <sergiodj at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sergiodj at redhat dot com
--- Comment #1 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
I've been talking to Jorge about this, and I am strongly inclined to believe
that it is Emacs' (i.e., gdb-mi's) fault. Will see if I can find the culprit.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug mi/15596] emacs interface with "gdb -i=mi" mishandles quoted newlines
2013-06-07 3:25 [Bug mi/15596] New: emacs interface with "gdb -i=mi" hangs on quoted newlines stolfi at ic dot unicamp.br
2013-06-07 3:26 ` [Bug mi/15596] emacs interface with "gdb -i=mi" mishandles " stolfi at ic dot unicamp.br
2013-06-07 3:45 ` sergiodj at redhat dot com
@ 2013-06-07 3:55 ` stolfi at ic dot unicamp.br
2013-06-07 4:53 ` sergiodj at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: stolfi at ic dot unicamp.br @ 2013-06-07 3:55 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15596
--- Comment #2 from stolfi at ic dot unicamp.br ---
May be an emacs 24 bug of course. The "older version" I mentioned was used
under an older emacs too, as "gdb --annotate=3" I believe.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug mi/15596] emacs interface with "gdb -i=mi" mishandles quoted newlines
2013-06-07 3:25 [Bug mi/15596] New: emacs interface with "gdb -i=mi" hangs on quoted newlines stolfi at ic dot unicamp.br
` (2 preceding siblings ...)
2013-06-07 3:55 ` stolfi at ic dot unicamp.br
@ 2013-06-07 4:53 ` sergiodj at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: sergiodj at redhat dot com @ 2013-06-07 4:53 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15596
--- Comment #3 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
A little more investigation on this... On Emacs,
lisp/progmodes/gdb-mi.el:gdb-send, I notice that the string being sent for
processing is wrong. When one types:
(gdb) run \
BAZ QUX
The function gets called twice, first with "run \\", and next with "BAZ QUX",
leading to the "Undefined command" error. So yeah, it seems the way Emacs
parses things (or comint-mode, which is the mode used by gdb-mi to interact
with the user, in this case) is wrong.
Since I'm sleepy now, I'll leave the bug opened and take a better look at it
tomorrow/during the weekend, just to make sure everything is covered.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-07 4:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07 3:25 [Bug mi/15596] New: emacs interface with "gdb -i=mi" hangs on quoted newlines stolfi at ic dot unicamp.br
2013-06-07 3:26 ` [Bug mi/15596] emacs interface with "gdb -i=mi" mishandles " stolfi at ic dot unicamp.br
2013-06-07 3:45 ` sergiodj at redhat dot com
2013-06-07 3:55 ` stolfi at ic dot unicamp.br
2013-06-07 4:53 ` sergiodj at redhat dot com
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).