From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Extend gdb to filter registers Date: Wed, 16 Oct 2019 23:08:41 -0400 Message-ID: References: <878spmuerf.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="206047"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Stefan Monnier , Emacs developers To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 17 05:09:41 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 1iKwAW-000rSB-GX for ged-emacs-devel@m.gmane.org; Thu, 17 Oct 2019 05:09:40 +0200 Original-Received: from localhost ([::1]:58432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKwAU-0001yr-MA for ged-emacs-devel@m.gmane.org; Wed, 16 Oct 2019 23:09:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35277) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKw9e-0001yJ-Ab for emacs-devel@gnu.org; Wed, 16 Oct 2019 23:08:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKw9d-0006Oq-8K for emacs-devel@gnu.org; Wed, 16 Oct 2019 23:08:46 -0400 Original-Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]:43503) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKw9d-0006OK-26 for emacs-devel@gnu.org; Wed, 16 Oct 2019 23:08:45 -0400 Original-Received: by mail-qk1-x736.google.com with SMTP id h126so533261qke.10 for ; Wed, 16 Oct 2019 20:08:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=FRnbmtEHznR607hJEAiPu1RWj0uP23HOLDbuZ0si9Vc=; b=aoqxGFYZVuNPTjXnEvpSx0pMqT2HjzaPHWM98kDVoXfFqqdKX5/rPOu6UNKcO/8FKK rSMvnjydz07O7+VWm/AGbeyTdWxbisv9jKnI76hbOw/G/8oquXdIg0fg6T1y7G9jmyrW TLz7/1qFNJIxm9iJUzBkN/Am7RAEmtSs9oKhUF3jmUpLoUub7A50D1CnXjGod8HcTTgL x2aVYEly653rjxt31TvjKW8z+DxHO5ei/cGHr2tPQMbnLKTr5aVrQ20LCA3FceRAAjdI i+R72uKkbYiEJayL2BaKhtKfu6r1FSeB7w603tRv3EoYtJiHE6WxoHzcIsl5eCGewM+G DcGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=FRnbmtEHznR607hJEAiPu1RWj0uP23HOLDbuZ0si9Vc=; b=q7aQA1A6V2c2pDP20UfumVXWDgGnMwMLLvY80yf22p/0bihzU/CwI6cRGAbbUGwjtJ 9capffs4h+NwnZYG3eSGwMda+gx7tCMhc5QEYIIpsl6159JwEx4P+1rfMKVkiXu7Wie6 Ye0t736N82b7SaaMZVkXiubdCVpZJ9JMLGaj5cUsNGY1uxepNUHKqPV6AZ/73OfTAgda 2+tfLjdNDH0w2SgY1lqhCvH/jn2LWeBg6U/xtbu1/BHZ+ZjLJGyv1HOh4RKSXA9/he4E CcRxydD81nK5Igem8KWSI2X789xarVh7nwojBZyMKUK4InmeJMO47n0ZjkdBxWbRdeos CvHQ== X-Gm-Message-State: APjAAAW2xFf6hHOiZa8nsMPggOz8+w0sVt9mcLIfO+ExnOJnG08T3+bs gmbysg+4n/DXACWTGOnKNMs3K+PUQ5mHvw== X-Google-Smtp-Source: APXvYqy7QJhVTuOTfiZldmyLvSMIWHtewmNVBXarPL4LemytPsgnyCfU1y/f4/M9THDEs5uoKTQbzw== X-Received: by 2002:a05:620a:16cb:: with SMTP id a11mr1238039qkn.415.1571281723699; Wed, 16 Oct 2019 20:08:43 -0700 (PDT) Original-Received: from missSilver.localdomain (c-71-207-8-160.hsd1.pa.comcast.net. [71.207.8.160]) by smtp.gmail.com with ESMTPSA id k54sm782972qtf.28.2019.10.16.20.08.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Oct 2019 20:08:43 -0700 (PDT) Original-Received: by missSilver.localdomain (Postfix, from userid 501) id 6894820292AA98; Wed, 16 Oct 2019 23:08:41 -0400 (EDT) In-Reply-To: <878spmuerf.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::736 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:241114 Archived-At: Juri Linkov writes: >> 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)) Fixed. >> + (when (or (derived-mode-p 'gdb-parent-mode) >> + (derived-mode-p 'gdb-inferior-io-mode)) t))) Fixed as Stefan suggested. > Font-lock highlights the final 't' with red color and font-lock-warning-f= ace. > 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. Fixed. >> + (goto-char 1) > > (goto-char (point-min)) I=E2=80=99m worried that narrowing will cause problems. Is it adviced to al= ways use =E2=80=98point-min=E2=80=99? Thanks. Yuan