From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#40268: 27.0.60; [PATCH] Unify and improve gdb-mi source window display Date: Sat, 28 Mar 2020 00:03:21 -0400 Message-ID: <63AC5BC7-CFFC-42DF-AD76-3414B631A6DE@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_D367402C-923B-4C93-961D-BAB537DC2993" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="109424"; mail-complaints-to="usenet@ciao.gmane.io" To: 40268@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 28 05:04:17 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jI2hk-000SN0-IA for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Mar 2020 05:04:16 +0100 Original-Received: from localhost ([::1]:50032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jI2hj-00020X-KJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Mar 2020 00:04:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33111) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jI2hZ-0001wt-6f for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2020 00:04:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jI2hX-0002br-2E for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2020 00:04:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55849) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jI2hW-0002bW-U4 for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2020 00:04:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jI2hW-0006oU-OT for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2020 00:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Mar 2020 04:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40268 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: Bug Report Emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.158536821226151 (code B ref -1); Sat, 28 Mar 2020 04:04:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Mar 2020 04:03:32 +0000 Original-Received: from localhost ([127.0.0.1]:33589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jI2h1-0006nj-TP for submit@debbugs.gnu.org; Sat, 28 Mar 2020 00:03:32 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:32808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jI2gz-0006nY-Np for submit@debbugs.gnu.org; Sat, 28 Mar 2020 00:03:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33039) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jI2gx-0001gp-Gv for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2020 00:03:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jI2gv-00020d-Cb for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2020 00:03:27 -0400 Original-Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]:36590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jI2gu-0001xe-AC for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2020 00:03:24 -0400 Original-Received: by mail-qk1-x736.google.com with SMTP id d11so13183295qko.3 for ; Fri, 27 Mar 2020 21:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=0X/VhtmWmzlwBrzMvrh91++LpelDXSMdA+uRde6NpSY=; b=ewsvFAx5F0aMSkEBd9BsGhzNA6LHrHjLsnpFXUTO0LxVvSNBi/v0wgBq9miBvyYGFB dTDy8EwJ09TvyF+lqQPMv7SHLGNZLAB45zKmwX5L7PGB8eb0ArWT2bCzbReMWetE2xdp VCSJEsGSXHvBhpei8kpUNTtgwINCl3WUrvkto020utsWZYzxCzewRvhFloocqckGxkQX /RQh8eC47rShkFlg6NX+w7N7t4GkZta5IkBCVi/+la5YTrDOY78XKrUOo10tx4bJJra4 By6FAoNroT2EX/ru+/wGyVlq9s2mlElhOpEkLqcylwX5448ooQeBCHE4bqUORZsWX1CW VJug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=0X/VhtmWmzlwBrzMvrh91++LpelDXSMdA+uRde6NpSY=; b=hPAQaH/+2tULh2POjOAA7gB0IL1DKLonPBaR+0SLEoRBQPZluUYaz1QWibzwMywC3G lP9ZvCm4gv6fZGEzPS8vEgxemi2xBtODXrG3AelRUEWApPuVWgOgSiaMtYp5rz2QfXPg kmNFC4nPmrvVzZGbcWbFJcyztVh0+mESLJ2RDsHA1Oh/xoXGoZVtBor28KYyybKzJG3i EhmeUCUCXouv1m8xZgK/clxsZ7sq2dfBtKgQB4Hsv18fyl89lUW9OStgaBejYQ7s3nAO VTzDYxOv0khKOuy9xjNHEwDAtWSnQJhiXA0d8MCRgSWbxEdYYe3xrN9YDk62BUxu1mKn gQOg== X-Gm-Message-State: ANhLgQ2Ov6BkOlWRrhfDg8P1tTJetDcxqUT66xT8eHLt5asAFEdS2Sss 7AxY4+0FxFbx0QpXrdRyqGzFf1xJr76p7g== X-Google-Smtp-Source: ADFU+vtyzMs6MSJ5geGBMwi4YcIn0zUqw9+59I1Qxku1pfaXTTRrHwz/s7ZsaXVo8qjlPUL/MCDW1w== X-Received: by 2002:a05:620a:2f7:: with SMTP id a23mr2281517qko.303.1585368203162; Fri, 27 Mar 2020 21:03:23 -0700 (PDT) Original-Received: from [192.168.1.5] (c-174-60-229-153.hsd1.pa.comcast.net. [174.60.229.153]) by smtp.gmail.com with ESMTPSA id f127sm5223255qkd.74.2020.03.27.21.03.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2020 21:03:22 -0700 (PDT) X-Mailer: Apple Mail (2.3608.80.23.2.2) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177796 Archived-At: --Apple-Mail=_D367402C-923B-4C93-961D-BAB537DC2993 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Before this change, stepping and other gdb command handlers use = 'gud-display-line=E2=80=99 and 'gdb-goto-breakpoint' uses = 'gdb-display-source-buffer'. Now whenever gdb-mi code tries to open a = source buffer, 'gdb-display-source-buffer=E2=80=99 is used. Also, we = simplify the logic in 'gdb-display-source-buffer=E2=80=99 and add a = feature to limit the maximum number of source windows. =46rom a user=E2=80=99s perspective, this change solves two problems: 1. = The behavior difference between jumping to break point and stepping (and = other command) 2. Gdb-mi opening more windows than I wanted for = displaying source files. Yuan --Apple-Mail=_D367402C-923B-4C93-961D-BAB537DC2993 Content-Disposition: attachment; filename=source-window.patch Content-Type: application/octet-stream; x-unix-mode=0700; name="source-window.patch" Content-Transfer-Encoding: quoted-printable =46rom=20ad34237cdc7c06e7edfcb593e8c732c6a040a7cb=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Tue,=20= 21=20Jan=202020=2016:23:57=20-0500=0ASubject:=20[PATCH]=20Unify=20and=20= improve=20gdb-mi=20source=20buffer=20display=20logic=0A=0AUnify=20the=20= behavior=20of=20source=20buffer=20display=20for=20gdb-mi.=20=20Before=20= this=0Achange,=20stepping=20and=20other=20gdb=20command=20handlers=20use=20= 'gud-display-line'=0Aand=20'gdb-goto-breakpoint'=20uses=20= 'gdb-display-source-buffer'.=20=20Now=20whenever=0Agdb-mi=20code=20tries=20= to=20open=20a=20source=20buffer,=20'gdb-display-source-buffer'=0Ais=20= used.=20=20Also,=20we=20simplify=20the=20logic=20in=20= 'gdb-display-source-buffer'=20and=0Aadd=20a=20feature=20to=20limit=20the=20= maximum=20number=20of=20source=20windows.=0A=0A*=20= lisp/progmodes/gdb-mi.el=20(gdb-source-window):=20Remove=20variable,=0A= changed=20to=20'gdb-source-window-list'.=0A(gdb-source-window-list,=20= gdb-max-source-window-count):=20New=20variable.=0A= (gdb-display-source-buffer-action,=0Agdb-max-source-window-count):=20New=20= custom=20variable.=0A(gdb-init-1,=20gdb-setup-windows,=20= gdb-restore-windows):=0AUse=20'gdb-source-window'=20rather=20than=20= 'gdb-source-window-list'.=0A(gdb-display-source-buffer):=20Use=20new=20= logic.=0A(gdb-goto-breakpoint):=20Remove=20'display-buffer'=0Aand=20= don't=20set=20'gdb-source-buffer'=20anymore.=0A*=20lisp/progmodes/gud.el=20= (gud-display-line):=20Remove=20'display-buffer'=0Aand=20don't=20set=20= 'gdb-source-buffer'=20anymore.=0A---=0A=20lisp/progmodes/gdb-mi.el=20|=20= 65=20+++++++++++++++++++++++++++++-----------=0A=20lisp/progmodes/gud.el=20= =20=20=20|=2026=20++++++++--------=0A=202=20files=20changed,=2060=20= insertions(+),=2031=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/progmodes/gdb-mi.el=20b/lisp/progmodes/gdb-mi.el=0Aindex=20= e4233dacaf..5f31a22f22=20100644=0A---=20a/lisp/progmodes/gdb-mi.el=0A+++=20= b/lisp/progmodes/gdb-mi.el=0A@@=20-211,7=20+211,9=20@@=20= gdb-handler-list=0A=20(defvar=20gdb-source-file-list=20nil=0A=20=20=20= "List=20of=20source=20files=20for=20the=20current=20executable.")=0A=20= (defvar=20gdb-first-done-or-error=20t)=0A-(defvar=20gdb-source-window=20= nil)=0A+(defvar=20gdb-source-window-list=20nil=0A+=20=20"List=20of=20= windows=20used=20for=20displaying=20source=20files.=0A+Sorted=20in=20= most=20recently=20visited=20first=20order.")=0A=20(defvar=20= gdb-inferior-status=20nil)=0A=20(defvar=20gdb-continuation=20nil)=0A=20= (defvar=20gdb-supports-non-stop=20nil)=0A@@=20-589,6=20+591,21=20@@=20= gdb-show-main=0A=20=20=20:group=20'gdb=0A=20=20=20:version=20"22.1")=0A=20= =0A+(defcustom=20gdb-display-source-buffer-action=20nil=0A+=20=20= "`display-buffer'=20action=20used=20when=20GDB=20displaying=20a=20source=20= buffer."=0A+=20=20:type=20'list=0A+=20=20:group=20'gdb=0A+=20=20:version=20= "28.1")=0A+=0A+(defcustom=20gdb-max-source-window-count=201=0A+=20=20= "Maximum=20number=20of=20source=20windows=20to=20use.=0A+Until=20there=20= are=20such=20number=20of=20source=20windows=20on=20screen,=20GDB=0A= +tries=20to=20open=20a=20new=20window=20when=20visiting=20a=20new=20= source=20file;=20if=0A+there=20are,=20GDB=20will=20start=20to=20reuse=20= existing=20source=20windows."=0A+=20=20:type=20'number=0A+=20=20:grou=20= 'gdb=0A+=20=20:version=20"28.1")=0A+=0A=20(defvar=20gdbmi-debug-mode=20= nil=0A=20=20=20"When=20non-nil,=20print=20the=20messages=20sent/received=20= from=20GDB/MI=20in=20*Messages*.")=0A=20=0A@@=20-922,7=20+939,7=20@@=20= gdb-init-1=0A=20=09gdb-first-done-or-error=20t=0A=20=09= gdb-buffer-fringe-width=20(car=20(window-fringes))=0A=20=09gdb-debug-log=20= nil=0A-=09gdb-source-window=20nil=0A+=09gdb-source-window-list=20nil=0A=20= =09gdb-inferior-status=20nil=0A=20=09gdb-continuation=20nil=0A=20=20=20=20= =20=20=20=20=20gdb-buf-publisher=20'()=0A@@=20-2002,17=20+2019,31=20@@=20= gdb-show-stop-p=0A=20;;=20GDB=20frame=20(after=20up,=20down=20etc).=20=20= If=20no=20GDB=20frame=20is=20visible=20but=20the=20last=0A=20;;=20= visited=20breakpoint=20is,=20use=20that=20window.=0A=20(defun=20= gdb-display-source-buffer=20(buffer)=0A-=20=20(let*=20((last-window=20= (if=20gud-last-last-frame=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(get-buffer-window=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (gud-find-file=20(car=20gud-last-last-frame)))))=0A-=09=20(source-window=20= (or=20last-window=0A-=09=09=09=20=20=20=20(if=20(and=20gdb-source-window=0A= -=09=09=09=09=20=20=20=20=20(window-live-p=20gdb-source-window))=0A-=09=09= =09=09gdb-source-window))))=0A-=20=20=20=20(when=20source-window=0A-=20=20= =20=20=20=20(setq=20gdb-source-window=20source-window)=0A-=20=20=20=20=20= =20(set-window-buffer=20source-window=20buffer))=0A-=20=20=20=20= source-window))=0A+=20=20"Find=20a=20window=20to=20display=20BUFFER.=0A= +Always=20find=20a=20window=20to=20display=20buffer,=20and=20return=20= it."=0A+=20=20;;=20This=20function=20doesn't=20take=20care=20of=20= setting=20up=20source=20window(s)=20at=20startup,=0A+=20=20;;=20that's=20= handled=20by=20`gdb-setup-windows'=20(if=20`gdb-many-windows'=20is=20= non-nil).=0A+=20=20;;=20If=20`buffer'=20is=20already=20shown=20in=20a=20= window,=20use=20that=20window.=0A+=20=20(or=20(get-buffer-window=20= buffer)=0A+=20=20=20=20=20=20(progn=0A+=20=20=20=20=20=20=20=20;;=20= First,=20update=20the=20window=20list.=0A+=20=20=20=20=20=20=20=20(setq=20= gdb-source-window-list=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (cl-remove-if-not=20#'window-live-p=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= gdb-source-window-list))=0A+=20=20=20=20=20=20=20=20;;=20Should=20we=20= create=20a=20new=20window=20or=20reuse=20one?=0A+=20=20=20=20=20=20=20=20= (if=20(>=20gdb-max-source-window-count=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(length=20gdb-source-window-list))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20;;=20Create=20a=20new=20window,=20push=20it=20to=20window=20= list=20and=20return=20it.=0A+=20=20=20=20=20=20=20=20=20=20=20=20(car=20= (push=20(display-buffer=20buffer=20gdb-display-source-buffer-action)=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= gdb-source-window-list))=0A+=20=20=20=20=20=20=20=20=20=20;;=20Reuse=20a=20= window,=20we=20use=20the=20oldest=20window=20and=20put=20that=20to=0A+=20= =20=20=20=20=20=20=20=20=20;;=20the=20front=20of=20the=20window=20list.=0A= +=20=20=20=20=20=20=20=20=20=20(let=20((last-win=20(car=20(last=20= gdb-source-window-list)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(rest=20(butlast=20gdb-source-window-list)))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20(set-window-buffer=20last-win=20buffer)=0A+=20=20=20=20=20=20= =20=20=20=20=20=20(setq=20gdb-source-window-list=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(cons=20last-win=20rest))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20last-win)))))=0A=20=0A=20=0A=20(defun=20= gdbmi-start-with=20(str=20offset=20match)=0A@@=20-3981,9=20+4012,7=20@@=20= gdb-goto-breakpoint=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(let*=20= ((buffer=20(find-file-noselect=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20(file-exists-p=20= file)=20file=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(cdr=20(assoc=20bptno=20= gdb-location-alist)))))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(window=20(or=20(gdb-display-source-buffer=20buffer)=0A-=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(display-buffer=20buffer))))=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(setq=20gdb-source-window=20window)=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(window=20= (gdb-display-source-buffer=20buffer)))=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(with-current-buffer=20buffer=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(goto-char=20(point-min))=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(forward-line=20(1-=20= (string-to-number=20line)))=0A@@=20-4597,7=20+4626,7=20@@=20= gdb-setup-windows=0A=20=20=20=20=20=20=20=20=20=20;;=20Put=20buffer=20= list=20in=20window=20if=20we=0A=20=20=20=20=20=20=20=20=20=20;;=20can't=20= find=20a=20source=20file.=0A=20=20=20=20=20=20=20=20=20=20= (list-buffers-noselect))))=0A-=20=20=20=20(setq=20gdb-source-window=20= (selected-window))=0A+=20=20=20=20(setq=20gdb-source-window-list=20(list=20= (selected-window)))=0A=20=20=20=20=20(let=20((win4=20= (split-window-right)))=0A=20=20=20=20=20=20=20(gdb-set-window-buffer=0A=20= =20=20=20=20=20=20=20(gdb-get-buffer-create=20'gdb-inferior-io)=20nil=20= win4))=0A@@=20-4639,7=20+4668,7=20@@=20gdb-restore-windows=0A=20=20=20=20= =20=20=20=20=20=20(if=20gud-last-last-frame=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(gud-find-file=20(car=20gud-last-last-frame))=0A=20=20=20=20= =20=20=20=20=20=20=20=20(gud-find-file=20gdb-main-file)))=0A-=20=20=20=20= =20=20=20=20(setq=20gdb-source-window=20win)))))=0A+=20=20=20=20=20=20=20= =20(setq=20gdb-source-window-list=20(list=20win))))))=0A=20=0A=20;;=20= Called=20from=20`gud-sentinel'=20in=20gud.el:=0A=20(defun=20gdb-reset=20= ()=0Adiff=20--git=20a/lisp/progmodes/gud.el=20b/lisp/progmodes/gud.el=0A= index=20567f452b93..dda7fd6ef0=20100644=0A---=20a/lisp/progmodes/gud.el=0A= +++=20b/lisp/progmodes/gud.el=0A@@=20-2826,9=20+2826,11=20@@=20= gud-display-line=0A=20=09=20(buffer=0A=20=09=20=20(with-current-buffer=20= gud-comint-buffer=0A=20=09=20=20=20=20(gud-find-file=20true-file)))=0A-=09= =20(window=20(and=20buffer=0A-=09=09=20=20=20=20=20=20(or=20= (get-buffer-window=20buffer)=0A-=09=09=09=20=20(display-buffer=20buffer=20= '(nil=20(inhibit-same-window=20.=20t))))))=0A+=09=20(window=20(when=20= buffer=20(if=20(eq=20gud-minor-mode=20'gdb-mi)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(gdb-display-source-buffer=20buffer)=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= Gud=20still=20has=20the=20old=20behavior.=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(or=20= (get-buffer-window=20buffer)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (display-buffer=20buffer=20'(nil=20(inhibit-same-window=20.=20t)))))))=0A= =20=09=20(pos))=0A=20=20=20=20=20(when=20buffer=0A=20=20=20=20=20=20=20= (with-current-buffer=20buffer=0A@@=20-2858,9=20+2860,7=20@@=20= gud-display-line=0A=20=09=20=20=20=20=20=20=20(widen)=0A=20=09=20=20=20=20= =20=20=20(goto-char=20pos))))=0A=20=20=20=20=20=20=20(when=20window=0A-=09= (set-window-point=20window=20gud-overlay-arrow-position)=0A-=09(if=20(eq=20= gud-minor-mode=20'gdbmi)=0A-=09=20=20=20=20(setq=20gdb-source-window=20= window))))))=0A+=09(set-window-point=20window=20= gud-overlay-arrow-position)))))=0A=20=0A=20;;=20The=20gud-call=20= function=20must=20do=20the=20right=20thing=20whether=20its=20invoking=0A=20= ;;=20keystroke=20is=20from=20the=20GUD=20buffer=20itself=20(via=20= major-mode=20binding)=0A@@=20-2908,14=20+2908,14=20@@=20= gud-format-command=0A=20=09=20=20(setq=20subst=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(gud-find-class=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(if=20insource=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(buffer-file-name)=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(car=20frame))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(buffer-file-name)=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(car=20frame))=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20insource=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (save-restriction=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(widen)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(+=20(count-lines=20(point-min)=20(point))=0A= -=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(if=20(bolp)=201=200)))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(cdr=20frame)))))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(save-restriction=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(widen)=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(+=20(count-lines=20= (point-min)=20(point))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(if=20(bolp)=201=200)))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(cdr=20frame)))))=0A=20=09=20((eq=20= key=20?p)=0A=20=09=20=20(setq=20subst=20(if=20arg=20(int-to-string=20= arg)))))=0A=20=09(setq=20result=20(concat=20result=20(match-string=201=20= str)=20subst)))=0A--=20=0A2.25.1=0A=0A= --Apple-Mail=_D367402C-923B-4C93-961D-BAB537DC2993 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii In GNU Emacs 27.0.60 (build 1, x86_64-apple-darwin19.3.0, NS = appkit-1894.30 Version 10.15.3 (Build 19D76)) of 2020-02-25 built on missSilver Repository revision: f27187f963e9e36435b508e29256e048799e0ff2 Repository branch: emacs-27 Windowing system distributor 'Apple', version 10.3.1894 System Description: Mac OS X 10.15.4 Recent messages: Checking 34 files in /Users/yuan/emacs/lisp/emulation... Checking 180 files in /Users/yuan/emacs/lisp/emacs-lisp... Checking 24 files in /Users/yuan/emacs/lisp/cedet... Checking 59 files in /Users/yuan/emacs/lisp/calendar... Checking 87 files in /Users/yuan/emacs/lisp/calc... Checking 113 files in /Users/yuan/emacs/lisp/obsolete... Checking for load-path shadows...done Auto-saving... Buffer *unsent mail to bug-gnu-emacs@gnu.org* modified; kill anyway? (y = or n) y C-c C-c is undefined Configured using: 'configure --with-modules --with-pdumper=3Dyes = --oldincludedir=3D/Applications/Xcode.app/Contents/Developer/Platforms/Mac= OSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2/' Configured features: RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS XIM NS MODULES THREADS PDUMPER LCMS2 Important settings: value of $LC_CTYPE: UTF-8 value of $LANG: en_CN.UTF-8 locale-coding-system: utf-8-unix Major mode: Shell-script Minor modes in effect: global-semanticdb-minor-mode: t global-semantic-idle-scheduler-mode: t semantic-mode: t sh-electric-here-document-mode: t global-magit-file-mode: t magit-file-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t diff-hl-mode: t color-outline-mode: t hi-lock-mode: t desktop-save-mode: t helpful-html-manual-mode: t yas-global-mode: t yas-minor-mode: t form-feed-mode: t minibuffer-electric-default-mode: t flycheck-mode: t flyspell-mode: t minions-mode: t eyebrowse-mode: t savehist-mode: t global-hl-todo-mode: t hl-todo-mode: t global-highlight-parentheses-mode: t highlight-parentheses-mode: t rainbow-delimiters-mode: t global-undo-tree-mode: t undo-tree-mode: t electric-pair-mode: t winner-mode: t ivy-prescient-mode: t prescient-persist-mode: t recentf-mode: t which-key-mode: t general-override-mode: t outline-minor-mode: t counsel-mode: t ivy-mode: t company-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t electric-quote-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t hs-minor-mode: t Load-path shadows: /Users/yuan/.emacs.d/ranch/winman/windman hides = /Users/yuan/.emacs.d/ranch/windman/windman /Users/yuan/.emacs.d/ranch/separedit/cask-bootstrap hides = /Users/yuan/.emacs.d/ranch/comment-edit/cask-bootstrap /Users/yuan/.emacs.d/ranch/esup/esup-child hides = /Users/yuan/.emacs.d/package/esup-20200120.740/esup-child /Users/yuan/.emacs.d/ranch/esup/esup hides = /Users/yuan/.emacs.d/package/esup-20200120.740/esup /Users/yuan/.emacs.d/ranch/julia-mode/julia-mode hides = /Users/yuan/.emacs.d/package/julia-mode-20190813.1326/julia-mode /Users/yuan/.emacs.d/ranch/julia-mode/julia-latexsubs hides = /Users/yuan/.emacs.d/package/julia-mode-20190813.1326/julia-latexsubs /Users/yuan/.emacs.d/ranch/matlab-emacs/mlint hides = /Users/yuan/.emacs.d/package/matlab-mode-20180928.1526/mlint /Users/yuan/.emacs.d/ranch/matlab-emacs/company-matlab-shell hides = /Users/yuan/.emacs.d/package/matlab-mode-20180928.1526/company-matlab-shel= l /Users/yuan/.emacs.d/ranch/matlab-emacs/linemark hides = /Users/yuan/.emacs.d/package/matlab-mode-20180928.1526/linemark /Users/yuan/.emacs.d/ranch/matlab-emacs/semanticdb-matlab hides = /Users/yuan/.emacs.d/package/matlab-mode-20180928.1526/semanticdb-matlab /Users/yuan/.emacs.d/ranch/matlab-emacs/semantic-matlab hides = /Users/yuan/.emacs.d/package/matlab-mode-20180928.1526/semantic-matlab /Users/yuan/.emacs.d/ranch/matlab-emacs/srecode-matlab hides = /Users/yuan/.emacs.d/package/matlab-mode-20180928.1526/srecode-matlab /Users/yuan/.emacs.d/ranch/matlab-emacs/matlab hides = /Users/yuan/.emacs.d/package/matlab-mode-20180928.1526/matlab /Users/yuan/.emacs.d/ranch/matlab-emacs/cedet-matlab hides = /Users/yuan/.emacs.d/package/matlab-mode-20180928.1526/cedet-matlab /Users/yuan/.emacs.d/ranch/matlab-emacs/tlc hides = /Users/yuan/.emacs.d/package/matlab-mode-20180928.1526/tlc /Users/yuan/.emacs.d/ranch/matlab-emacs/matlab-publish hides = /Users/yuan/.emacs.d/package/matlab-mode-20180928.1526/matlab-publish /Users/yuan/.emacs.d/ranch/matlab-emacs/matlab-mode-pkg hides = /Users/yuan/.emacs.d/package/matlab-mode-20180928.1526/matlab-mode-pkg /Users/yuan/.emacs.d/package/faceup-20170925.1946/faceup hides = /Users/yuan/emacs/lisp/emacs-lisp/faceup Features: (shadow sort mail-extr emacsbug sendmail face-remap rfc1345 quail semantic/tag-write semantic/tag-file semantic/bovine/c hideif semantic/bovine/c-by semantic/lex-spp semantic/bovine/gcc semantic/analyze/refs semantic/db-file data-debug cedet-files semantic/bovine/scm semantic/decorate/include semantic/db-find semantic/db-ref semantic/decorate/mode semantic/decorate pulse semantic/dep semantic/bovine/scm-by semantic/bovine semantic/db-mode semantic/idle semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/db eieio-base semantic/format ezimage semantic/tag-ls semantic/find semantic/ctxt semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ls-lisp ess-custom apropos sh-script smie executable geiser-mode geiser-xref geiser-compile geiser-debug geiser-gambit geiser-chibi geiser-mit geiser-chez geiser-chicken geiser-racket geiser-guile ghelp-geiser console-buffer geiser geiser-repl geiser-image geiser-company geiser-doc geiser-menu geiser-edit geiser-completion geiser-autodoc geiser-eval geiser-connection tq geiser-syntax geiser-log geiser-popup view geiser-impl geiser-custom geiser-base scheme vc-mtn vc-hg bug-reference magit-patch-changelog magit-patch magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func magit-diff smerge-mode magit-core magit-autorevert autorevert magit-margin magit-transient magit-process magit-mode transient git-commit magit-git magit-section magit-utils crm log-edit pcvs-util add-log with-editor async-bytecomp async shell misearch multi-isearch vc-git vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs bookmark server cl-print gnutls mm-archive message rfc822 mml mml-sec epa derived gnus-util rmail rmail-loaddefs text-property-search mailabbrev gmm-utils mailheader mm-decode mm-bodies mm-encode mail-utils network-stream url-http mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm rmc puny url-cache url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf mailcap epg epg-config hideshow diff-hl vc-dir vc vc-dispatcher diff-mode color-outline hi-lock company-oddmuse company-keywords company-etags etags fileloop generator company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-bbdb desktop frameset trivial-copy ghelp ghelp-eglot ghelp-helpful ghelp-builtin cus-edit centaur-tabs centaur-tabs-interactive centaur-tabs-functions centaur-tabs-elements powerline powerline-separators powerline-themes cus-start cus-load luna-general-config pause utility transform flywrap yasnippet sly-el-indent sly-cl-indent cl-indent cl all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons memoize form-feed minibuf-eldef eglot array filenotify jsonrpc ert pp ewoc debug flymake-proc flymake warnings url-util flycheck flyspell ispell outshine outshine-org-cmds outorg isolate inline expand-region text-mode-expansions the-org-mode-expansions er-basic-expansions thingatpt expand-region-core expand-region-custom ws-butler minions eyebrowse savehist buffer-move windmove hl-todo highlight-parentheses rainbow-delimiters doom-cyberpunk-theme undo-tree diff doom-one-light-theme elec-pair winner doom-themes doom-themes-base windman aggressive-indent find-char ivy-prescient prescient recentf-ext recentf tree-widget wid-edit which-key general helpful imenu trace edebug backtrace info-look f dash-functional help-fns radix-tree elisp-refs s loop dash org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete org-list org-faces org-entities time-date noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat advice org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs counsel xdg xref project dired dired-loaddefs compile comint ansi-color swiper cl-extra help-mode ivy delsel ring colir color ivy-overlay company edmacro kmacro pcase use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key use-package-core finder-inf tex-site proof-site proof-autoloads info cowboy package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars cl-loaddefs cl-lib lunary lunary-ui easy-mmode luna-f rx seq byte-opt gv bytecomp byte-compile cconv tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 489882 97798) (symbols 48 40858 45) (strings 32 193314 9271) (string-bytes 1 4564854) (vectors 16 58289) (vector-slots 8 1900639 84204) (floats 8 468 326) (intervals 56 7219 1188) (buffers 1000 40)) --Apple-Mail=_D367402C-923B-4C93-961D-BAB537DC2993--