Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gdb-mode hangs in OS X

3 views
Skip to first unread message

Michael Lee

unread,
Sep 18, 2005, 10:48:40 PM9/18/05
to
I'm having an issue under OS X and emacs version 22.0.50.1 where
entering any command at all in gdb-mode after getting into it with M-x
gdb causes the buffer to "hang" (it just sits there without producing
any output or accepting input) --- I can get back to a gdb prompt with
C-c C-c, but can't even type quit to exit gdb.

The symptoms are similar to those exhibited by shell mode without (setq
process-connection-type t).

Any ideas?

Thanks,

Michael

Nick Roberts

unread,
Sep 20, 2005, 12:53:27 AM9/20/05
to michael...@gmail.com, help-gn...@gnu.org

What version of OS X and GDB are you using?

Set gdb-enable-debug-log to t, do M-x gdb, and please post the resulting value
of gdb-debug-log to emacs-pr...@gnu.org (this is the right mailing list
for Emacs in CVS, currently 22.0.50).

Nick


Michael Lee

unread,
Sep 20, 2005, 7:37:47 PM9/20/05
to
The variable wasn't recognized when using M-x set-variable, and so I
set it manually with a setq. I couldn't find a gdb-debug-log after
doing M-x gdb subsequently, though --- am I doing something wrong?
Sorry for not following instructions and posting to emacs-pretest-bug
just yet; I wanted to make sure I got the output right first.

I'm running OS X 10.4.2, and gdb 6.1-20040303 (Apple version gdb-413).

Thanks for replying!

Nick Roberts

unread,
Sep 22, 2005, 6:32:47 AM9/22/05
to michael...@gmail.com, help-gn...@gnu.org

> The variable wasn't recognized when using M-x set-variable, and so I
> set it manually with a setq.

gdb-enable-debug-log should be autoloaded so you should see it even if you
haven't loaded the file. Are you really using 22.0.50? Is it Carbon Emacs
from the CVS repository at savannah or a derived version like Aqua Emacs?

After you typ M-x gdb does Emacs prompt with:

Run gdb (like this): gdb --annotate=3 `yourprog'?

> I couldn't find a gdb-debug-log after
> doing M-x gdb subsequently, though --- am I doing something wrong?
> Sorry for not following instructions and posting to emacs-pretest-bug
> just yet; I wanted to make sure I got the output right first.

Something doesn't add up but there's no harm in posting to emacs-pretest-bug
even if you are doing something wrong. Its a forum for such matters not
an IQ contest.

> I'm running OS X 10.4.2, and gdb 6.1-20040303 (Apple version gdb-413).

I've had reports for 10.2 and 10.3 where, I think, M-x gdb works now. Apple
have their own version of GDB so they might have removed the underlying
annotations in 10.4 (Tiger?) that are needed for GDB to work in Emacs. You
could look at the output of "gdb --annotate=3 yourprog" from the command line
ans see if it marks up the output with frames-invalid, pre-prompt, prompt etc.

Without access to OS X 10.4 (or even a Mac!), I can't really help you.
If you want to dig deeper please report any progress you make to
emacs-devel.

Nick


Nick Roberts

unread,
Sep 22, 2005, 10:33:28 AM9/22/05
to michael...@gmail.com, help-gn...@gnu.org

Michael Lee

unread,
Sep 22, 2005, 5:14:00 PM9/22/05
to
I had been using a prebuilt version of emacs (not Aquamacs) that
reported itself as being version 22.0.50.1. I subsequently built and
installed from CVS source and, while gdb-enable-debug-log worked,
gdb-mode itself still wasn't fixed. I'd keep getting dropped to the
(gdb) prompt, everything looked fine, but then after typing a command
the thing would just hang.

Then, on a hunch, I turned off viper mode (I forgot to mention I was
using it), and everything started working just fine! Is this a known
issue with viper? (Note: using C-z to enter emacs mode temporarily
didn't fix the problem, nor did M-x viper-go-away --- I had to actually
disable it and restart emacs)

Nick Roberts

unread,
Sep 22, 2005, 6:03:30 PM9/22/05
to michael...@gmail.com, help-gn...@gnu.org

> Then, on a hunch, I turned off viper mode (I forgot to mention I was
> using it), and everything started working just fine! Is this a known
> issue with viper? (Note: using C-z to enter emacs mode temporarily
> didn't fix the problem, nor did M-x viper-go-away --- I had to actually
> disable it and restart emacs)

I wasn't aware of it but I've never used viper-mode. At first sight, I would
think it shouldn't interfere. If you had used M-x report-emacs-bug it might
have shown that you had turned viper-mode on. I suggest again that you send
your report to emacs-pr...@gnu.org where someone might, possibly Michael
Kifer, author of Viper, might recognise the problem.

Nick


Edward O'Connor

unread,
Sep 22, 2005, 7:04:06 PM9/22/05
to help-gn...@gnu.org
> Then, on a hunch, I turned off viper mode (I forgot to mention I was
> using it), and everything started working just fine! Is this a known

Perhaps disabling viper-auto-indent in the relevant mode hook would do
the trick?


Ted

--
Edward O'Connor
hob...@gmail.com

Ense petit placidam sub libertate quietem.

Michael Lee

unread,
Sep 23, 2005, 2:02:17 AM9/23/05
to
If I could, I'd give you a great big hug. Turning off
viper-auto-indent did the trick!

Edward O'Connor

unread,
Sep 23, 2005, 5:48:33 PM9/23/05
to help-gn...@gnu.org
>>> Then, on a hunch, I turned off viper mode (I forgot to mention I was
>>> using it), and everything started working just fine! Is this a known
>>
>> Perhaps disabling viper-auto-indent in the relevant mode hook would
>> do the trick?
>
> If I could, I'd give you a great big hug. Turning off
> viper-auto-indent did the trick!

Glad to hear it. Which mode hook did you use?

Here's where/how I disable viper-auto-indent:

(setq-default viper-auto-indent t)

(defun ted-disable-viper-auto-indent ()
(when viper-mode
(setq viper-auto-indent nil)))

(mapc (lambda (hook)
(add-hook hook 'ted-disable-viper-auto-indent))
'(eshell-mode-hook nslookup-mode-hook wikipedia-mode-hook
css-mode-hook))

Stefan Monnier

unread,
Sep 24, 2005, 12:32:42 PM9/24/05
to
> If I could, I'd give you a great big hug. Turning off
> viper-auto-indent did the trick!

Please M-x report-emacs-bug describing your problem and the workaround
you've found. Hopefully the problem can be fixed so you don't need
the workaround.


Stefan

0 new messages