help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-Frame/Window Debugging Problem


From: Nick Roberts
Subject: Re: Multi-Frame/Window Debugging Problem
Date: Wed, 12 Sep 2007 20:05:40 +1200

 > 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]