From: Stephen Leake <stephen_leake@stephe-leake.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 13303@debbugs.gnu.org
Subject: bug#13303: 24.2.91; gdb under emacs broken for break commands
Date: Sat, 29 Dec 2012 13:40:02 -0500 [thread overview]
Message-ID: <85wqw0zoql.fsf@stephe-leake.org> (raw)
In-Reply-To: <838v8glqsa.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Dec 2012 19:19:33 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
> It's XP SP3. Do you mean you don't get "(gdb)" after typing "end" on
> Windows as well?
Correct.
>> Any suggestions for debugging this further?
>
> Perhaps turn on gdb-enable-debug, and see what you get in the
> gdb-debug-log variable.
That shows the failure:
gdb-debug-log
((recv . "~\">\"
") (mi-send . #("-interpreter-exec console \"end\"
" 27 30 (fontified t))) (recv . "~\">\"
") (mi-send . #("-interpreter-exec console \"p argc\"
" 27 33 (fontified t))) (recv . "~\">\"
") (mi-send . #("-interpreter-exec console \"command 1\"
" 27 36 (fontified t))) (recv . "16^error,msg=\"No registers.\"
(gdb)
17^done,threads=[]
(gdb)
This list is in reverse chronological order; the first ">" is the prompt
received after the "end".
>> I've confirmed that 'end' works as expected when running gdb from a bash
>> shell not under emacs.
>>
>> 'end' also works when running gdb in a bash shell under emacs. I guess
>> that's a mostly functional workaround.
>>
>> 'end' works with Emacs 23, running gdb with --annotate=3; it seems
>> to be the switch to -i=mi that causes the problem for me.
>
> What if you run GDB from the shell, but using the -i=mi switch, and
> set interactive-mode off? do you see the problem then?
The prompting does terminate with 'end' then. There is no output from gdb
during the break command prompting:
stephe@Shevek$ gdb -i=mi hello
=thread-group-added,id="i1"
~"GNU gdb (GDB) 7.4.1-debian\n"
~"Copyright (C) 2012 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"i486-linux-gnu\".\nFor bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>...\n"
~"Reading symbols from /home/Projects/opentoken/org.opentoken/Build/linux_release/hello..."
~"done.\n"
(gdb)
set interactive off
&"set interactive off\n"
^done
(gdb)
break 4
&"break 4\n"
~"Breakpoint 1 at 0x8048415: file hello.c, line 4.\n"
=breakpoint-created,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x08048415",func="main",file="hello.c",fullname="/home/Projects/opentoken/org.opentoken/Build/linux_release/hello.c",line="4",times="0",original-location="hello.c:4"}
^done
(gdb)
command 1
&"command 1\n"
~">"
p argc
~">"
end
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x08048415",func="main",file="hello.c",fullname="/home/Projects/opentoken/org.opentoken/Build/linux_release/hello.c",line="4",times="0",script={"p argc"},original-location="hello.c:4"}
^done
(gdb)
quit
&"quit\n"
So that is the expected behavior
>> I did confirm that Emacs 24 no longer supports --annotate=3.
>
> It does, if you invoke "M-x gud-gdb RET". Another work-around, I
> guess.
That works; it actually runs "gdb --fullname"; that seems to be all I need.
> But I still would like to find out why it doesn't work for you with
> -i=mi?
I'd like to know as well; I assume support for --fullname/--annotate=3
will go away at some point.
Is there another (non-emacs) front-end that uses gdb -i=mi that I can
try, to see if it works there?
I found 'xxgdb' for Debian; it closes immediately after starting, with
an unhelpful error message. I'm running via ssh -X, that may be part of
the problem. Not available on Cygwin.
--
-- Stephe
next prev parent reply other threads:[~2012-12-29 18:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-29 4:04 bug#13303: 24.2.91; gdb under emacs broken for break commands Stephen Leake
2012-12-29 8:17 ` Eli Zaretskii
2012-12-29 12:31 ` Stephen Leake
2012-12-29 12:55 ` Eli Zaretskii
2012-12-29 15:28 ` Stephen Leake
2012-12-29 17:19 ` Eli Zaretskii
2012-12-29 18:40 ` Stephen Leake [this message]
2012-12-29 18:56 ` Eli Zaretskii
2012-12-29 17:54 ` Eli Zaretskii
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=85wqw0zoql.fsf@stephe-leake.org \
--to=stephen_leake@stephe-leake.org \
--cc=13303@debbugs.gnu.org \
--cc=eliz@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).