From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Debugging M-x gdb Date: Sun, 26 Mar 2023 21:23:57 +0300 Message-ID: <83ilen9xs2.fsf@gnu.org> References: <871qlbfkpw.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36678"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Manuel Giraud Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 26 20:24:30 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pgV2c-0009HQ-1s for ged-emacs-devel@m.gmane-mx.org; Sun, 26 Mar 2023 20:24:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgV27-0003VT-Se; Sun, 26 Mar 2023 14:23:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgV26-0003VI-6v for emacs-devel@gnu.org; Sun, 26 Mar 2023 14:23:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgV25-0007BP-M4; Sun, 26 Mar 2023 14:23:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8M0hhQPivalFqaY6SihA+FSdTXg8teuV1M3VCUniVIM=; b=HVmGcHnEpINx sEctsnAqx0fz8VuttROUaoHsF7w5thb2DAF4aWQFfXhZ2rJBTcrghg7NH/f8OfFzEwrUBaL/4u68Q 212CyFQRGrWHd5X69jT1CO5mSjOhAV2sUXg3KfWWscGXNT1/yjAOF1rlpXN/HAgEnp7XvufPOtrHz gWuaaGvyKrwV3LB2HwOi0JdWf8McbIceXneTzQoqCFx5hSqRCjvNXzx2T5WA5fsW72UK5DxNep7Xa bvqCoXYFFs5dmMnCOywO8gIcXOvTV08fYcMzhJyW1/ui+Ln3LRKiP/YsjdC2REwB40PUFHOziyXd4 e+CJ2BR83+MhpqOPqLLN1g==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgV25-0005XW-5N; Sun, 26 Mar 2023 14:23:57 -0400 In-Reply-To: <871qlbfkpw.fsf@ledu-giraud.fr> (emacs-devel@gnu.org) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304776 Archived-At: > Date: Sun, 26 Mar 2023 20:09:31 +0200 > From: Manuel Giraud via "Emacs development discussions." > 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?