From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steve Revilak Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#5404: 23.1.91; Nextstep port: M-x gdb hangs in tab completion of symbols Date: Sun, 17 Jan 2010 09:25:34 -0500 Message-ID: <20100117142534.GB372@srevilak.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IrhDeMKUP4DT/M7F" X-Trace: ger.gmane.org 1263739193 28227 80.91.229.12 (17 Jan 2010 14:39:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Jan 2010 14:39:53 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 17 15:39:46 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NWWI4-0004mE-Lj for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Jan 2010 15:39:45 +0100 Original-Received: from localhost ([127.0.0.1]:37390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWWI5-0008Pz-F3 for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Jan 2010 09:39:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWWHk-0008Gh-OV for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:39:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWWHf-0008Cq-IM for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:39:24 -0500 Original-Received: from [199.232.76.173] (port=41735 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWWHe-0008Ce-Tw for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:39:18 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44743) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NWWHe-0003lL-Dj for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:39:18 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NWWGQ-0000xd-BL; Sun, 17 Jan 2010 09:38:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Mail-Followup-To: Steve Revilak , 5404@debbugs.gnu.org Resent-From: Steve Revilak Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Jan 2010 14:38:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5404 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.12637390703681 (code B ref -1); Sun, 17 Jan 2010 14:38:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Jan 2010 14:37:50 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWWGC-0000xK-ML for submit@debbugs.gnu.org; Sun, 17 Jan 2010 09:37:49 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWW4c-0000mT-Nm for submit@debbugs.gnu.org; Sun, 17 Jan 2010 09:25:51 -0500 Original-Received: from mail.gnu.org ([199.232.76.166]:55248 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWW4X-0002F1-QD for emacs-pretest-bug@gnu.org; Sun, 17 Jan 2010 09:25:46 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NWW4T-00055z-7g for emacs-pretest-bug@gnu.org; Sun, 17 Jan 2010 09:25:45 -0500 Original-Received: from mail8.sea5.speakeasy.net ([69.17.117.10]:45832) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NWW4S-00054V-Ez for emacs-pretest-bug@gnu.org; Sun, 17 Jan 2010 09:25:41 -0500 Original-Received: (qmail 28214 invoked from network); 17 Jan 2010 14:25:37 -0000 Original-Received: from pool-96-233-67-66.bstnma.fios.verizon.net (HELO srevilak.net) (srevilak@[96.233.67.66]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 17 Jan 2010 14:25:36 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.4 (----) X-Mailman-Approved-At: Sun, 17 Jan 2010 09:37:48 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -4.6 (----) Resent-Date: Sun, 17 Jan 2010 09:38:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34416 gmane.emacs.pretest.bugs:25391 Archived-At: --IrhDeMKUP4DT/M7F Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing lis= t, and to the gnu.emacs.bug news group. Please describe exactly what actions triggered the bug and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': I'd like to report a problem with M-x gdb in the Nextstep port of emacs 23.1.91. When gud mode is started with M-x gdb, tab completion of symbols (i.e., gud-gdb-complete-command) causes emacs to hang. The release announcement for emacs 23.1.91 noted a major change in M-x gdb () and this seems to be new behavior in 23.1.91. Steps To Reproduce ------------------ 1) Start with foo.c --------------------------------- #include static int add_one(int x) { return (x + 1); } int main(void) { int y =3D add_one(3); printf("%d\n", y); return 0; } --------------------------------- 2) Compile foo.c $ make CFLAGS=3D"-g -Wall" foo =20 cc -g -Wall foo.c -o foo 3) Start emacs with the command line /Applications/Emacs.app/Contents/MacOS/Emacs -Q -nw foo.c Above, "-nw" isn't necessary for reproducing this behavior. -nw just makes it easier to capture what emacs is displaying. 4) Type M-x gdb RET Emacs responds with "Run gdb (like this): gdb --annotate=3D3 foo". Press RET to accept the gdb command line. 5) Emacs creates a *gud-foo* buffer, whose initial contents are --------------------------------- Current directory is ~/ GNU gdb 6.3.50-20050815 (Apple version gdb-696) (Sat Oct 20 18:20:28 GMT 20= 07) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-darwin"... warning: --arch option not supported in this gdb. Reading symbols for shared libraries .. done (gdb)=20 --------------------------------- 6) At the (gdb) prompt, type "b add_", then TAB 7) After pressing TAB, emacs becomes unresponsive. Emacs stays unresponsive until Ctrl-G is pressed. Observations from edebug ------------------------ I've used M-x edebug-defun to instrument different functions in gud.el, so that I could step through them with emacs debugger. =20 Emacs seems to hang when evaluating the expression (get-buffer-process gud-comint-buffer) in line 981 of gud.el. This line is part of defun gud-gdb-run-command-fetch-lines. Observations from gdb --------------------- While emacs was hung (i.e., after completing step 7, above), I attached a debugger to emacs. Here is a backtrace: (0:0)spud:srevilak$ gdb /Applications/Emacs.app/Contents/MacOS/Emacs GNU gdb 6.3.50-20050815 (Apple version gdb-696) (Sat Oct 20 18:20:28 GMT 20= 07) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-darwin"... warning: --arch option not supported in this gdb. Reading symbols for shared libraries .... done (gdb) attach 606 Attaching to program: `/Applications/Emacs.app/Contents/MacOS/Emacs', proce= ss 606. Reading symbols for shared libraries ......................................= =2E............................ done 0x9001f488 in select () (gdb) info threads * 1 process 606 thread 0xd03 0x9001f488 in select () (gdb) bt #0 0x9001f488 in select () #1 0x0015a2d8 in wait_reading_process_output (time_limit=3D0, microsecs=3D= 0, read_kbd=3D0, do_display=3D0, wait_for_cell=3D41944074, wait_proc=3D0xa8= f320, just_wait_proc=3D0) at process.c:4941 #2 0x0015c00c in Faccept_process_output (process=3D11072293, seconds=3D4, = millisec=3D-1073750304, just_this_one=3D41944074) at process.c:4323 #3 0x00112eac in Ffuncall (nargs=3D4, args=3D0xbfffe250) at eval.c:3025 #4 0x001505bc in Fbyte_code (bytestr=3D48, vector=3D-1073749248, maxdepth= =3D40) at bytecode.c:679 #5 0x00112a5c in funcall_lambda (fun=3D10653413, nargs=3D3, arg_vector=3D0= xbfffe504) at eval.c:3202 #6 0x00112ffc in Ffuncall (nargs=3D4, args=3D0x48c17ca) at eval.c:3072 #7 0x001505bc in Fbyte_code (bytestr=3D48, vector=3D-1073748736, maxdepth= =3D20) at bytecode.c:679 #8 0x00112a5c in funcall_lambda (fun=3D10652229, nargs=3D0, arg_vector=3D0= xbfffe72c) at eval.c:3202 #9 0x00112ffc in Ffuncall (nargs=3D4, args=3D0x48c176a) at eval.c:3072 #10 0x00113b90 in apply1 (fn=3D76289898, arg=3D3906012) at eval.c:2756 #11 0x0010ddbc in Fcall_interactively (function=3D76289898, record_flag=3D4= 1944074, keys=3D22028253) at callint.c:396 #12 0x00112e88 in Ffuncall (nargs=3D4, args=3D0xbfffe91c) at eval.c:3021 #13 0x00113188 in call3 (fn=3D4, arg1=3D-1073750304, arg2=3D0, arg3=3D0) at= eval.c:2841 #14 0x000ab524 in command_loop_1 () at keyboard.c:1904 #15 0x0010ff68 in internal_condition_case (bfun=3D0xaa160 ,= handlers=3D41978570, hfun=3D0xa1fd0 ) at eval.c:1490 #16 0x0009a8a0 in command_loop_2 () at keyboard.c:1360 #17 0x0010fdf0 in internal_catch (tag=3D4, func=3D0x9a860 ,= arg=3D41944074) at eval.c:1226 #18 0x0009a550 in command_loop () at keyboard.c:1339 #19 0x0009a678 in recursive_edit_1 () at keyboard.c:954 #20 0x0009a804 in Frecursive_edit () at keyboard.c:1016 #21 0x00099e44 in main (argc=3D400, argv=3D0xbffff560) at emacs.c:1833 (gdb) up 1 #1 0x0015a2d8 in wait_reading_process_output (time_limit=3D0, microsecs=3D= 0, read_kbd=3D0, do_display=3D0, wait_for_cell=3D41944074, wait_proc=3D0xa8= f320, just_wait_proc=3D0) at process.c:4941 4941 nfds =3D ns_select (gdb) info locals timeout_reduced_for_timers =3D 0 channel =3D 22035053 nfds =3D 0 Available =3D { fds_bits =3D {64, 0 } } Connecting =3D { fds_bits =3D {0 } } check_connect =3D 0 check_delay =3D 0 no_avail =3D 0 xerrno =3D 0 proc =3D -1 timeout =3D { tv_sec =3D 100000,=20 tv_usec =3D 0 } end_time =3D { tv_sec =3D 1462952,=20 tv_usec =3D 3680068 } wait_channel =3D 6 got_some_input =3D 0 count =3D 17 (gdb) l 4936 } 4937 #endif 4938 #if defined (USE_GTK) || defined (HAVE_GCONF) 4939 nfds =3D xg_select 4940 #elif defined (HAVE_NS) 4941 nfds =3D ns_select 4942 #else 4943 nfds =3D select 4944 #endif 4945 (max (max (max_process_desc, max_keyboard_d= esc), (gdb) Systems where this behavior occurs ---------------------------------- I've observed this behavior on two systems (a) Mac OS X 10.4.11 GNU Emacs 23.1.91.2 (powerpc-apple-darwin8.11.0, NS apple-appkit-824.= 48)=20 of 2010-01-13 $ gdb --version GNU gdb 6.3.50-20050815 (Apple version gdb-696) (Sat Oct 20 18:20:28 GMT 20= 07) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-darwin". $ gcc --version powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 537= 0) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. (b) Mac OS X 10.6.2 GNU Emacs 23.1.91.2 (x86_64-apple-darwin10.2.0, NS apple-appkit-1038.= 25)=20 of 2010-01-11 $ gdb --version GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2= 009) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin". $ gcc --version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * * If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /Applications/Emacs.app/Contents/Resources/etc/DEBUG. In GNU Emacs 23.1.91.2 (powerpc-apple-darwin8.11.0, NS apple-appkit-824.48) of 2010-01-13 on spud.local Windowing system distributor `Apple', version 10.3.824 configured using `configure '--with-ns'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Debugger Minor modes in effect: shell-dirtrack-mode: t display-time-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t Recent input: =20 =20 =20 =20 M-x C-g C-g C-h f C-x o =20 =20 =20 =20 =20 =20 M-x e d b u=20 e d e =20 C-x b b _ SPC a d d SPC=20 SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC=20 SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC=20 SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC C-g C-x=20 o C-g C-g C-g C-g C-g C-x=20 b C-g C-g C-x C-b C-x k M-x g d b =20 b SPC a d d _ SPC C-x o C-g C-x o q=20 b n b SPC a d d _ =20 SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC=20 SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC=20 SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC C-g=20 =20 =20 =20 =20 C-x o C-g C-g M-x=20 r e p o r t - e m Recent messages: Result: nil [2 times] Result: t [3 times] Result: # Result: # Quit [3 times] Quit Load-path shadows: None found. Features: (shadow sort mail-extr message ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug debug mule-util edebug jka-compr find-func help-mode view log-edit pcvs-util add-log gdb-ui byte-opt bytecomp byte-compile advice help-fns advice-preload bindat json gud ansi-color cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs multi-isearch skeleton reftex-parse reftex-ref vc vc-dispatcher supercite easy-mmode sendmail regi reftex-vcr reftex-dcr reftex reftex-vars tex-mode shell latexenc vc-rcs conf-mode newcomment grep compile comint ring dired bbdb-autoloads bbdb regexp-opt timezone server paren time tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) --IrhDeMKUP4DT/M7F Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (Darwin) iEYEARECAAYFAktTHd4ACgkQX7YJI4BuyDTxagCfZX2mxf8ZNarrSylNr/JXWH6R OBAAnRFPFHXrmfu//L1AjcBaJzUKDYdk =Hftq -----END PGP SIGNATURE----- --IrhDeMKUP4DT/M7F--