[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs and Gud
From: |
Chris Gordon-Smith |
Subject: |
Re: Emacs and Gud |
Date: |
Tue, 08 Jan 2008 23:27:54 +0000 |
User-agent: |
KNode/0.10.4 |
Nick Roberts wrote:
> > If I run GUD with --annotate=1 then I gat the basic two buffer
> > debugging, and this works OK within an ECB environment.
> >
> > With --annotate=2 or --annotate=3, GUD doesn't work properly with ECB.
> > I get messages like:-
> >
> > "error in process filter; Window height 2 too small (after splitting)"
>
> Both ECB and gdb-ui (the graphical part of GUD) use something called
> dedicated windows. This means that they're protective over their
> window configuration and won't let other buffers display in their windows.
>
> > Sometimes it partly works, but usually the GUD menu disappears and so
> > do most of the debug windows. There seems to be no way to get them
> > back.
>
> Maybe 'C-x 5 2' (opens a new frame) followed by M-x gdb-many-windows in
> the new frame will work
>
> > If I deactivate ECB before I start GDB, then both --annotate=2 and
> > annotate=3 work fine.
> >
> > Incidentally, I have set gud-gdb-command-name to
> > gdb --annotate=3
> > /home/chris/mydata/Projects/SimSoup/simsoup-cpp/simsoup/simsoup
> >
> > I mainly use ECB for programming, and I think that while it would be
> > nice to have it available while debugging, it is workable without.
> >
> > Any thoughts on how to get ECB and GUD working together would however
> > be welcome.
>
> I think there will always be conflicts without a major redesign. ECB
> isn't
> part of Emacs and I've never really used it. Ideally ECB would be
> integrated into Emacs but that would be a lot of work and I don't think
> it's going to happed anytime soon.
>
> If simsoup is a large program and you really need a project based
> development
> environment you may be better off using Eclipse with CDT. I guess I
> shouldn't really be saying that on help-gnu-emacs and you will have to
> recommend the use of GDB in Emacs to others as a daily pennance!
>
Thanks for your comments. Regarding IDEs such as Eclipse, I have been using
KDevelop for several years. I have found it very good, but want to try
Emacs. Reasons for this include:-
* I want to take control of the Build / Make process. IDEs like KDevelop
and Eclipse tend to do this for you. That is very useful, but I now need to
control it myself. (I am using Makefiles to enforce separation of
subsystems by using CFLAGS to determine which include files a subsystem has
access to.)
* More generally I want to get closer to the Linux programming
environment. Again, an IDE tends to shield one from this
* I want to understand why Emacs has such a legendary reputation!
So far I have been pleasantly surprised by Emacs. One thing I like is the
ability to switch easily between buffers. KDevelop opens up all of the
files for a project, which makes switching more difficult since so many
files are open. In practice you have to go via the code browser each time.
I see a code browser as essential, and would not consider using Emacs
without something like ECB. Now that I also have GDB working (although with
the minor drawback that if I want its full functionality I have to
deactivate ECB), I have a good development environment based on Emacs.
Its taking a while to get used to the editing style, but there are a number
of aspects I like. I seem to be able to get more on a screen, and I like
the fact that everything is configurable. For example, I have configured
Emacs to disregard mouse wheel clicks within 0.5 seconds of scrolling. This
means that I don't accidentally paste (yank) text into a file while
scrolling. This is very annoying in KDevelop.
Perhaps I will go back to KDevelop one day, or perhaps not. For the moment I
am enjoying using Emacs and getting to know the powerful features that it
has.
I have also tried Eclipse / CDE. It looks good, but as mentioned above, I
want to get away (at least for a while) from an environment that tends to
shield one from the underlying operating system and programming
environment. I want to get 'close to the bare metal'.
One other thing about Emacs; by comparison with KDevelop and Eclipse its
more responsive.
One thing with Emacs I want to look at is syntax highlighting. Its working,
but I haven't yet figured out how to control all of the options.
Chris Gordon-Smith
London
www.simsoup.info