From unknown Wed Sep 10 10:35:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39180: 27.0.50; [PATCH] Use expressions as memory location in gdb-mi memory buffer Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jan 2020 20:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39180 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 39180@debbugs.gnu.org X-Debbugs-Original-To: Bug Report Emacs Received: via spool by submit@debbugs.gnu.org id=B.157938088430137 (code B ref -1); Sat, 18 Jan 2020 20:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jan 2020 20:54:44 +0000 Received: from localhost ([127.0.0.1]:42288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isv7D-0007q0-Up for submit@debbugs.gnu.org; Sat, 18 Jan 2020 15:54:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:49003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isv7B-0007pq-Me for submit@debbugs.gnu.org; Sat, 18 Jan 2020 15:54:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58400) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isv79-0006Jv-N3 for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2020 15:54:41 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isv77-0007eJ-Qm for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2020 15:54:39 -0500 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:36189) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1isv77-0007dx-Hg for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2020 15:54:37 -0500 Received: by mail-qt1-x82e.google.com with SMTP id i13so24675279qtr.3 for ; Sat, 18 Jan 2020 12:54:37 -0800 (PST) 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=6i3L08fOElanyPnQvOB6raMh10jGzRR+ADCZVvzB1Io=; b=ah5Jpjck1uHHU2+xRpDg0YSsegi2p3u+Gk9xM4T6ynNf5FdH72hBQZh5O+JdIKyxkz bqFoAlNcG61h7tmO6n4Jrku6U04qxDAcplNLkPh5rgTpx7rjNRJ8X24+1rnmLQgM0OMc N8aEZp2HVuOjPreZpCtA3yTmVIoffnDPyDZTjolDW2wzr5dlZLsE1gCkLzWRaW4MAKYd Vpn9azAl47EcO1XQb+ZwH3wwP4woV4jnEVLmrAbKFojHmq9Uv7083FBliScUmAQELcHq KooSyDWiS5ZFXiNzvCJqy61byeXxoZ0UdPWfSoT9whF1FLEWS2a8Jdg2N1iLuTqlQIQ+ pj2A== 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=6i3L08fOElanyPnQvOB6raMh10jGzRR+ADCZVvzB1Io=; b=k4W50sYwRZgWUVy41MkhWtPEmvR/T5x1ey6K/qmbSh8SZBtXTQKGuLosb9vrEmUbr/ FjJtH3M+6XZfpf9A2TArsrYVunIS2FC8FcehHFDWe5iW1EZ6yL/qUGp0WGgOHgJaambT X/nIDRrZOOdOXyigQcc/LGraKOtSIZ7DLW9939jf2CBjSwEyBSBb3hRYN7RrPtjukl6V mqll070Sx/TQ4vNcjDYn5ZejM7J0eOwIyv6nzSPymUQ2LNQj0iMItf0u/spnvXgG4fID YISagxUTqPsi/3H7aHnu3t7e4i+61lz18IOgT7VhZGyb9LZ9+pGBigGD7fbY1gDBeu5b 3pHg== X-Gm-Message-State: APjAAAVTlXm1LGAw/4OD1O+6u37i4t4EcqMaGc5Ab0GIb2WM018oscOa sv4nbhgpaOFt58uzRq0YaptyFdab0WCkkjWn X-Google-Smtp-Source: APXvYqxPAh+CyftUM+8Y2E5ODmrJ5XDKtDlY7+erLAYgpGmiLae7BqFK/e83JG7QSDxicUz7DBqulA== X-Received: by 2002:ac8:5298:: with SMTP id s24mr13339017qtn.89.1579380876789; Sat, 18 Jan 2020 12:54:36 -0800 (PST) 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 c184sm13578930qke.118.2020.01.18.12.54.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Jan 2020 12:54:36 -0800 (PST) From: Yuan Fu Content-Type: multipart/mixed; boundary="Apple-Mail=_423604B8-ABF9-43AE-9CBA-332AAA0AA536" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Message-Id: <4A45AE37-414A-4D78-A49C-B40FB72736C4@gmail.com> Date: Sat, 18 Jan 2020 15:54:35 -0500 X-Mailer: Apple Mail (2.3608.40.2.2.4) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::82e X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --Apple-Mail=_423604B8-ABF9-43AE-9CBA-332AAA0AA536 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Currently gdb-mi does allow expressions as memory address, but it = translates it to a fixed address. This patch makes gdb to store the = expression and re-evaluate on updates. So the address changes as = expression=E2=80=99s value changes. --Apple-Mail=_423604B8-ABF9-43AE-9CBA-332AAA0AA536 Content-Disposition: attachment; filename=memory.patch Content-Type: application/octet-stream; x-unix-mode=0700; name="memory.patch" Content-Transfer-Encoding: quoted-printable =46rom=20932a0e0bbec7939a89431bdc31316afbf2d23cde=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Sat,=20= 5=20Oct=202019=2022:42:07=20-0400=0ASubject:=20[PATCH=201/4]=20Enhance=20= support=20for=20expressions=20as=20memory=20address=0AMIME-Version:=20= 1.0=0AContent-Type:=20text/plain;=20charset=3DUTF-8=0A= Content-Transfer-Encoding:=208bit=0A=0ABefore=20the=20memory=20buffer=20= evaluates=20the=20expression=20as=20address=0Aand=20use=20the=20fixed=20= result=20in=20each=20stop.=20This=20change=20stores=20the=0Aexpression=20= itself=20and=20reevaluates=20it=20in=20each=20stop=20for=20an=20address.=0A= Then=20displays=20the=20value=20of=20the=20memory=20at=20that=20address.=0A= =0Alisp/progmodes/gdb-mi.el=20(gdb-memory-address-expression):=20new=0A=20= =20(gdb-memory-address):=20change=20default=20value,=20add=20docstring=0A= =20=20(def-gdb-trigger-and-handler=20gdb-invalidate-memory,=0A=20=20= gdb-memory-set-address):=20replace=20=E2=80=99gdb-memory-address=E2=80=99=20= with=0A=20=20=20=20=E2=80=99gdb-memory-address-expression=E2=80=99=0A=20=20= (gdb-memory-header):=20Add=20display=20for=20= =E2=80=99gdb-memory-address-expression=E2=80=99,=0A=20=20=20=20move=20= the=20mouse=20event=20from=20address=20to=20expression=0A---=0A=20= lisp/progmodes/gdb-mi.el=20|=2021=20++++++++++++---------=0A=201=20file=20= changed,=2012=20insertions(+),=209=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/progmodes/gdb-mi.el=20b/lisp/progmodes/gdb-mi.el=0Aindex=20= b08d487af3..bd4d216860=20100644=0A---=20a/lisp/progmodes/gdb-mi.el=0A+++=20= b/lisp/progmodes/gdb-mi.el=0A@@=20-3445,7=20+3445,7=20@@=20= gdb-memory-unit=0A=20(def-gdb-trigger-and-handler=0A=20=20=20= gdb-invalidate-memory=0A=20=20=20(format=20"-data-read-memory=20%s=20%s=20= %d=20%d=20%d"=0A-=20=20=20=20=20=20=20=20=20=20gdb-memory-address=0A+=20=20= =20=20=20=20=20=20=20=20(gdb-mi-quote=20gdb-memory-address-expression)=0A= =20=20=20=20=20=20=20=20=20=20=20gdb-memory-format=0A=20=20=20=20=20=20=20= =20=20=20=20gdb-memory-unit=0A=20=20=20=20=20=20=20=20=20=20=20= gdb-memory-rows=0A@@=20-3535,7=20+3535,7=20@@=20gdb-memory-set-address=0A= =20=20=20"Set=20the=20start=20memory=20address."=0A=20=20=20= (interactive)=0A=20=20=20(let=20((arg=20(read-from-minibuffer=20"Memory=20= address:=20")))=0A-=20=20=20=20(setq=20gdb-memory-address=20arg))=0A+=20=20= =20=20(setq=20gdb-memory-address-expression=20arg))=0A=20=20=20= (gdb-invalidate-memory=20'update))=0A=20=0A=20(defmacro=20= def-gdb-set-positive-number=20(name=20variable=20echo-string=20&optional=20= doc)=0A@@=20-3718,7=20+3718,15=20@@=20gdb-memory-font-lock-keywords=0A=20= (defvar=20gdb-memory-header=0A=20=20=20'(:eval=0A=20=20=20=20=20(concat=0A= -=20=20=20=20=20"Start=20address["=0A+=20=20=20=20=20"Start=20address=20= "=0A+=20=20=20=20=20(propertize=20gdb-memory-address-expression=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'face=20= font-lock-warning-face=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20'help-echo=20"mouse-1:=20set=20start=20address"=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20'mouse-face=20'mode-line-highlight=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'local-map=20= (gdb-make-header-line-mouse-map=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'mouse-1=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= #'gdb-memory-set-address-event))=0A+=20=20=20=20=20"=20["=0A=20=20=20=20=20= =20(propertize=20"-"=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20'face=20font-lock-warning-face=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20'help-echo=20"mouse-1:=20decrement=20address"=0A@@=20= -3736,12=20+3744,7=20@@=20gdb-memory-header=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= #'gdb-memory-show-next-page))=0A=20=20=20=20=20=20"]:=20"=0A=20=20=20=20=20= =20(propertize=20gdb-memory-address=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20'face=20font-lock-warning-face=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20'help-echo=20"mouse-1:=20set=20start=20= address"=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= 'mouse-face=20'mode-line-highlight=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20'local-map=20(gdb-make-header-line-mouse-map=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= 'mouse-1=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#'gdb-memory-set-address-event))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20'face=20font-lock-warning-face)=0A=20= =20=20=20=20=20"=20=20Rows:=20"=0A=20=20=20=20=20=20(propertize=20= (number-to-string=20gdb-memory-rows)=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20'face=20font-lock-warning-face=0A--=20=0A2.24.1=0A=0A=0A= =46rom=20d4e98f53dcb228b58f6c72b41ce2150160e863d7=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Mon,=20= 7=20Oct=202019=2020:36:23=20-0400=0ASubject:=20[PATCH=202/4]=20Fix=20= memory=20buffer=20code=20in=20gdb-mi=0AMIME-Version:=201.0=0A= Content-Type:=20text/plain;=20charset=3DUTF-8=0A= Content-Transfer-Encoding:=208bit=0A=0A*=20lisp/progmodes/gdb-mi.el=20= (gdb-read-memory-custom):=0ABreak=20infinite=20loop.=20Change=20= =E2=80=99error=E2=80=99=20to=20=E2=80=99user-error=E2=80=99=0A---=0A=20= lisp/progmodes/gdb-mi.el=20|=208=20+++++---=0A=201=20file=20changed,=205=20= insertions(+),=203=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/progmodes/gdb-mi.el=20b/lisp/progmodes/gdb-mi.el=0Aindex=20= bd4d216860..662671885c=20100644=0A---=20a/lisp/progmodes/gdb-mi.el=0A+++=20= b/lisp/progmodes/gdb-mi.el=0A@@=20-3498,10=20+3498,12=20@@=20= gdb-read-memory-custom=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=20=20=20=20=20= =20=20=20=20gdb-memory-format)))))=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20(newline)))=0A=20=20=20=20=20=20=20;;=20Show=20last=20page=20instead=20= of=20empty=20buffer=20when=20out=20of=20bounds=0A-=20=20=20=20=20=20= (progn=0A-=20=20=20=20=20=20=20=20(let=20((gdb-memory-address=20= gdb-memory-last-address))=0A+=20=20=20=20=20=20(when=20= gdb-memory-last-address=0A+=20=20=20=20=20=20=20=20(let=20= ((gdb-memory-address-expression=20gdb-memory-last-address))=0A+=20=20=20=20= =20=20=20=20=20=20;;=20avoid=20infinite=20loop=0A+=20=20=20=20=20=20=20=20= =20=20(setq=20gdb-memory-last-address=20nil)=0A=20=20=20=20=20=20=20=20=20= =20=20(gdb-invalidate-memory=20'update)=0A-=20=20=20=20=20=20=20=20=20=20= (error=20err-msg))))))=0A+=20=20=20=20=20=20=20=20=20=20(user-error=20= "Error=20when=20retrieving=20memory:=20%s=20Displaying=20last=20= successful=20page"=20err-msg))))))=0A=20=0A=20(defvar=20= gdb-memory-mode-map=0A=20=20=20(let=20((map=20(make-sparse-keymap)))=0A= --=20=0A2.24.1=0A=0A=0A=46rom=20dc5008ac30718fd1e1920bb07300a0a2e10835c4=20= Mon=20Sep=2017=2000:00:00=202001=0AFrom:=20Yuan=20Fu=20= =0ADate:=20Mon,=207=20Oct=202019=2020:52:15=20-0400=0A= Subject:=20[PATCH=203/4]=20Protect=20against=20nil=20memory=20address=20= in=20gdb-mi=0A=0A*=20lisp/progmodes/gdb-mi.el=20(gdb-memory-header):=0A= Protect=20against=20nil=20value=0A---=0A=20lisp/progmodes/gdb-mi.el=20|=20= 4=20++--=0A=201=20file=20changed,=202=20insertions(+),=202=20= deletions(-)=0A=0Adiff=20--git=20a/lisp/progmodes/gdb-mi.el=20= b/lisp/progmodes/gdb-mi.el=0Aindex=20662671885c..eec11ebf0c=20100644=0A= ---=20a/lisp/progmodes/gdb-mi.el=0A+++=20b/lisp/progmodes/gdb-mi.el=0A@@=20= -3721,7=20+3721,7=20@@=20gdb-memory-header=0A=20=20=20'(:eval=0A=20=20=20= =20=20(concat=0A=20=20=20=20=20=20"Start=20address=20"=0A-=20=20=20=20=20= (propertize=20gdb-memory-address-expression=0A+=20=20=20=20=20= (propertize=20(or=20gdb-memory-address-expression=20"N/A")=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20'face=20font-lock-warning-face=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'help-echo=20= "mouse-1:=20set=20start=20address"=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20'mouse-face=20'mode-line-highlight=0A@@=20-3745,7=20= +3745,7=20@@=20gdb-memory-header=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'mouse-1=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#'gdb-memory-show-next-page))=0A=20=20=20=20=20=20"]:=20"=0A-=20=20=20= =20=20(propertize=20gdb-memory-address=0A+=20=20=20=20=20(propertize=20= (or=20gdb-memory-address=20"N/A")=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20'face=20font-lock-warning-face)=0A=20=20=20=20=20=20"=20=20= Rows:=20"=0A=20=20=20=20=20=20(propertize=20(number-to-string=20= gdb-memory-rows)=0A--=20=0A2.24.1=0A=0A=0A=46rom=20= 5b784a7312623b83dbeecafcbe0421c1035f9483=20Mon=20Sep=2017=2000:00:00=20= 2001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Mon,=207=20Oct=20= 2019=2021:17:01=20-0400=0ASubject:=20[PATCH=204/4]=20= =3D?UTF-8?q?Display=3D20warning=3D20when=3D20address=3D20expres?=3D=0A=20= =3D?UTF-8?q?sion=3D20and=3D20address=3D20doesn=3DE2=3D80=3D99t=3D20match?=3D= =0AMIME-Version:=201.0=0AContent-Type:=20text/plain;=20charset=3DUTF-8=0A= Content-Transfer-Encoding:=208bit=0A=0A*=20lisp/progmodes/gdb-mi.el=20= (gdb--memory-display-warning):=20new=0A(gdb-read-memory-custom,=20= gdb-memory-header):=20Add=20warning=0A---=0A=20lisp/progmodes/gdb-mi.el=20= |=2015=20++++++++++++++-=0A=201=20file=20changed,=2014=20insertions(+),=20= 1=20deletion(-)=0A=0Adiff=20--git=20a/lisp/progmodes/gdb-mi.el=20= b/lisp/progmodes/gdb-mi.el=0Aindex=20eec11ebf0c..bdd01e0747=20100644=0A= ---=20a/lisp/progmodes/gdb-mi.el=0A+++=20b/lisp/progmodes/gdb-mi.el=0A@@=20= -112,6=20+112,12=20@@=20gdb-memory-next-page=0A=20=20=20"Address=20of=20= next=20memory=20page=20for=20program=20memory=20buffer.")=0A=20(defvar=09= gdb-memory-prev-page=20nil=0A=20=20=20"Address=20of=20previous=20memory=20= page=20for=20program=20memory=20buffer.")=0A+(defvar-local=20= gdb--memory-display-warning=20nil=0A+=20=20"Display=20warning=20on=20= memory=20header=20if=20t.=0A+=0A+When=20error=20occurs=20when=20= retrieving=20memory,=20gdb-mi=20displays=20the=20last=0A+successful=20= page.=20In=20that=20case=20the=20expression=20might=20not=20match=20the=0A= +memory=20displayed.")=0A=20=0A=20(defvar=20gdb-thread-number=20nil=0A=20= =20=20"Main=20current=20thread.=0A@@=20-3485,6=20+3491,9=20@@=20= gdb-read-memory-custom=0A=20=20=20=20=20=20=20=20=20=20(err-msg=20= (bindat-get-field=20res=20'msg)))=0A=20=20=20=20=20(if=20(not=20err-msg)=0A= =20=20=20=20=20=20=20=20=20(let=20((memory=20(bindat-get-field=20res=20= 'memory)))=0A+=20=20=20=20=20=20=20=20=20=20(when=20= gdb-memory-last-address=0A+=20=20=20=20=20=20=20=20=20=20=20=20;;=20nil=20= means=20last=20retrieve=20emits=20error=20or=20just=20started=20the=20= session=0A+=20=20=20=20=20=20=20=20=20=20=20=20(setq=20= gdb--memory-display-warning=20nil))=0A=20=20=20=20=20=20=20=20=20=20=20= (setq=20gdb-memory-address=20(bindat-get-field=20res=20'addr))=0A=20=20=20= =20=20=20=20=20=20=20=20(setq=20gdb-memory-next-page=20(bindat-get-field=20= res=20'next-page))=0A=20=20=20=20=20=20=20=20=20=20=20(setq=20= gdb-memory-prev-page=20(bindat-get-field=20res=20'prev-page))=0A@@=20= -3501,7=20+3510,8=20@@=20gdb-read-memory-custom=0A=20=20=20=20=20=20=20= (when=20gdb-memory-last-address=0A=20=20=20=20=20=20=20=20=20(let=20= ((gdb-memory-address-expression=20gdb-memory-last-address))=0A=20=20=20=20= =20=20=20=20=20=20=20;;=20avoid=20infinite=20loop=0A-=20=20=20=20=20=20=20= =20=20=20(setq=20gdb-memory-last-address=20nil)=0A+=20=20=20=20=20=20=20=20= =20=20(setq=20gdb-memory-last-address=20nil=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20gdb--memory-display-warning=20t)=0A=20=20=20=20=20=20= =20=20=20=20=20(gdb-invalidate-memory=20'update)=0A=20=20=20=20=20=20=20=20= =20=20=20(user-error=20"Error=20when=20retrieving=20memory:=20%s=20= Displaying=20last=20successful=20page"=20err-msg))))))=0A=20=0A@@=20= -3728,6=20+3738,9=20@@=20gdb-memory-header=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20'local-map=20(gdb-make-header-line-mouse-map=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'mouse-1=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#'gdb-memory-set-address-event))=0A= +=20=20=20=20=20(if=20gdb--memory-display-warning=0A+=20=20=20=20=20=20=20= =20=20(propertize=20"=20!"=20'face=20'(:inherit=20error=20:weight=20= bold))=0A+=20=20=20=20=20=20=20"")=0A=20=20=20=20=20=20"=20["=0A=20=20=20= =20=20=20(propertize=20"-"=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20'face=20font-lock-warning-face=0A--=20=0A2.24.1=0A=0A= --Apple-Mail=_423604B8-ABF9-43AE-9CBA-332AAA0AA536 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii In GNU Emacs 27.0.50 (build 3, x86_64-apple-darwin19.0.0, NS = appkit-1894.10 Version 10.15.1 (Build 19B88)) of 2019-11-30 built on missSilver Repository revision: e2828795d73637577c7726965974a047fe2d7119 Repository branch: master Windowing system distributor 'Apple', version 10.3.1894 System Description: Mac OS X 10.15.2 Recent messages: Checking 24 files in /Users/yuan/attic/emacs/lisp/cedet... Checking 59 files in /Users/yuan/attic/emacs/lisp/calendar... Checking 87 files in /Users/yuan/attic/emacs/lisp/calc... Checking 113 files in /Users/yuan/attic/emacs/lisp/obsolete... Checking for load-path shadows...done Auto-saving... Quit C-x C-g is undefined Quit Buffer *unsent mail to bug-gnu-emacs@gnu.org*<2> modified; kill anyway? = (y or n) y 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: NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS 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: Emacs-Lisp Minor modes in effect: magit-todos-mode: t bug-reference-prog-mode: t desktop-save-mode: t ghelp-global-minor-mode: t minibuffer-electric-default-mode: t flymake-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 flyspell-mode: t outshine-mode: t ws-butler-global-mode: t ws-butler-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 aggressive-indent-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 ivy-mode: t company-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t 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 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/nerd-font/test/test-helper hides = /Users/yuan/.emacs.d/ranch/doom-themes/test/test-helper /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/attic/emacs/lisp/emacs-lisp/faceup Features: (magit-todos pcre2el rxt re-builder grep checkdoc lisp-mnt bug-reference vc-mtn vc-hg ffap tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time iso8601 ls-lisp shadow sort mail-extr emacsbug sendmail vc-git vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher magit-bookmark bookmark company-oddmuse company-keywords company-etags etags fileloop 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 hideshow desktop frameset trivial-copy ghelp-eglot ghelp-helpful ghelp-builtin ghelp cus-edit cus-start cus-load luna-publish utility pause luna-general-config minibuf-eldef eglot array jsonrpc ert pp ewoc debug flymake-proc flymake warnings url-util 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 diff-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode transient git-commit magit-git magit-section magit-utils crm log-edit message rmc puny rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor async-bytecomp async shell server 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-element avl-tree generator org advice org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities time-date noutline outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat 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 easy-mmode use-package-core finder-inf tex-site 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 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 197959 23437) (symbols 48 9374 49) (strings 32 38335 2058) (string-bytes 1 1116712) (vectors 16 24652) (vector-slots 8 289694 28446) (floats 8 511 434) (intervals 56 14675 1317) (buffers 1000 27)) --Apple-Mail=_423604B8-ABF9-43AE-9CBA-332AAA0AA536-- From unknown Wed Sep 10 10:35:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39180: 27.0.50; [PATCH] Use expressions as memory location in gdb-mi memory buffer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jan 2020 10:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39180 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Yuan Fu Cc: 39180@debbugs.gnu.org Received: via spool by 39180-submit@debbugs.gnu.org id=B39180.15804651818506 (code B ref 39180); Fri, 31 Jan 2020 10:07:02 +0000 Received: (at 39180) by debbugs.gnu.org; 31 Jan 2020 10:06:21 +0000 Received: from localhost ([127.0.0.1]:36595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixTBs-0002D8-RG for submit@debbugs.gnu.org; Fri, 31 Jan 2020 05:06:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixTBo-0002Cv-NN for 39180@debbugs.gnu.org; Fri, 31 Jan 2020 05:06:19 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ixTBj-0001NW-Id; Fri, 31 Jan 2020 05:06:11 -0500 Received: from [176.228.60.248] (port=2184 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ixTBe-0000pn-GA; Fri, 31 Jan 2020 05:06:07 -0500 Date: Fri, 31 Jan 2020 12:05:43 +0200 Message-Id: <83mua4kkjs.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <4A45AE37-414A-4D78-A49C-B40FB72736C4@gmail.com> (message from Yuan Fu on Sat, 18 Jan 2020 15:54:35 -0500) References: <4A45AE37-414A-4D78-A49C-B40FB72736C4@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Yuan Fu > Date: Sat, 18 Jan 2020 15:54:35 -0500 > > Currently gdb-mi does allow expressions as memory address, but it translates it to a fixed address. This patch makes gdb to store the expression and re-evaluate on updates. So the address changes as expression’s value changes. Thanks. Are these 4 patches needed to add the above improvement, or is each part of the series independent, and could be applied on its own right? If the entire series should be applied in a single transaction, please make then a single patch, as that makes it easier to review and apply. Otherwise, please explain what is the rationale for each part separately, because I don't think I understand it. > Before the memory buffer evaluates the expression as address > and use the fixed result in each stop. This change stores the > expression itself and reevaluates it in each stop for an address. > Then displays the value of the memory at that address. Two spaces between sentences (here and elsewhere in the patch), please. > lisp/progmodes/gdb-mi.el (gdb-memory-address-expression): new > (gdb-memory-address): change default value, add docstring > (def-gdb-trigger-and-handler gdb-invalidate-memory, > gdb-memory-set-address): replace ’gdb-memory-address’ with > ’gdb-memory-address-expression’ > (gdb-memory-header): Add display for ’gdb-memory-address-expression’, > move the mouse event from address to expression Please quote symbols 'like this'. > * lisp/progmodes/gdb-mi.el (gdb-read-memory-custom): > Break infinite loop. Change ’error’ to ’user-error’ I don't understand what infinite loop are you alluding to here, and how did it come into existence. > * lisp/progmodes/gdb-mi.el (gdb-memory-header): > Protect against nil value And what is the problem you are trying to solve here? > * lisp/progmodes/gdb-mi.el (gdb--memory-display-warning): new > (gdb-read-memory-custom, gdb-memory-header): Add warning And what is this part about? From unknown Wed Sep 10 10:35:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39180: 27.0.50; [PATCH] Use expressions as memory location in gdb-mi memory buffer Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Feb 2020 02:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39180 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 39180@debbugs.gnu.org Received: via spool by 39180-submit@debbugs.gnu.org id=B39180.158052391218338 (code B ref 39180); Sat, 01 Feb 2020 02:26:01 +0000 Received: (at 39180) by debbugs.gnu.org; 1 Feb 2020 02:25:12 +0000 Received: from localhost ([127.0.0.1]:38258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixiTA-0004li-15 for submit@debbugs.gnu.org; Fri, 31 Jan 2020 21:25:12 -0500 Received: from mail-qv1-f67.google.com ([209.85.219.67]:46316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixiT8-0004lN-Qe for 39180@debbugs.gnu.org; Fri, 31 Jan 2020 21:25:11 -0500 Received: by mail-qv1-f67.google.com with SMTP id y2so4196529qvu.13 for <39180@debbugs.gnu.org>; Fri, 31 Jan 2020 18:25:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=P36N5xSh5VcJfgyCb0d8ssveku0+AqvhvULEQHog+6Q=; b=ZFyBfbVfJnQ6yI/gZPEORI6hujV0eBeOoXsEFw0KGQ+IB/O4jdzX1q2RyQmiSipf6+ oPcQWOFoE5EhwLGrzYgaeuIUetFK2aJtFlTItv3I/UjodzIxhffdVvZDc4/w3d2Hv+T0 rgAyZaSxZ0nyMrJ+I+trHTQ9aTB05yiSxM8Kue5vMtD83bnaSUTjshXVUCcYjTovTk/A mvn+Xretnv7Yhb4ptTG6PuE5SFEk0udg/8FX7zwabWaGYaKX2vj4inVKi0vJcGNAbmuJ 9RIIkYibXTrZtHuTmNBVyul3Jo78X8BqvPOGzO+aaI9ctIfzMiVawaLhI5/oCpNoyB8O FGng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=P36N5xSh5VcJfgyCb0d8ssveku0+AqvhvULEQHog+6Q=; b=GJT3Fymd0FdXUuwHBW4wsFF1b/PxGRS89u1rAZSPpaZJPEBMACJbXKs9n2UTLKBAyy +RtUOlaGuzZcEE/zuVLRG28lIV+4MT4mj0v55rDmxnl5Z1+q0Nww9PAqe/7aYD7wJosI s5ossPjMLsLtbKzEMLzukrr40JBfpckayF8kuvfqlShiik09n8wLzVlEpdiDt1gbCVtv TrvjDpU61HjyTu5Btrw8pbyv5YFqlnd/tn8RMr7pZdE7+yhnU8LYiBickb2RNZDmV+mM 9Aid+emGkbV4F8cswCXQsxOpVkOplsaq16qwT4+Tgefzi9Odo+XLTX5CeyijAT5wOZ8n qKlw== X-Gm-Message-State: APjAAAVe+D+v/wNlww0ycqzJHqr6Ec4QvPP0PARHSl8xuewsbOafndFP NyRlRImuzxSMeTMMBumCvEg= X-Google-Smtp-Source: APXvYqxADDY027bp2bGHyoNjK64xGGxupEE4Tp+uglCQgaNb+P5qocKdEPyY7HkOm2Ca14F9sKPiDg== X-Received: by 2002:a05:6214:20c:: with SMTP id i12mr13476926qvt.48.1580523905272; Fri, 31 Jan 2020 18:25:05 -0800 (PST) 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 d25sm5759725qtq.11.2020.01.31.18.25.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jan 2020 18:25:04 -0800 (PST) From: Yuan Fu Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_2919A712-10BC-40C4-AD71-82909C9D7C5A" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Date: Fri, 31 Jan 2020 21:25:00 -0500 In-Reply-To: <83mua4kkjs.fsf@gnu.org> References: <4A45AE37-414A-4D78-A49C-B40FB72736C4@gmail.com> <83mua4kkjs.fsf@gnu.org> X-Mailer: Apple Mail (2.3608.40.2.2.4) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Apple-Mail=_2919A712-10BC-40C4-AD71-82909C9D7C5A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 31, 2020, at 5:05 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Sat, 18 Jan 2020 15:54:35 -0500 >>=20 >> Currently gdb-mi does allow expressions as memory address, but it = translates it to a fixed address. This patch makes gdb to store the = expression and re-evaluate on updates. So the address changes as = expression=E2=80=99s value changes. >=20 > Thanks. >=20 > Are these 4 patches needed to add the above improvement, or is each > part of the series independent, and could be applied on its own right? >=20 I merged them into one. > If the entire series should be applied in a single transaction, please > make then a single patch, as that makes it easier to review and > apply. Otherwise, please explain what is the rationale for each part > separately, because I don't think I understand it. >=20 >> Before the memory buffer evaluates the expression as address >> and use the fixed result in each stop. This change stores the >> expression itself and reevaluates it in each stop for an address. >> Then displays the value of the memory at that address. >=20 > Two spaces between sentences (here and elsewhere in the patch), > please. >=20 >> lisp/progmodes/gdb-mi.el (gdb-memory-address-expression): new >> (gdb-memory-address): change default value, add docstring >> (def-gdb-trigger-and-handler gdb-invalidate-memory, >> gdb-memory-set-address): replace =E2=80=99gdb-memory-address=E2=80=99 = with >> =E2=80=99gdb-memory-address-expression=E2=80=99 >> (gdb-memory-header): Add display for = =E2=80=99gdb-memory-address-expression=E2=80=99, >> move the mouse event from address to expression >=20 > Please quote symbols 'like this'. Both fixed. >=20 >> * lisp/progmodes/gdb-mi.el (gdb-read-memory-custom): >> Break infinite loop. Change =E2=80=99error=E2=80=99 to = =E2=80=99user-error=E2=80=99 >=20 > I don't understand what infinite loop are you alluding to here, and > how did it come into existence. Added some comments to explain. >=20 >> * lisp/progmodes/gdb-mi.el (gdb-memory-header): >> Protect against nil value >=20 > And what is the problem you are trying to solve here? Added some comments. >=20 >> * lisp/progmodes/gdb-mi.el (gdb--memory-display-warning): new >> (gdb-read-memory-custom, gdb-memory-header): Add warning >=20 > And what is this part about? Added some explanation in commit message and docstring of = gdb--memory-display-warning. And here is the new patch. Yuan --Apple-Mail=_2919A712-10BC-40C4-AD71-82909C9D7C5A Content-Disposition: attachment; filename=memory-fixed.patch Content-Type: application/octet-stream; x-unix-mode=0700; name="memory-fixed.patch" Content-Transfer-Encoding: quoted-printable =46rom=206be6b8aa1215aeac0cbed7432b980408b1275b24=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Sat,=20= 5=20Oct=202019=2022:42:07=20-0400=0ASubject:=20[PATCH]=20Enhance=20= memory=20buffer=20in=20gdb-mi=0A=0A1.=20Enhance=20support=20for=20= expressions=20as=20memory=20address=0A=0ABefore,=20the=20memory=20buffer=20= evaluates=20the=20expression=20as=20address=20and=20use=0Athe=20fixed=20= result=20in=20each=20stop.=20=20This=20change=20makes=20gdb=20store=20= the=0Aexpression=20itself=20and=20reevaluates=20it=20in=20each=20stop=20= for=20an=20address.=0A=0AWe=20also=20add=20a=20warning=20(a=20red=20bold=20= exclamation=20mark)=20on=20the=20header=20line=0Awhen=20the=20content=20= of=20the=20page=20doesn't=20represent=20the=20memory=20location=0Auser=20= requested=20for.=20=20That=20happends=20when=20some=20error=20occurs=20= and=20we=0Adisplay=20the=20last=20successful=20page.=0A=0A= lisp/progmodes/gdb-mi.el=20(gdb-memory-address-expression,=0A= gdb--memory-display-warning):=20New=20variables.=0A(gdb-memory-address):=20= Change=20default=20value=20to=20nil;=20add=20docstring.=0A= (def-gdb-trigger-and-handler,=20gdb-invalidate-memory,=0A= gdb-memory-set-address):=20Replace=20'gdb-memory-address'=20with=0A= 'gdb-memory-address-expression'.=0A(gdb-memory-header):=20Add=20code=20= to=20display=0A'gdb-memory-address-expression'=20on=20header=20line.=20=20= Move=20the=20mouse=20event=0Afrom=20address=20to=20expression.=20=20Add=20= code=20to=20display=20the=20warning.=0A(gdb-memory-header):=20Fix=20the=20= error=20from=0A'propertize'=20when=20'gdb-memory-address-expression'=20= or=0A'gdb-memory-address'=20is=20nil.=0A(gdb-read-memory-custom):=20= Change=20'error'=20to=20'user-error'.=20=20Add=20code=20to=0Adisplay=20= the=20warning.=0A---=0A=20lisp/progmodes/gdb-mi.el=20|=2057=20= +++++++++++++++++++++++++++++-----------=0A=201=20file=20changed,=2042=20= insertions(+),=2015=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/progmodes/gdb-mi.el=20b/lisp/progmodes/gdb-mi.el=0Aindex=20= 60852e4ad6..1384837a04=20100644=0A---=20a/lisp/progmodes/gdb-mi.el=0A+++=20= b/lisp/progmodes/gdb-mi.el=0A@@=20-105,13=20+105,24=20@@=20tool-bar-map=0A= =20(defvar=20speedbar-initial-expansion-list-name)=0A=20(defvar=20= speedbar-frame)=0A=20=0A-(defvar=09gdb-memory-address=20"main")=0A= -(defvar=09gdb-memory-last-address=20nil=0A+(defvar-local=20= gdb-memory-address-expression=20"main"=0A+=20=20"This=20expression=20is=20= passed=20to=20gdb.=0A+Possible=20value:=20main,=20$rsp,=20x+3.")=0A= +(defvar-local=20gdb-memory-address=20nil=0A+=20=20"Address=20of=20= memory=20display.")=0A+(defvar-local=20gdb-memory-last-address=20nil=0A=20= =20=20"Last=20successfully=20accessed=20memory=20address.")=0A=20(defvar=09= gdb-memory-next-page=20nil=0A=20=20=20"Address=20of=20next=20memory=20= page=20for=20program=20memory=20buffer.")=0A=20(defvar=09= gdb-memory-prev-page=20nil=0A=20=20=20"Address=20of=20previous=20memory=20= page=20for=20program=20memory=20buffer.")=0A+(defvar-local=20= gdb--memory-display-warning=20nil=0A+=20=20"Display=20warning=20on=20= memory=20header=20if=20t.=0A+=0A+When=20error=20occurs=20when=20= retrieving=20memory,=20gdb-mi=20displays=20the=0A+last=20successful=20= page.=20=20In=20that=20case=20the=20expression=20might=20not=0A+match=20= the=20memory=20displayed.=20=20We=20want=20to=20let=20the=20user=20be=20= aware=20of=0A+that,=20so=20display=20a=20warning=20exclamation=20mark=20= in=20the=20header=20line.")=0A=20=0A=20(defvar=20gdb-thread-number=20nil=0A= =20=20=20"Main=20current=20thread.=0A@@=20-3444,7=20+3455,7=20@@=20= gdb-memory-unit=0A=20(def-gdb-trigger-and-handler=0A=20=20=20= gdb-invalidate-memory=0A=20=20=20(format=20"-data-read-memory=20%s=20%s=20= %d=20%d=20%d"=0A-=20=20=20=20=20=20=20=20=20=20gdb-memory-address=0A+=20=20= =20=20=20=20=20=20=20=20(gdb-mi-quote=20gdb-memory-address-expression)=0A= =20=20=20=20=20=20=20=20=20=20=20gdb-memory-format=0A=20=20=20=20=20=20=20= =20=20=20=20gdb-memory-unit=0A=20=20=20=20=20=20=20=20=20=20=20= gdb-memory-rows=0A@@=20-3484,6=20+3495,9=20@@=20gdb-read-memory-custom=0A= =20=20=20=20=20=20=20=20=20=20(err-msg=20(bindat-get-field=20res=20= 'msg)))=0A=20=20=20=20=20(if=20(not=20err-msg)=0A=20=20=20=20=20=20=20=20= =20(let=20((memory=20(bindat-get-field=20res=20'memory)))=0A+=20=20=20=20= =20=20=20=20=20=20(when=20gdb-memory-last-address=0A+=20=20=20=20=20=20=20= =20=20=20=20=20;;=20Nil=20means=20last=20retrieve=20emits=20error=20or=20= just=20started=20the=20session.=0A+=20=20=20=20=20=20=20=20=20=20=20=20= (setq=20gdb--memory-display-warning=20nil))=0A=20=20=20=20=20=20=20=20=20= =20=20(setq=20gdb-memory-address=20(bindat-get-field=20res=20'addr))=0A=20= =20=20=20=20=20=20=20=20=20=20(setq=20gdb-memory-next-page=20= (bindat-get-field=20res=20'next-page))=0A=20=20=20=20=20=20=20=20=20=20=20= (setq=20gdb-memory-prev-page=20(bindat-get-field=20res=20'prev-page))=0A= @@=20-3497,10=20+3511,15=20@@=20gdb-read-memory-custom=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=20=20=20=20=20=20=20=20=20gdb-memory-format)))))=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20(newline)))=0A=20=20=20=20=20=20=20;;=20= Show=20last=20page=20instead=20of=20empty=20buffer=20when=20out=20of=20= bounds=0A-=20=20=20=20=20=20(progn=0A-=20=20=20=20=20=20=20=20(let=20= ((gdb-memory-address=20gdb-memory-last-address))=0A+=20=20=20=20=20=20= (when=20gdb-memory-last-address=0A+=20=20=20=20=20=20=20=20(let=20= ((gdb-memory-address-expression=20gdb-memory-last-address))=0A+=20=20=20=20= =20=20=20=20=20=20;;=20If=20we=20don't=20set=20`gdb-memory-last-address'=20= to=20nil,=0A+=20=20=20=20=20=20=20=20=20=20;;=20`gdb-invalidate-memory'=20= eventually=20calls=0A+=20=20=20=20=20=20=20=20=20=20;;=20= `gdb-read-memory-custom',=20making=20an=20infinite=20loop.=0A+=20=20=20=20= =20=20=20=20=20=20(setq=20gdb-memory-last-address=20nil=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20gdb--memory-display-warning=20t)=0A=20=20= =20=20=20=20=20=20=20=20=20(gdb-invalidate-memory=20'update)=0A-=20=20=20= =20=20=20=20=20=20=20(error=20err-msg))))))=0A+=20=20=20=20=20=20=20=20=20= =20(user-error=20"Error=20when=20retrieving=20memory:=20%s=20Displaying=20= last=20successful=20page"=20err-msg))))))=0A=20=0A=20(defvar=20= gdb-memory-mode-map=0A=20=20=20(let=20((map=20(make-sparse-keymap)))=0A= @@=20-3534,7=20+3553,7=20@@=20gdb-memory-set-address=0A=20=20=20"Set=20= the=20start=20memory=20address."=0A=20=20=20(interactive)=0A=20=20=20= (let=20((arg=20(read-from-minibuffer=20"Memory=20address:=20")))=0A-=20=20= =20=20(setq=20gdb-memory-address=20arg))=0A+=20=20=20=20(setq=20= gdb-memory-address-expression=20arg))=0A=20=20=20(gdb-invalidate-memory=20= 'update))=0A=20=0A=20(defmacro=20def-gdb-set-positive-number=20(name=20= variable=20echo-string=20&optional=20doc)=0A@@=20-3717,7=20+3736,19=20@@=20= gdb-memory-font-lock-keywords=0A=20(defvar=20gdb-memory-header=0A=20=20=20= '(:eval=0A=20=20=20=20=20(concat=0A-=20=20=20=20=20"Start=20address["=0A= +=20=20=20=20=20"Start=20address=20"=0A+=20=20=20=20=20;;=20If=20= `gdb-memory-address-expression'=20is=20nil,=20`propertize'=20would=20= error.=0A+=20=20=20=20=20(propertize=20(or=20= gdb-memory-address-expression=20"N/A")=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20'face=20font-lock-warning-face=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20'help-echo=20"mouse-1:=20set=20start=20= address"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= 'mouse-face=20'mode-line-highlight=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20'local-map=20(gdb-make-header-line-mouse-map=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= 'mouse-1=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#'gdb-memory-set-address-event))=0A+=20=20=20=20=20= (if=20gdb--memory-display-warning=0A+=20=20=20=20=20=20=20=20=20= (propertize=20"=20!"=20'face=20'(:inherit=20error=20:weight=20bold))=0A+=20= =20=20=20=20=20=20"")=0A+=20=20=20=20=20"=20["=0A=20=20=20=20=20=20= (propertize=20"-"=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= 'face=20font-lock-warning-face=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20'help-echo=20"mouse-1:=20decrement=20address"=0A@@=20= -3734,13=20+3765,9=20@@=20gdb-memory-header=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'mouse-1=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#'gdb-memory-show-next-page))=0A=20=20=20=20=20=20"]:=20"=0A= -=20=20=20=20=20(propertize=20gdb-memory-address=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20'face=20font-lock-warning-face=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20'help-echo=20"mouse-1:=20set=20= start=20address"=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= 'mouse-face=20'mode-line-highlight=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20'local-map=20(gdb-make-header-line-mouse-map=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= 'mouse-1=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#'gdb-memory-set-address-event))=0A+=20=20=20=20=20= ;;=20If=20`gdb-memory-address'=20is=20nil,=20`propertize'=20would=20= error.=0A+=20=20=20=20=20(propertize=20(or=20gdb-memory-address=20"N/A")=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'face=20= font-lock-warning-face)=0A=20=20=20=20=20=20"=20=20Rows:=20"=0A=20=20=20=20= =20=20(propertize=20(number-to-string=20gdb-memory-rows)=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20'face=20font-lock-warning-face=0A= --=20=0A2.25.0=0A=0A= --Apple-Mail=_2919A712-10BC-40C4-AD71-82909C9D7C5A-- From unknown Wed Sep 10 10:35:32 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Yuan Fu Subject: bug#39180: closed (Re: bug#39180: 27.0.50; [PATCH] Use expressions as memory location in gdb-mi memory buffer) Message-ID: References: <83d0ape79y.fsf@gnu.org> <4A45AE37-414A-4D78-A49C-B40FB72736C4@gmail.com> X-Gnu-PR-Message: they-closed 39180 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 39180@debbugs.gnu.org Date: Sat, 08 Feb 2020 09:53:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1581155582-14967-1" This is a multi-part message in MIME format... ------------=_1581155582-14967-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #39180: 27.0.50; [PATCH] Use expressions as memory location in gdb-mi memor= y buffer which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 39180@debbugs.gnu.org. --=20 39180: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39180 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1581155582-14967-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 39180-done) by debbugs.gnu.org; 8 Feb 2020 09:52:04 +0000 Received: from localhost ([127.0.0.1]:50633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0MmR-0003sC-PG for submit@debbugs.gnu.org; Sat, 08 Feb 2020 04:52:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0MmP-0003ri-TF for 39180-done@debbugs.gnu.org; Sat, 08 Feb 2020 04:52:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j0MmK-0008EZ-Nb; Sat, 08 Feb 2020 04:51:56 -0500 Received: from [176.228.60.248] (port=4243 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j0MmK-0006k7-5F; Sat, 08 Feb 2020 04:51:56 -0500 Date: Sat, 08 Feb 2020 11:51:37 +0200 Message-Id: <83d0ape79y.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-reply-to: (message from Yuan Fu on Fri, 31 Jan 2020 21:25:00 -0500) Subject: Re: bug#39180: 27.0.50; [PATCH] Use expressions as memory location in gdb-mi memory buffer References: <4A45AE37-414A-4D78-A49C-B40FB72736C4@gmail.com> <83mua4kkjs.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39180-done Cc: 39180-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Yuan Fu > Date: Fri, 31 Jan 2020 21:25:00 -0500 > Cc: 39180@debbugs.gnu.org > > And here is the new patch. Thanks, I pushed it to the master branch. I had to make some minor editing changes in the commit log message; please see what I changed and try to follow this style in the future. ------------=_1581155582-14967-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Jan 2020 20:54:44 +0000 Received: from localhost ([127.0.0.1]:42288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isv7D-0007q0-Up for submit@debbugs.gnu.org; Sat, 18 Jan 2020 15:54:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:49003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isv7B-0007pq-Me for submit@debbugs.gnu.org; Sat, 18 Jan 2020 15:54:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58400) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isv79-0006Jv-N3 for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2020 15:54:41 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isv77-0007eJ-Qm for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2020 15:54:39 -0500 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:36189) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1isv77-0007dx-Hg for bug-gnu-emacs@gnu.org; Sat, 18 Jan 2020 15:54:37 -0500 Received: by mail-qt1-x82e.google.com with SMTP id i13so24675279qtr.3 for ; Sat, 18 Jan 2020 12:54:37 -0800 (PST) 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=6i3L08fOElanyPnQvOB6raMh10jGzRR+ADCZVvzB1Io=; b=ah5Jpjck1uHHU2+xRpDg0YSsegi2p3u+Gk9xM4T6ynNf5FdH72hBQZh5O+JdIKyxkz bqFoAlNcG61h7tmO6n4Jrku6U04qxDAcplNLkPh5rgTpx7rjNRJ8X24+1rnmLQgM0OMc N8aEZp2HVuOjPreZpCtA3yTmVIoffnDPyDZTjolDW2wzr5dlZLsE1gCkLzWRaW4MAKYd Vpn9azAl47EcO1XQb+ZwH3wwP4woV4jnEVLmrAbKFojHmq9Uv7083FBliScUmAQELcHq KooSyDWiS5ZFXiNzvCJqy61byeXxoZ0UdPWfSoT9whF1FLEWS2a8Jdg2N1iLuTqlQIQ+ pj2A== 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=6i3L08fOElanyPnQvOB6raMh10jGzRR+ADCZVvzB1Io=; b=k4W50sYwRZgWUVy41MkhWtPEmvR/T5x1ey6K/qmbSh8SZBtXTQKGuLosb9vrEmUbr/ FjJtH3M+6XZfpf9A2TArsrYVunIS2FC8FcehHFDWe5iW1EZ6yL/qUGp0WGgOHgJaambT X/nIDRrZOOdOXyigQcc/LGraKOtSIZ7DLW9939jf2CBjSwEyBSBb3hRYN7RrPtjukl6V mqll070Sx/TQ4vNcjDYn5ZejM7J0eOwIyv6nzSPymUQ2LNQj0iMItf0u/spnvXgG4fID YISagxUTqPsi/3H7aHnu3t7e4i+61lz18IOgT7VhZGyb9LZ9+pGBigGD7fbY1gDBeu5b 3pHg== X-Gm-Message-State: APjAAAVTlXm1LGAw/4OD1O+6u37i4t4EcqMaGc5Ab0GIb2WM018oscOa sv4nbhgpaOFt58uzRq0YaptyFdab0WCkkjWn X-Google-Smtp-Source: APXvYqxPAh+CyftUM+8Y2E5ODmrJ5XDKtDlY7+erLAYgpGmiLae7BqFK/e83JG7QSDxicUz7DBqulA== X-Received: by 2002:ac8:5298:: with SMTP id s24mr13339017qtn.89.1579380876789; Sat, 18 Jan 2020 12:54:36 -0800 (PST) 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 c184sm13578930qke.118.2020.01.18.12.54.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Jan 2020 12:54:36 -0800 (PST) From: Yuan Fu Content-Type: multipart/mixed; boundary="Apple-Mail=_423604B8-ABF9-43AE-9CBA-332AAA0AA536" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: 27.0.50; [PATCH] Use expressions as memory location in gdb-mi memory buffer Message-Id: <4A45AE37-414A-4D78-A49C-B40FB72736C4@gmail.com> Date: Sat, 18 Jan 2020 15:54:35 -0500 To: Bug Report Emacs X-Mailer: Apple Mail (2.3608.40.2.2.4) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::82e X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --Apple-Mail=_423604B8-ABF9-43AE-9CBA-332AAA0AA536 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Currently gdb-mi does allow expressions as memory address, but it = translates it to a fixed address. This patch makes gdb to store the = expression and re-evaluate on updates. So the address changes as = expression=E2=80=99s value changes. --Apple-Mail=_423604B8-ABF9-43AE-9CBA-332AAA0AA536 Content-Disposition: attachment; filename=memory.patch Content-Type: application/octet-stream; x-unix-mode=0700; name="memory.patch" Content-Transfer-Encoding: quoted-printable =46rom=20932a0e0bbec7939a89431bdc31316afbf2d23cde=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Sat,=20= 5=20Oct=202019=2022:42:07=20-0400=0ASubject:=20[PATCH=201/4]=20Enhance=20= support=20for=20expressions=20as=20memory=20address=0AMIME-Version:=20= 1.0=0AContent-Type:=20text/plain;=20charset=3DUTF-8=0A= Content-Transfer-Encoding:=208bit=0A=0ABefore=20the=20memory=20buffer=20= evaluates=20the=20expression=20as=20address=0Aand=20use=20the=20fixed=20= result=20in=20each=20stop.=20This=20change=20stores=20the=0Aexpression=20= itself=20and=20reevaluates=20it=20in=20each=20stop=20for=20an=20address.=0A= Then=20displays=20the=20value=20of=20the=20memory=20at=20that=20address.=0A= =0Alisp/progmodes/gdb-mi.el=20(gdb-memory-address-expression):=20new=0A=20= =20(gdb-memory-address):=20change=20default=20value,=20add=20docstring=0A= =20=20(def-gdb-trigger-and-handler=20gdb-invalidate-memory,=0A=20=20= gdb-memory-set-address):=20replace=20=E2=80=99gdb-memory-address=E2=80=99=20= with=0A=20=20=20=20=E2=80=99gdb-memory-address-expression=E2=80=99=0A=20=20= (gdb-memory-header):=20Add=20display=20for=20= =E2=80=99gdb-memory-address-expression=E2=80=99,=0A=20=20=20=20move=20= the=20mouse=20event=20from=20address=20to=20expression=0A---=0A=20= lisp/progmodes/gdb-mi.el=20|=2021=20++++++++++++---------=0A=201=20file=20= changed,=2012=20insertions(+),=209=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/progmodes/gdb-mi.el=20b/lisp/progmodes/gdb-mi.el=0Aindex=20= b08d487af3..bd4d216860=20100644=0A---=20a/lisp/progmodes/gdb-mi.el=0A+++=20= b/lisp/progmodes/gdb-mi.el=0A@@=20-3445,7=20+3445,7=20@@=20= gdb-memory-unit=0A=20(def-gdb-trigger-and-handler=0A=20=20=20= gdb-invalidate-memory=0A=20=20=20(format=20"-data-read-memory=20%s=20%s=20= %d=20%d=20%d"=0A-=20=20=20=20=20=20=20=20=20=20gdb-memory-address=0A+=20=20= =20=20=20=20=20=20=20=20(gdb-mi-quote=20gdb-memory-address-expression)=0A= =20=20=20=20=20=20=20=20=20=20=20gdb-memory-format=0A=20=20=20=20=20=20=20= =20=20=20=20gdb-memory-unit=0A=20=20=20=20=20=20=20=20=20=20=20= gdb-memory-rows=0A@@=20-3535,7=20+3535,7=20@@=20gdb-memory-set-address=0A= =20=20=20"Set=20the=20start=20memory=20address."=0A=20=20=20= (interactive)=0A=20=20=20(let=20((arg=20(read-from-minibuffer=20"Memory=20= address:=20")))=0A-=20=20=20=20(setq=20gdb-memory-address=20arg))=0A+=20=20= =20=20(setq=20gdb-memory-address-expression=20arg))=0A=20=20=20= (gdb-invalidate-memory=20'update))=0A=20=0A=20(defmacro=20= def-gdb-set-positive-number=20(name=20variable=20echo-string=20&optional=20= doc)=0A@@=20-3718,7=20+3718,15=20@@=20gdb-memory-font-lock-keywords=0A=20= (defvar=20gdb-memory-header=0A=20=20=20'(:eval=0A=20=20=20=20=20(concat=0A= -=20=20=20=20=20"Start=20address["=0A+=20=20=20=20=20"Start=20address=20= "=0A+=20=20=20=20=20(propertize=20gdb-memory-address-expression=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'face=20= font-lock-warning-face=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20'help-echo=20"mouse-1:=20set=20start=20address"=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20'mouse-face=20'mode-line-highlight=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'local-map=20= (gdb-make-header-line-mouse-map=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'mouse-1=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= #'gdb-memory-set-address-event))=0A+=20=20=20=20=20"=20["=0A=20=20=20=20=20= =20(propertize=20"-"=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20'face=20font-lock-warning-face=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20'help-echo=20"mouse-1:=20decrement=20address"=0A@@=20= -3736,12=20+3744,7=20@@=20gdb-memory-header=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= #'gdb-memory-show-next-page))=0A=20=20=20=20=20=20"]:=20"=0A=20=20=20=20=20= =20(propertize=20gdb-memory-address=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20'face=20font-lock-warning-face=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20'help-echo=20"mouse-1:=20set=20start=20= address"=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= 'mouse-face=20'mode-line-highlight=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20'local-map=20(gdb-make-header-line-mouse-map=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= 'mouse-1=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#'gdb-memory-set-address-event))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20'face=20font-lock-warning-face)=0A=20= =20=20=20=20=20"=20=20Rows:=20"=0A=20=20=20=20=20=20(propertize=20= (number-to-string=20gdb-memory-rows)=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20'face=20font-lock-warning-face=0A--=20=0A2.24.1=0A=0A=0A= =46rom=20d4e98f53dcb228b58f6c72b41ce2150160e863d7=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Mon,=20= 7=20Oct=202019=2020:36:23=20-0400=0ASubject:=20[PATCH=202/4]=20Fix=20= memory=20buffer=20code=20in=20gdb-mi=0AMIME-Version:=201.0=0A= Content-Type:=20text/plain;=20charset=3DUTF-8=0A= Content-Transfer-Encoding:=208bit=0A=0A*=20lisp/progmodes/gdb-mi.el=20= (gdb-read-memory-custom):=0ABreak=20infinite=20loop.=20Change=20= =E2=80=99error=E2=80=99=20to=20=E2=80=99user-error=E2=80=99=0A---=0A=20= lisp/progmodes/gdb-mi.el=20|=208=20+++++---=0A=201=20file=20changed,=205=20= insertions(+),=203=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/progmodes/gdb-mi.el=20b/lisp/progmodes/gdb-mi.el=0Aindex=20= bd4d216860..662671885c=20100644=0A---=20a/lisp/progmodes/gdb-mi.el=0A+++=20= b/lisp/progmodes/gdb-mi.el=0A@@=20-3498,10=20+3498,12=20@@=20= gdb-read-memory-custom=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=20=20=20=20=20= =20=20=20=20gdb-memory-format)))))=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20(newline)))=0A=20=20=20=20=20=20=20;;=20Show=20last=20page=20instead=20= of=20empty=20buffer=20when=20out=20of=20bounds=0A-=20=20=20=20=20=20= (progn=0A-=20=20=20=20=20=20=20=20(let=20((gdb-memory-address=20= gdb-memory-last-address))=0A+=20=20=20=20=20=20(when=20= gdb-memory-last-address=0A+=20=20=20=20=20=20=20=20(let=20= ((gdb-memory-address-expression=20gdb-memory-last-address))=0A+=20=20=20=20= =20=20=20=20=20=20;;=20avoid=20infinite=20loop=0A+=20=20=20=20=20=20=20=20= =20=20(setq=20gdb-memory-last-address=20nil)=0A=20=20=20=20=20=20=20=20=20= =20=20(gdb-invalidate-memory=20'update)=0A-=20=20=20=20=20=20=20=20=20=20= (error=20err-msg))))))=0A+=20=20=20=20=20=20=20=20=20=20(user-error=20= "Error=20when=20retrieving=20memory:=20%s=20Displaying=20last=20= successful=20page"=20err-msg))))))=0A=20=0A=20(defvar=20= gdb-memory-mode-map=0A=20=20=20(let=20((map=20(make-sparse-keymap)))=0A= --=20=0A2.24.1=0A=0A=0A=46rom=20dc5008ac30718fd1e1920bb07300a0a2e10835c4=20= Mon=20Sep=2017=2000:00:00=202001=0AFrom:=20Yuan=20Fu=20= =0ADate:=20Mon,=207=20Oct=202019=2020:52:15=20-0400=0A= Subject:=20[PATCH=203/4]=20Protect=20against=20nil=20memory=20address=20= in=20gdb-mi=0A=0A*=20lisp/progmodes/gdb-mi.el=20(gdb-memory-header):=0A= Protect=20against=20nil=20value=0A---=0A=20lisp/progmodes/gdb-mi.el=20|=20= 4=20++--=0A=201=20file=20changed,=202=20insertions(+),=202=20= deletions(-)=0A=0Adiff=20--git=20a/lisp/progmodes/gdb-mi.el=20= b/lisp/progmodes/gdb-mi.el=0Aindex=20662671885c..eec11ebf0c=20100644=0A= ---=20a/lisp/progmodes/gdb-mi.el=0A+++=20b/lisp/progmodes/gdb-mi.el=0A@@=20= -3721,7=20+3721,7=20@@=20gdb-memory-header=0A=20=20=20'(:eval=0A=20=20=20= =20=20(concat=0A=20=20=20=20=20=20"Start=20address=20"=0A-=20=20=20=20=20= (propertize=20gdb-memory-address-expression=0A+=20=20=20=20=20= (propertize=20(or=20gdb-memory-address-expression=20"N/A")=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20'face=20font-lock-warning-face=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'help-echo=20= "mouse-1:=20set=20start=20address"=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20'mouse-face=20'mode-line-highlight=0A@@=20-3745,7=20= +3745,7=20@@=20gdb-memory-header=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'mouse-1=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#'gdb-memory-show-next-page))=0A=20=20=20=20=20=20"]:=20"=0A-=20=20=20= =20=20(propertize=20gdb-memory-address=0A+=20=20=20=20=20(propertize=20= (or=20gdb-memory-address=20"N/A")=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20'face=20font-lock-warning-face)=0A=20=20=20=20=20=20"=20=20= Rows:=20"=0A=20=20=20=20=20=20(propertize=20(number-to-string=20= gdb-memory-rows)=0A--=20=0A2.24.1=0A=0A=0A=46rom=20= 5b784a7312623b83dbeecafcbe0421c1035f9483=20Mon=20Sep=2017=2000:00:00=20= 2001=0AFrom:=20Yuan=20Fu=20=0ADate:=20Mon,=207=20Oct=20= 2019=2021:17:01=20-0400=0ASubject:=20[PATCH=204/4]=20= =3D?UTF-8?q?Display=3D20warning=3D20when=3D20address=3D20expres?=3D=0A=20= =3D?UTF-8?q?sion=3D20and=3D20address=3D20doesn=3DE2=3D80=3D99t=3D20match?=3D= =0AMIME-Version:=201.0=0AContent-Type:=20text/plain;=20charset=3DUTF-8=0A= Content-Transfer-Encoding:=208bit=0A=0A*=20lisp/progmodes/gdb-mi.el=20= (gdb--memory-display-warning):=20new=0A(gdb-read-memory-custom,=20= gdb-memory-header):=20Add=20warning=0A---=0A=20lisp/progmodes/gdb-mi.el=20= |=2015=20++++++++++++++-=0A=201=20file=20changed,=2014=20insertions(+),=20= 1=20deletion(-)=0A=0Adiff=20--git=20a/lisp/progmodes/gdb-mi.el=20= b/lisp/progmodes/gdb-mi.el=0Aindex=20eec11ebf0c..bdd01e0747=20100644=0A= ---=20a/lisp/progmodes/gdb-mi.el=0A+++=20b/lisp/progmodes/gdb-mi.el=0A@@=20= -112,6=20+112,12=20@@=20gdb-memory-next-page=0A=20=20=20"Address=20of=20= next=20memory=20page=20for=20program=20memory=20buffer.")=0A=20(defvar=09= gdb-memory-prev-page=20nil=0A=20=20=20"Address=20of=20previous=20memory=20= page=20for=20program=20memory=20buffer.")=0A+(defvar-local=20= gdb--memory-display-warning=20nil=0A+=20=20"Display=20warning=20on=20= memory=20header=20if=20t.=0A+=0A+When=20error=20occurs=20when=20= retrieving=20memory,=20gdb-mi=20displays=20the=20last=0A+successful=20= page.=20In=20that=20case=20the=20expression=20might=20not=20match=20the=0A= +memory=20displayed.")=0A=20=0A=20(defvar=20gdb-thread-number=20nil=0A=20= =20=20"Main=20current=20thread.=0A@@=20-3485,6=20+3491,9=20@@=20= gdb-read-memory-custom=0A=20=20=20=20=20=20=20=20=20=20(err-msg=20= (bindat-get-field=20res=20'msg)))=0A=20=20=20=20=20(if=20(not=20err-msg)=0A= =20=20=20=20=20=20=20=20=20(let=20((memory=20(bindat-get-field=20res=20= 'memory)))=0A+=20=20=20=20=20=20=20=20=20=20(when=20= gdb-memory-last-address=0A+=20=20=20=20=20=20=20=20=20=20=20=20;;=20nil=20= means=20last=20retrieve=20emits=20error=20or=20just=20started=20the=20= session=0A+=20=20=20=20=20=20=20=20=20=20=20=20(setq=20= gdb--memory-display-warning=20nil))=0A=20=20=20=20=20=20=20=20=20=20=20= (setq=20gdb-memory-address=20(bindat-get-field=20res=20'addr))=0A=20=20=20= =20=20=20=20=20=20=20=20(setq=20gdb-memory-next-page=20(bindat-get-field=20= res=20'next-page))=0A=20=20=20=20=20=20=20=20=20=20=20(setq=20= gdb-memory-prev-page=20(bindat-get-field=20res=20'prev-page))=0A@@=20= -3501,7=20+3510,8=20@@=20gdb-read-memory-custom=0A=20=20=20=20=20=20=20= (when=20gdb-memory-last-address=0A=20=20=20=20=20=20=20=20=20(let=20= ((gdb-memory-address-expression=20gdb-memory-last-address))=0A=20=20=20=20= =20=20=20=20=20=20=20;;=20avoid=20infinite=20loop=0A-=20=20=20=20=20=20=20= =20=20=20(setq=20gdb-memory-last-address=20nil)=0A+=20=20=20=20=20=20=20=20= =20=20(setq=20gdb-memory-last-address=20nil=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20gdb--memory-display-warning=20t)=0A=20=20=20=20=20=20= =20=20=20=20=20(gdb-invalidate-memory=20'update)=0A=20=20=20=20=20=20=20=20= =20=20=20(user-error=20"Error=20when=20retrieving=20memory:=20%s=20= Displaying=20last=20successful=20page"=20err-msg))))))=0A=20=0A@@=20= -3728,6=20+3738,9=20@@=20gdb-memory-header=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20'local-map=20(gdb-make-header-line-mouse-map=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'mouse-1=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#'gdb-memory-set-address-event))=0A= +=20=20=20=20=20(if=20gdb--memory-display-warning=0A+=20=20=20=20=20=20=20= =20=20(propertize=20"=20!"=20'face=20'(:inherit=20error=20:weight=20= bold))=0A+=20=20=20=20=20=20=20"")=0A=20=20=20=20=20=20"=20["=0A=20=20=20= =20=20=20(propertize=20"-"=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20'face=20font-lock-warning-face=0A--=20=0A2.24.1=0A=0A= --Apple-Mail=_423604B8-ABF9-43AE-9CBA-332AAA0AA536 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii In GNU Emacs 27.0.50 (build 3, x86_64-apple-darwin19.0.0, NS = appkit-1894.10 Version 10.15.1 (Build 19B88)) of 2019-11-30 built on missSilver Repository revision: e2828795d73637577c7726965974a047fe2d7119 Repository branch: master Windowing system distributor 'Apple', version 10.3.1894 System Description: Mac OS X 10.15.2 Recent messages: Checking 24 files in /Users/yuan/attic/emacs/lisp/cedet... Checking 59 files in /Users/yuan/attic/emacs/lisp/calendar... Checking 87 files in /Users/yuan/attic/emacs/lisp/calc... Checking 113 files in /Users/yuan/attic/emacs/lisp/obsolete... Checking for load-path shadows...done Auto-saving... Quit C-x C-g is undefined Quit Buffer *unsent mail to bug-gnu-emacs@gnu.org*<2> modified; kill anyway? = (y or n) y 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: NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS 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: Emacs-Lisp Minor modes in effect: magit-todos-mode: t bug-reference-prog-mode: t desktop-save-mode: t ghelp-global-minor-mode: t minibuffer-electric-default-mode: t flymake-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 flyspell-mode: t outshine-mode: t ws-butler-global-mode: t ws-butler-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 aggressive-indent-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 ivy-mode: t company-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t 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 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/nerd-font/test/test-helper hides = /Users/yuan/.emacs.d/ranch/doom-themes/test/test-helper /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/attic/emacs/lisp/emacs-lisp/faceup Features: (magit-todos pcre2el rxt re-builder grep checkdoc lisp-mnt bug-reference vc-mtn vc-hg ffap tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time iso8601 ls-lisp shadow sort mail-extr emacsbug sendmail vc-git vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher magit-bookmark bookmark company-oddmuse company-keywords company-etags etags fileloop 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 hideshow desktop frameset trivial-copy ghelp-eglot ghelp-helpful ghelp-builtin ghelp cus-edit cus-start cus-load luna-publish utility pause luna-general-config minibuf-eldef eglot array jsonrpc ert pp ewoc debug flymake-proc flymake warnings url-util 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 diff-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode transient git-commit magit-git magit-section magit-utils crm log-edit message rmc puny rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor async-bytecomp async shell server 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-element avl-tree generator org advice org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities time-date noutline outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat 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 easy-mmode use-package-core finder-inf tex-site 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 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 197959 23437) (symbols 48 9374 49) (strings 32 38335 2058) (string-bytes 1 1116712) (vectors 16 24652) (vector-slots 8 289694 28446) (floats 8 511 434) (intervals 56 14675 1317) (buffers 1000 27)) --Apple-Mail=_423604B8-ABF9-43AE-9CBA-332AAA0AA536-- ------------=_1581155582-14967-1-- From unknown Wed Sep 10 10:35:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39180: 27.0.50; [PATCH] Use expressions as memory location in gdb-mi memory buffer Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Feb 2020 04:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39180 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 39180-done@debbugs.gnu.org Received: via spool by 39180-done@debbugs.gnu.org id=D39180.158130996114256 (code D ref 39180); Mon, 10 Feb 2020 04:46:02 +0000 Received: (at 39180-done) by debbugs.gnu.org; 10 Feb 2020 04:46:01 +0000 Received: from localhost ([127.0.0.1]:53557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j10xM-0003hs-LK for submit@debbugs.gnu.org; Sun, 09 Feb 2020 23:46:00 -0500 Received: from mail-qt1-f180.google.com ([209.85.160.180]:35383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j10xK-0003hc-Qo for 39180-done@debbugs.gnu.org; Sun, 09 Feb 2020 23:45:59 -0500 Received: by mail-qt1-f180.google.com with SMTP id n17so4243613qtv.2 for <39180-done@debbugs.gnu.org>; Sun, 09 Feb 2020 20:45:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hiUZ9ue3ZhjtdfTSq8NPITqIHhrLeE6KiVyteH8hPxQ=; b=rWMbzdo4JbryVyux2mCerdnbokbJbtuezbQXlwdhSBFp5rqMZQoT45QtHsQ2EkvZti OxqF7MZ9LKl1M2PhTPC5Ca/mf4D4DXsyWIzNRbNSu1p4ohDirQF26277l4kY7aN30CyH 3BRXvdugyT6/WxZGceUWJ7Z3WBSgWktt164dZOgBVazea+aTvt2Y/kB/mjyWuw3aRX1F kD+TX5nZl0dkRa9OBfLOhSmjymbZ7BDnyAGDtd0uE6ugEi32Z/k8PozlHdcx9xBE8tnN sR5k46ap3GNECYOi/rjpwwQ0VqCUXFUj0QJjfaXx7PsaqL3LV0G1VcuUcpmUoT2lHxBt SD+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hiUZ9ue3ZhjtdfTSq8NPITqIHhrLeE6KiVyteH8hPxQ=; b=HbQbJfpTXSDDmx1gjBfoAj5is2MZHUBMkUnA5A/IkYSv/rLQbJ/SgQ3XZTLe+N/dbp t5dkkcehJBjeIG/nk0MIGD9QzcxWi98+M3lw02LQDdwoPllUmQ1hEwfyXYQSKapPlpCV IKsfBONbe7jj7Ve2+qPFETiC3d9zmBPPJ0j5gSXABRuejLJPHsMWZis90uAS74r8VpCu UVqadN+d0PF24OeIlzkuZO5xLOBxDTatv8/b87jGivfEKyMyTS4+PBqwbeIwxStMw8bf PtUXthH9/wabAh0Z0/CMo8DyqLb39uHP0TbsHLIrNk0PFN+ux5uODhlgLEOW5MB4sO6A URFQ== X-Gm-Message-State: APjAAAXc4foQvJrvk+jSyjf9n0UiteKZqgGHG7dojnhhmmTFPm2ebMQ+ /+TXcBZE4C6F2McBTSoQF3Wo3fm66QS+iw== X-Google-Smtp-Source: APXvYqx7F2hx+U8Mv1R40j+D02EFCBaj8xGdKpmAGpMLIyJLuwXZbK4CIwefeqS7s5eFarRhLzaplw== X-Received: by 2002:ac8:381a:: with SMTP id q26mr8646341qtb.381.1581309952847; Sun, 09 Feb 2020 20:45:52 -0800 (PST) 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 p8sm3099350qtn.71.2020.02.09.20.45.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Feb 2020 20:45:52 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) From: Yuan Fu In-Reply-To: <83d0ape79y.fsf@gnu.org> Date: Sun, 9 Feb 2020 23:45:50 -0500 Content-Transfer-Encoding: 7bit Message-Id: References: <4A45AE37-414A-4D78-A49C-B40FB72736C4@gmail.com> <83mua4kkjs.fsf@gnu.org> <83d0ape79y.fsf@gnu.org> X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Feb 8, 2020, at 4:51 AM, Eli Zaretskii wrote: > >> From: Yuan Fu >> Date: Fri, 31 Jan 2020 21:25:00 -0500 >> Cc: 39180@debbugs.gnu.org >> >> And here is the new patch. > > Thanks, I pushed it to the master branch. I had to make some minor > editing changes in the commit log message; please see what I changed > and try to follow this style in the future. Got it. I will. Yuan