From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#39180: 27.0.50; [PATCH] Use expressions as memory location in gdb-mi memory buffer Date: Fri, 31 Jan 2020 12:05:43 +0200 Message-ID: <83mua4kkjs.fsf@gnu.org> References: <4A45AE37-414A-4D78-A49C-B40FB72736C4@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="23961"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39180@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 31 11:07:11 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 1ixTCh-0006AZ-TI for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Jan 2020 11:07:11 +0100 Original-Received: from localhost ([::1]:50906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixTCg-0002a5-Jq for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Jan 2020 05:07:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47126) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixTCZ-0002Zv-IC for bug-gnu-emacs@gnu.org; Fri, 31 Jan 2020 05:07:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixTCY-0003b2-Fn for bug-gnu-emacs@gnu.org; Fri, 31 Jan 2020 05:07:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58855) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ixTCY-0003aY-Cc for bug-gnu-emacs@gnu.org; Fri, 31 Jan 2020 05:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ixTCY-0002E4-7O for bug-gnu-emacs@gnu.org; Fri, 31 Jan 2020 05:07:02 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 39180-submit@debbugs.gnu.org id=B39180.15804651818506 (code B ref 39180); Fri, 31 Jan 2020 10:07:02 +0000 Original-Received: (at 39180) by debbugs.gnu.org; 31 Jan 2020 10:06:21 +0000 Original-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 Original-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 Original-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 Original-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 In-reply-to: <4A45AE37-414A-4D78-A49C-B40FB72736C4@gmail.com> (message from Yuan Fu on Sat, 18 Jan 2020 15:54:35 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:175479 Archived-At: > 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?