all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Multi-Frame/Window Debugging Problem
@ 2007-09-05 14:15 Nordlöw
  2007-09-06 10:09 ` Nick Roberts
       [not found] ` <mailman.414.1189076872.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Nordlöw @ 2007-09-05 14:15 UTC (permalink / raw)
  To: help-gnu-emacs

When I try to run the new multi-frame/window GDB-interface and issue a
command in the gud terminal buffer my Emacs (daily CVS snapshot)
version hangs.

The problem arises for vanilla Emacs, that is when I run "\emacs -q"
and then type M-x gdba and give the default argument "gdb --annotate=3
<prog>". It feels like it has something to do with gdb's inter-process-
communication since I can break it when I press C-g and my CPU-load is
zero during lookup. I have seen that the argument should be either
Emacs Info Manual says --annotate=3 but vanilla Emacs M-x gdba
defaults to gdb -annotate=3 <program>. I have tried both these
variants but none helps.

Thanks in advance,
Per Nordlöw

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

* Re: Multi-Frame/Window Debugging Problem
  2007-09-05 14:15 Multi-Frame/Window Debugging Problem Nordlöw
@ 2007-09-06 10:09 ` Nick Roberts
       [not found] ` <mailman.414.1189076872.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Roberts @ 2007-09-06 10:09 UTC (permalink / raw)
  To: Nordlöw; +Cc: help-gnu-emacs

Nordlöw writes:
 > When I try to run the new multi-frame/window GDB-interface and issue a
 > command in the gud terminal buffer my Emacs (daily CVS snapshot)
 > version hangs.

Is this from the trunk or the EMACS_22_BASE branch?  What is your
configuration? (M-x report-emacs-bug should provide these details.

 > The problem arises for vanilla Emacs, that is when I run "\emacs -q"
 > and then type M-x gdba and give the default argument "gdb --annotate=3
 > <prog>". It feels like it has something to do with gdb's inter-process-
 > communication since I can break it when I press C-g and my CPU-load is
 > zero during lookup. I have seen that the argument should be either
 > Emacs Info Manual says --annotate=3 but vanilla Emacs M-x gdba
 > defaults to gdb -annotate=3 <program>. I have tried both these
 > variants but none helps.

Perhaps it thinks GDB is running.  What's the value of gud-running?  Are
the tool-bar icons greyed out?  What's it say about status in the square
brackets of the mode line for the GUD buffer?  Do you have anything in a
.gdbinit file?  If yes, what happens if you run
"gdb -nx --annotate=3 <prog>"?

If things still fail please set gdb-enable-debug to t
(evaluate (setq gdb-enable-debug t)), do M-x gdb and start GDB then post
the value of gdb-debug-log to emacs-devel@gnu.org.

-- 
Nick                                           http://www.inet.net.nz/~nickrob

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

* Re: Multi-Frame/Window Debugging Problem
       [not found] ` <mailman.414.1189076872.18990.help-gnu-emacs@gnu.org>
@ 2007-09-11 12:00   ` Nordlöw
  2007-09-12  8:05     ` Nick Roberts
  0 siblings, 1 reply; 4+ messages in thread
From: Nordlöw @ 2007-09-11 12:00 UTC (permalink / raw)
  To: help-gnu-emacs

On 6 Sep, 12:09, Nick Roberts <nick...@snap.net.nz> wrote:
> Nordlöw writes:
>
>  > When I try to run the new multi-frame/window GDB-interface and issue a
>  > command in the gud terminal buffer my Emacs (daily CVS snapshot)
>  > version hangs.
>
> Is this from the trunk or the EMACS_22_BASE branch?  What is your
> configuration? (M-x report-emacs-bug should provide these details.
>
>  > The problem arises for vanilla Emacs, that is when I run "\emacs -q"
>  > and then type M-x gdba and give the default argument "gdb --annotate=3
>  > <prog>". It feels like it has something to do with gdb's inter-process-
>  > communication since I can break it when I press C-g and my CPU-load is
>  > zero during lookup. I have seen that the argument should be either
>  > Emacs Info Manual says --annotate=3 but vanilla Emacs M-x gdba
>  > defaults to gdb -annotate=3 <program>. I have tried both these
>  > variants but none helps.
>
> Perhaps it thinks GDB is running.  What's the value of gud-running?  Are
> the tool-bar icons greyed out?  What's it say about status in the square
> brackets of the mode line for the GUD buffer?  Do you have anything in a
> .gdbinit file?  If yes, what happens if you run
> "gdb -nx --annotate=3 <prog>"?
>
> If things still fail please set gdb-enable-debug to t
> (evaluate (setq gdb-enable-debug t)), do M-x gdb and start GDB then post
> the value of gdb-debug-log to emacs-de...@gnu.org.
>
> --
> Nick                                          http://www.inet.net.nz/~nickrob

Value of gud-running is nil. The tool-bar icons are *not* greyed out.

If I run "gdb -nx --annotate=3 <prog>" it works! Great!

I had previously changed my .gdbinit file to contain
set ann 1
because gdb-valgrind-integration rqeuired that then.
This seems to the source of my gdba-problem (as -nx overrides that).

Many Thanks for the brilliant help,
Nordlöw

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

* Re: Multi-Frame/Window Debugging Problem
  2007-09-11 12:00   ` Nordlöw
@ 2007-09-12  8:05     ` Nick Roberts
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Roberts @ 2007-09-12  8:05 UTC (permalink / raw)
  To: Nordlöw; +Cc: help-gnu-emacs

 > If I run "gdb -nx --annotate=3 <prog>" it works! Great!
 > 
 > I had previously changed my .gdbinit file to contain
 > set ann 1
 > because gdb-valgrind-integration rqeuired that then.
 > This seems to the source of my gdba-problem (as -nx overrides that).

The variable gdb-valgrind-integration isn't part of Emacs but if it relates to
something I posted several years ago, note that you actually needn't put
anything in .gdbinit for valgrind.  Just do:

Run gdb (like this): valgrind --db-attach=yes ~/myprog

and after you have attached to GDB, type:

(gdb) set ann 3
(gdb) frame

This is like starting with "gdb --annotate=3" and gives you the graphical
interface.  You can do "M-x gdb-many-windows" for the other buffers.  Use
"set ann 1" if you just want the old text command mode.

I was quite pleased when I first found out about this but I've not used
Valgrind much and it is only useful for memory violations.  I suspect
Valgrind is used more often to check for memory leaks.

At one time you could also use M-x compile to locate errors generated
non-interactively by valgrind:

2002-07-09  Ole Aamot  <ole@gnu.org>

	* compile.el (compilation-error-regexp-alist):
	Recognize Valgrind messages.

However, someone appears to have removed this from Emacs 22.1.  I'll have to
find out why.


-- 
Nick                                           http://www.inet.net.nz/~nickrob

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

end of thread, other threads:[~2007-09-12  8:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-05 14:15 Multi-Frame/Window Debugging Problem Nordlöw
2007-09-06 10:09 ` Nick Roberts
     [not found] ` <mailman.414.1189076872.18990.help-gnu-emacs@gnu.org>
2007-09-11 12:00   ` Nordlöw
2007-09-12  8:05     ` Nick Roberts

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.