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

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

bug#10580: 24.0.92; gdb initialization takes more than one minute at 100


From: Chong Yidong
Subject: bug#10580: 24.0.92; gdb initialization takes more than one minute at 100% CPU
Date: Mon, 07 May 2012 14:11:42 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.96 (gnu/linux)

Dov Grobgeld <dov.grobgeld@gmail.com> writes:

> I put breakpoints at the lines that you indicated, but as you
> suspected, the breakpoints are only reached when I exit gdb with the
> "quit" command.
>
> What's next? Thanks again for looking into this.

Please apply the following patch, then, when Emacs is taking 100% CPU,
set a breakpoint at process.c:4854, i.e. at

                if (p->pid == -2)
                  ;

This captures the state just after Emacs calls read_process_output on
the pty passed to your program.  If this breakpoint is triggered, please
report the value of nread and errno, and step through to the end of the
subsequent if/else block and report the gdb session.  Thanks.


=== modified file 'src/process.c'
*** src/process.c       2012-04-20 06:39:29 +0000
--- src/process.c       2012-05-07 06:09:25 +0000
***************
*** 4847,4852 ****
--- 4847,4859 ----
                 buffered-ahead character if we have one.  */
  
              nread = read_process_output (proc, channel);
+ 
+             {
+               struct Lisp_Process *p = XPROCESS (proc);
+               if (p->pid == -2)
+                 ;
+             }
+ 
              if (nread > 0)
                {
                  /* Since read_process_output can run a filter,






reply via email to

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