all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: emacs-devel@gnu.org
Subject: Re: Debugging M-x gdb
Date: Sun, 26 Mar 2023 21:23:57 +0300	[thread overview]
Message-ID: <83ilen9xs2.fsf@gnu.org> (raw)
In-Reply-To: <871qlbfkpw.fsf@ledu-giraud.fr> (emacs-devel@gnu.org)

> 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?

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

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?



  reply	other threads:[~2023-03-26 18:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26 18:09 Debugging M-x gdb Manuel Giraud via Emacs development discussions.
2023-03-26 18:23 ` Eli Zaretskii [this message]
2023-03-31  8:09   ` Manuel Giraud via Emacs development discussions.
2023-03-31 10:55     ` Eli Zaretskii
2023-03-31 13:58       ` Manuel Giraud via Emacs development discussions.
2023-03-31 14:28         ` Eli Zaretskii
2023-03-31 17:25           ` Manuel Giraud via Emacs development discussions.
2023-03-31 18:04             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ilen9xs2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=manuel@ledu-giraud.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.