From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Guilhem Bichot Newsgroups: gmane.emacs.bugs Subject: bug#23720: 25.0.94; Issues with GUD (gdb-mi) after upgrade from Emacs 23 to 24/25 Date: Tue, 7 Jun 2016 11:30:06 +0200 Message-ID: <5756941E.3000700@oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1465313682 9459 80.91.229.3 (7 Jun 2016 15:34:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jun 2016 15:34:42 +0000 (UTC) To: 23720@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 07 17:34:28 2016 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 1bAJ1P-00022y-GZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jun 2016 17:34:27 +0200 Original-Received: from localhost ([::1]:51028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAJ1O-0006KU-VY for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jun 2016 11:34:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAJ13-00068b-NF for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2016 11:34:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAJ10-0000ix-C5 for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2016 11:34:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAJ10-0000iq-8F for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2016 11:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bAJ0z-0001br-W0 for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2016 11:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Guilhem Bichot Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jun 2016 15:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23720 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14653135926102 (code B ref -1); Tue, 07 Jun 2016 15:34:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Jun 2016 15:33:12 +0000 Original-Received: from localhost ([127.0.0.1]:58886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAJ0A-0001aL-Jy for submit@debbugs.gnu.org; Tue, 07 Jun 2016 11:33:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bADLE-0007Ph-Uk for submit@debbugs.gnu.org; Tue, 07 Jun 2016 05:30:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bADL8-00044c-2o for submit@debbugs.gnu.org; Tue, 07 Jun 2016 05:30:27 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bADL8-000444-01 for submit@debbugs.gnu.org; Tue, 07 Jun 2016 05:30:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bADL5-00083t-54 for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2016 05:30:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bADL0-00042m-2q for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2016 05:30:23 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:44535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bADKz-00042F-Pt for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2016 05:30:18 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u579UFt5030728 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 Jun 2016 09:30:15 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u579UFM1015876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 Jun 2016 09:30:15 GMT Original-Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u579UEqq026745 for ; Tue, 7 Jun 2016 09:30:14 GMT Original-Received: from [192.168.1.12] (/83.200.206.130) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 07 Jun 2016 02:30:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Tue, 07 Jun 2016 11:33:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:119213 Archived-At: Hello. [ Thank you for all the work on Emacs, it so much helps my daily work ] I'm debugging the MySQL Server with "M-x gdb". Works great in Emacs23, for years. But it seems to break with upgrade to 24 (package of Ubuntu 15.10), and similarly in 25 pretest built-from-source. Here is my experience today with emacs 25; it's been consistently my experience for the last months, and a colleague has seen this too. Using "emacs -Q". M-x gdb, then I chdir to the directory where MySQL is, then "file ./mysqld". Using all-stop mode (that is the default choice). After issuing the "run" command, MySQL is waiting for client connections. Ok so far. ISSUE 1: STOPPING ================= STOP button doesn't stop (prints "command: -exec-interrupt") Menu Signals->STOP doesn't stop. C-c C-z doesn't stop. (In Emacs23 the STOP button did stop and it was sending SIGINT) Menu Signals->Break, or C-c C-c, stop properly. Suggestion: make the STOP button do as Signals->Break does (=send SIGINT), and like it did in emacs23. Perhaps another factor is MySQL ignoring STOP, but I don't think so, as doing 'kill -STOP' to the PID of mysql, in a shell, does stop it (but then it's hell to resume it, have to press "continue" for tens of times, perhaps because it has tens of threads). ISSUE 2: FRAMES MOVING AROUND ============================= After a "c"(continue) above, now MySQL is resumed, waiting for client connections. I wish to set a breakpoint. I do C-c C-c to interrupt, then in the menu Gud->gdb-mi->"display other windows": screen gets split in 6 frames (ok). All frames show the same gdb output. In the middle left frame, I open a source file (C-x C-f). I click in the left fringe near a code line: no breakpoint gets set alas. I put cursor on that line, press C-x SPC: prints "mark set (rectangle mode)"; doesn't set breakpoint either. (Both techniques worked in emacs23.) When putting the cursor in the source file, GUD-specific menu is replaced by ordinary menu; like if GUD wasn't considering this file. However, C-x C-a C-b sets breakpoint. After the breakpoint is set, I type "c". Run a MySQL query, gdb stops at breakpoint. Then, clicking on left fringe near a code line in the same source file, few lines below the breakpoint, sets a breakpoint: unlike at the first try above, it works. Like if GUD was now considering the file, now that it has broken into it? MySQL is stopped at the breakpoint. I click the "step line" button: as this stepping leads to another function in another source file, that other source file is opened (fine) but in the "breakpoints" frame (bottom right frame); this has the effect that: - breakpoints list is invisible - I'm always scanning through frames with my eyes to find where the execution pointer is now. (In Emacs23, the new file just replaces the old file. And when stepping out later, the old file would replace the new file). I do "restore window layout" which properly restores the "breakpoints" list in its frame, and puts the stepped-in file in the middle left. It's a workaround, but it's tedious as I have to do it frequently. ISSUE 3: STEPPING OUT DOESN'T PRINT RETURN VALUE ================================================ The program is in the stepped-in function, clicking "Step out" steps out of it, but this doesn't print the returned value. Emacs23 prints it ("Value returned is $1 = false"). After "c" the query finishes. I send the same query again, but this time the issue 2 doesn't happen anymore (i.e. the stepped-in source file is displayed where it should, replacing the old file, and not in the "breakpoints" frame). Using "GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10" Sames issues with "GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.16.6) of 2015-09-17 on lgw01-52, modified by Debian" As workaround, I'm currently using a built-from-source 23.4.1 which works fine. In GNU Emacs 25.0.94.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars) of 2016-06-07 built on t3500 Windowing system distributor 'The X.Org Foundation', version 11.0.11702000 System Description: Ubuntu 15.10 Configured features: XPM JPEG TIFF GIF PNG SOUND NOTIFY ZLIB TOOLKIT_SCROLL_BARS LUCID X11 Important settings: value of $LANG: fr_FR.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Debugger Minor modes in effect: gdb-many-windows: t diff-auto-refine-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Command: -exec-next 1 [2 times] Command: -exec-step 1 Command: -exec-finish Command: -exec-step 1 Command: -exec-next 1 [4 times] Command: -exec-finish Command: -exec-step 1 [3 times] Auto-saving... Making completion list... After 0 kbd macro iterations: mouse-posn-property: Args out of range: 7601 Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils rect misearch multi-isearch cus-start cus-load kmacro cl-seq gdb-mi bindat json map seq byte-opt gv bytecomp byte-compile cconv gud comint ansi-color ring vc-git diff-mode easy-mmode cl-extra help-mode cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote inotify dynamic-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 162903 9524) (symbols 48 25219 0) (miscs 40 193 205) (strings 32 31416 5195) (string-bytes 1 976520) (vectors 16 18314) (vector-slots 8 503194 5768) (floats 8 233 199) (intervals 56 3629 313) (buffers 976 26) (heap 1024 38968 11749)) -- Mr. Guilhem Bichot Oracle / MySQL / Optimizer team, Lead Software Engineer Bordeaux, France www.oracle.com / www.mysql.com http://guilhembichot.blogspot.com/