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.devel Subject: Re: Extend gdb to filter registers Date: Sun, 19 Jan 2020 17:40:14 +0200 Message-ID: <831rrvzc81.fsf@gnu.org> References: <878spmuerf.fsf@mail.linkov.net> <83wod3bx8i.fsf@gnu.org> <9f5ddaa5-0234-a17b-bdd7-81d70a0a50d6@gmx.at> <83FFF194-64CD-409E-8B7A-5A9DF91E79DE@gmail.com> <83v9pb314t.fsf@gnu.org> <838sm510d6.fsf@gnu.org> <83muakzoy5.fsf@gnu.org> <71042c9f-478b-47c8-f27e-1348e9f4536d@gmx.at> <83iml8zkbm.fsf@gnu.org> <6ad85759-7408-f177-38f6-45a72c2f5a9e@gmx.at> <83eevwzi79.fsf@gnu.org> <68ef651e-9319-b392-af1c-4564d5db9112@gmx.at> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="3536"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, john@yates-sheets.org, juri@linkov.net To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 19 16:40:45 2020 Return-path: Envelope-to: ged-emacs-devel@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 1itCgs-0000pM-PS for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Jan 2020 16:40:42 +0100 Original-Received: from localhost ([::1]:51044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itCgr-0002BW-QE for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Jan 2020 10:40:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45994) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itCgM-0001hn-Qz for emacs-devel@gnu.org; Sun, 19 Jan 2020 10:40:11 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1itCgL-0006Jh-FF; Sun, 19 Jan 2020 10:40:09 -0500 Original-Received: from [176.228.60.248] (port=1524 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1itCgK-00034D-RT; Sun, 19 Jan 2020 10:40:09 -0500 In-reply-to: <68ef651e-9319-b392-af1c-4564d5db9112@gmx.at> (message from martin rudalics on Sat, 18 Jan 2020 22:43:46 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:244375 Archived-At: > Cc: juri@linkov.net, casouri@gmail.com, emacs-devel@gnu.org, > monnier@iro.umontreal.ca, john@yates-sheets.org > From: martin rudalics > Date: Sat, 18 Jan 2020 22:43:46 +0100 > > >> > gdb-mi.el has gdb-display-buffer, which makes the window dedicated. > >> > It also has some code in gdb-display-source-buffer. Neither of those > >> > uses display-buffer, AFAICT. So where do the split thresholds come > >> > into play in the scenario mentioned? > >> > >> Here > >> > >> (defun gdb-display-buffer (buf) > >> "Show buffer BUF, and make that window dedicated." > >> (let ((window (display-buffer buf))) > >> ^^^^^^^^^^^^^^^^^^ > >> (set-window-dedicated-p window t) > >> window)) > > > > This function isn't called when gdb-mi.el displays a source file in > > its window. > > Above you said that "Neither of those uses display-buffer". Now > 'gdb-display-source-buffer' is called exclusively (within gdb-mi.el) by > 'gdb-goto-breakpoint' which has > > (window (or (gdb-display-source-buffer buffer) > (display-buffer buffer)))) > > so if 'gdb-display-source-buffer' fails, 'display-buffer' is called. So you are saying that calling gdb-display-source-buffer instead of display-buffer will not by itself help here, because display-buffer is called under the hood anyway, and might decide to create a new window instead of reusing an existing one? If so, what would be the correct solution of this issue?