From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Extend gdb to filter registers Date: Tue, 15 Oct 2019 21:10:44 +0300 Organization: LINKOV.NET Message-ID: <878spmuerf.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="193463"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Stefan Monnier , Emacs developers To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 15 20:20:58 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iKRRJ-000oBS-MJ for ged-emacs-devel@m.gmane.org; Tue, 15 Oct 2019 20:20:57 +0200 Original-Received: from localhost ([::1]:55964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKRRI-0005uq-0F for ged-emacs-devel@m.gmane.org; Tue, 15 Oct 2019 14:20:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59041) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKROx-0003N5-0n for emacs-devel@gnu.org; Tue, 15 Oct 2019 14:18:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKROv-00085S-2e for emacs-devel@gnu.org; Tue, 15 Oct 2019 14:18:30 -0400 Original-Received: from beige.elm.relay.mailchannels.net ([23.83.212.16]:39126) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iKROt-00084k-Ll for emacs-devel@gnu.org; Tue, 15 Oct 2019 14:18:28 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 20A751A0F5E; Tue, 15 Oct 2019 18:18:26 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a64.g.dreamhost.com (100-96-4-204.trex.outbound.svc.cluster.local [100.96.4.204]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9F4641A1EEB; Tue, 15 Oct 2019 18:18:25 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a64.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Tue, 15 Oct 2019 18:18:26 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-White-Trail: 0abe32a95de0bccc_1571163505865_4259664341 X-MC-Loop-Signature: 1571163505865:2036109531 X-MC-Ingress-Time: 1571163505865 Original-Received: from pdx1-sub0-mail-a64.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a64.g.dreamhost.com (Postfix) with ESMTP id E1E5E7FDB8; Tue, 15 Oct 2019 11:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=EhQjdmT150LZz+9RTaQJySSBM1E=; b= 0WFeEIA1/Y2BXFf7krIB8/4FdNVGFQmkB2vDIxRn2bhP7OPxPEGcfFhw3QnczTFu CToTd8dKh+63vVuwQJK0fA+cDxH10YBvh8G9aif7qCr7iYcXMQ4TgyrYBqTYx36+ 2p+m/iLmfXgsqfwt/Kb8r3eNHNvDo4ckS08c+Q9wYDc= Original-Received: from mail.jurta.org (m91-129-98-153.cust.tele2.ee [91.129.98.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a64.g.dreamhost.com (Postfix) with ESMTPSA id D5DC07FDB7; Tue, 15 Oct 2019 11:18:13 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a64 In-Reply-To: (Yuan Fu's message of "Mon, 14 Oct 2019 23:05:22 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.212.16 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241060 Archived-At: > Here is another patch that allows a user to save and restore window > configurations. It seems to work for me and I welcome you to try it out. Thanks, some additional remarks: > (require 'cl-lib) > +(require 'pcase) Usually macro packages such as 'cl-lib' and 'pcase' are loaded with (eval-when-compile (require 'pcase)) > + (when (or (derived-mode-p 'gdb-parent-mode) > + (derived-mode-p 'gdb-inferior-io-mode)) t))) Font-lock highlights the final 't' with red color and font-lock-warning-face. And indeed this could be simplified to: (or (derived-mode-p 'gdb-parent-mode) (derived-mode-p 'gdb-inferior-io-mode)) > + (kill-buffer buffer)) > + (kill-buffer placeholder)))) > [...] > + (progn ; don't leak buffer > [...] > + (kill-buffer config-buffer) > + (kill-buffer placeholder)))) Usually temporary buffers are cleaned in the end of unwind-protect, to ensure temporary buffer cleaning even in case of errors. > + (goto-char 1) (goto-char (point-min))