[Top][All Lists]

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

Re: M-x compile gets progressively slower when using emacs with gdb

From: Nicolas Bock
Subject: Re: M-x compile gets progressively slower when using emacs with gdb
Date: Wed, 28 Feb 2001 07:55:28 -0500 (EST)


I started emacs with the -q and --no-site options and then loaded this file
into a buffer:

#include <iostream.h>
#include <math.h>

const double pi = 4 * atan(1);

int main () {

  cout << "main: starting test." << endl;
  for (int i = 0; i < 1000; i++) {
    double temp = sin(2 * pi * i);
    cout << i << "  " << temp << endl;
  cout << "main: end." << endl;

  ;;; Local Variables: ***
  ;;; compile-command: "g++ test.cpp -Wall -g" ***
  ;;; End: ***

To compile I typed M-x compile which gave me the "g++ test.cpp -Wall -g"
command in the minibuffer and I just hit return to compile. Then I launched
the debugger with M-x gdb in another buffer and I switched to the gdb buffer.
There I typed

file a.out
break main
display temp
display i

After i == 20 I switched buffers and recompiled the program, without changing
it, with M-x compile and <RETURN>. Then I switched back to the debugger buffer
and typed

The program being debugged has been started already.
Start it from the beginning? (y or n) y
display temp
display i

and stepped through it just like I described above with "n". Again, at i == 20
I switched back to the program buffer and recompiled with M-x compile and
<RETURN> and went back to the debugger to run the program again. After I do
this cycling about 5 times it becomes noticable that M-x compile waits longer
and longer to display the compile command in the minibuffer window.

I hope that this helps in determining what the problem is,



reply via email to

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