emacs-devel
[Top][All Lists]
Advanced

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

Re: Debugging M-x gdb


From: Manuel Giraud
Subject: Re: Debugging M-x gdb
Date: Fri, 31 Mar 2023 10:09:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Sun, 26 Mar 2023 20:09:31 +0200
>> From:  Manuel Giraud via "Emacs development discussions." 
>> <emacs-devel@gnu.org>
>> I don't know if I should file a bug report for this so I'm trying here.
>> 
>> Whenever I try to debug Emacs with M-x gdb, I see the following
>> behaviour.  In the *gud-emacs* buffer, I enter "set args -Q" and then
>> "run"... then I exit the debugged Emacs and now the Emacs from where I
>> called (gdb) starts taking a full CPU.  I had to enter "quit" into the
>> *gud-emacs* buffer to stop this (return to normal CPU usage).
>> 
>> I'd really like to debug this issue but don't really where to start.  I
>> have tried to profile-start/profile-report but I don't get much clue out
>> of it.  How could I proceed?
>
> Are you sure it's Emacs that consumes high CPU, and not GDB? what does
> 'top' or similar command says about which process consumes CPU?

Hi Eli,

I finally had time to test this.  So yes, it is the emacs process (I
looked with M-x proced) that takes up to 95% of one CPU.

> If it's indeed Emacs, then when Emacs starts consuming high CPU,
> attach GDB to it, then type this:
>
>   (gdb) source /path/to/emacs/src/.gdbinit
>   (gdb) thread apply all bt

I've tried this recipe (all Emacs with -Q) but "thread apply all bt"
does not produce any output.

> and post everything this produces with a bug report sent via
> report-emacs-bug.
>
> Thanks.
>
> P.S. In which Emacs version does that happen, and with which version
> of GDB?

I've just tested it with a the main branch head for Emacs and GDB is
version 9.2.

Thanks.
-- 
Manuel Giraud



reply via email to

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