From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dov Grobgeld Newsgroups: gmane.emacs.bugs Subject: bug#10580: 24.0.92; gdb initialization takes more than one minute at 100% CPU Date: Wed, 9 May 2012 11:44:32 +0300 Message-ID: References: <87aa1mj69x.fsf@gnu.org> <87havtvpeb.fsf@gnu.org> <874nrsem67.fsf@gnu.org> <874nrswme9.fsf@gnu.org> <87zk9kv75l.fsf@gnu.org> <87mx5j6pqs.fsf@gnu.org> <877gwm3ajn.fsf@gnu.org> <83txzq1s4y.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8ff2563219a17604bf96831b X-Trace: dough.gmane.org 1336553107 25506 80.91.229.3 (9 May 2012 08:45:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 May 2012 08:45:07 +0000 (UTC) Cc: Chong Yidong , 10580@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 09 10:45:06 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SS2W7-0000tw-V3 for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 May 2012 10:45:04 +0200 Original-Received: from localhost ([::1]:51547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SS2W6-0004vm-PN for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 May 2012 04:45:02 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SS2W0-0004vO-Mo for bug-gnu-emacs@gnu.org; Wed, 09 May 2012 04:45:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SS2Vv-0001YJ-Oy for bug-gnu-emacs@gnu.org; Wed, 09 May 2012 04:44:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SS2Vv-0001YE-It for bug-gnu-emacs@gnu.org; Wed, 09 May 2012 04:44:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SS2Y2-0004Ft-5J for bug-gnu-emacs@gnu.org; Wed, 09 May 2012 04:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dov Grobgeld Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 May 2012 08:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10580 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10580-submit@debbugs.gnu.org id=B10580.133655321216342 (code B ref 10580); Wed, 09 May 2012 08:47:01 +0000 Original-Received: (at 10580) by debbugs.gnu.org; 9 May 2012 08:46:52 +0000 Original-Received: from localhost ([127.0.0.1]:42202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SS2Xr-0004FW-HE for submit@debbugs.gnu.org; Wed, 09 May 2012 04:46:52 -0400 Original-Received: from mail-ob0-f172.google.com ([209.85.214.172]:65175) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SS2Xp-0004FI-4c for 10580@debbugs.gnu.org; Wed, 09 May 2012 04:46:50 -0400 Original-Received: by obbeh20 with SMTP id eh20so32391obb.3 for <10580@debbugs.gnu.org>; Wed, 09 May 2012 01:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=t5Ub+COp99vGEKQL59SemF9bAk8dtTlg5AV2ooyiFDg=; b=biraPbnn0LTSBjn9Nu0mKFIj8pGjElud9ctpMZUAdBT6zlKdeCYeJCF6cEqQcPuUli nK6M1KNFpNBWmJD/GTpEUJQkG0pZb8Hdnz58WhmveIX8kBPyoQUfeE6We4rsz29Vvmj6 9bH7Rxjtg3S2e8lmY2tOy5t8w7X+g2YYWjZNNY7wzI5G1MbNKxQzpZCZmgiAnd2/c83s q7TlLDP10ffC+1w02HuxrFl2RCJnmAGxXx2zmdIJXCzNMatOPzKxMfk4GD7L3XiiB9Pn nUjoC1BOtq6dSDT2HOFyG8AKcydTv3mpxzUTgfnrV+Z1SchMJ8RBgWPrHO87/MEEa1qD o0JA== Original-Received: by 10.60.29.39 with SMTP id g7mr8086383oeh.6.1336553072337; Wed, 09 May 2012 01:44:32 -0700 (PDT) Original-Received: by 10.182.60.137 with HTTP; Wed, 9 May 2012 01:44:32 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59884 Archived-At: --e89a8ff2563219a17604bf96831b Content-Type: text/plain; charset=UTF-8 Yes, sorry. I discovered that I looked at an old version. The latest git version indeed allows disabling the -file-list-exec-source-files. I will use that option which indeed is a work around for the problem. In addition, I filed a bug for gdb that it should uniq the filenames output by -file-list-exec-source-files. I realized that all filelist-exec-source-files is used for is to turn on gdb minor mode for all files that are currently open in emacs. Perhaps we should turn the problem around by asking for a gdb function that answers the question whether a file is referenced by an executable. It would then be possible to loop over the emacs buffers and turn on gdb minor mode if the file is referenced by the new gdb session. Regards, Dov On Wed, May 9, 2012 at 10:47 AM, Andreas Schwab wrote: > Dov Grobgeld writes: > > > I first that at first too, but then I realized that it doesn't do it. The > > gdb-mi.el source has the following logic. > > > > (gdb-input > > ; Needs GDB 6.2 onwards. > > (list "-file-list-exec-source-files" 'gdb-get-source-file-list)) > > (if gdb-create-source-file-list > > (gdb-input > > ; Needs GDB 6.0 onwards. > > (list "-file-list-exec-source-file" 'gdb-get-source-file))) > > You are looking at a very old version of gdb-mi.el. > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 > "And now for something completely different." > --e89a8ff2563219a17604bf96831b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, sorry. I di= scovered that I looked at an old version. The latest git version indeed all= ows disabling the -file-list-exec-source-files. I will use that option whic= h indeed is a work around for the problem.

In addition, I filed a bug for gdb that it should uniq the filenames ou= tput by -file-list-exec-source-files.

I realized that all filelist-= exec-source-files is used for is to turn on gdb minor mode for all files th= at are currently open in emacs. Perhaps we should turn the problem around b= y asking for a gdb function that answers the question whether a file is ref= erenced by an executable. It would then be possible to loop over the emacs = buffers and turn on gdb minor mode if the file is referenced by the new gdb= session.

Regards,
Dov

On Wed, May 9,= 2012 at 10:47 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
Dov Grobgeld <dov.grobgeld@gmail.com> writes:
> I first that at first too, but then I realized that it doesn't do = it. The
> gdb-mi.el source has the following logic.
>
> =C2=A0 (gdb-input
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ; Nee= ds GDB 6.2 onwards.
> =C2=A0 =C2=A0(list "-file-list-exec-source-files" 'gdb-g= et-source-file-list))
> =C2=A0 (if gdb-create-source-file-list
> =C2=A0 =C2=A0 =C2=A0 (gdb-input
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ; Nee= ds GDB 6.0 onwards.
> =C2=A0 =C2=A0 =C2=A0 =C2=A0(list "-file-list-exec-source-file&quo= t; 'gdb-get-source-file)))

You are looking at a very old version of gdb-mi.el.

Andreas.

--
Andreas Schwab, schwab@linux-m68k.= org
GPG Key fingerprint =3D 58CA 54C7 6D53 942B 1756 =C2=A001D3 44D5 214B 8276 = 4ED5
"And now for something completely different."

--e89a8ff2563219a17604bf96831b--