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: Fri, 31 Mar 2023 13:55:38 +0300 Message-ID: <83edp52nrp.fsf@gnu.org> References: <871qlbfkpw.fsf@ledu-giraud.fr> <83ilen9xs2.fsf@gnu.org> <87jzyx5ol8.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22937"; 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 Fri Mar 31 12:56:28 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 1piCQl-0005lW-NI for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Mar 2023 12:56:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1piCQB-0001s4-Vz; Fri, 31 Mar 2023 06:55:52 -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 1piCQ1-0001rh-LY for emacs-devel@gnu.org; Fri, 31 Mar 2023 06:55:41 -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 1piCQ1-0000d6-Az; Fri, 31 Mar 2023 06:55:41 -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=q7eDadHiYfGWUCjmGSa2XTkGtPxwC2BG2iu1QBvxKjI=; b=Z5xKCzgyyrEp 3BNikfN+zYcux6fgkfsXF9IkrBg6BmUP7UiD5xU4VpM43Piyofpr9IhGGJuPPdnqg9sZrsYkZvuj3 vD+Fx70gt0GxNEfkTHWDg1z+BcNoHNTCDfigfRVF4RaHKsWX+KlAxMFiLkboNrd+6r/Y7yRK7EEHE 4jGXD77jZqupWyO/S1IzA7X4UkIQJWs9AzW0CrQAyD9DJ1i16qpbzQWOGda1o+Pc04QZ0EQsE/06c wtEk/y/Gmce0kF1648jpEz5yCY0wvYCsh6irjTKCy+n6So+a3ssUQ//ajIiOTT050EnfxPQz5Swla WlK/q3Ac3urmMeGIPRx20w==; 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 1piCPk-0006dZ-IN; Fri, 31 Mar 2023 06:55:41 -0400 In-Reply-To: <87jzyx5ol8.fsf@ledu-giraud.fr> (message from Manuel Giraud on Fri, 31 Mar 2023 10:09:39 +0200) 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:304905 Archived-At: > From: Manuel Giraud > Cc: emacs-devel@gnu.org > Date: Fri, 31 Mar 2023 10:09:39 +0200 > > > 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. Doesn't produce any output after attaching GDB to the Emacs process which consumes CPU? That's not possible. Please show all the commands you did, starting from invoking Emacs that will later consume CPU, including commands inside Emacs and outside it. Note that the GDB you attach to Emacs should be a new GDB process, not the one you ran inside Emacs.