From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Extend gdb to filter registers Date: Thu, 16 Jan 2020 10:04:00 -0500 Message-ID: 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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000005462c3059c4323a4" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="128558"; mail-complaints-to="usenet@ciao.gmane.io" Cc: martin rudalics , Juri Linkov , Stefan Monnier , Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 16 16:08:00 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 1is6ka-000XDH-Au for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Jan 2020 16:08:00 +0100 Original-Received: from localhost ([::1]:43618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1is6kZ-00070g-0T for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Jan 2020 10:07:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58245) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1is6h0-0002hx-DN for emacs-devel@gnu.org; Thu, 16 Jan 2020 10:04:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1is6gz-0004by-Av for emacs-devel@gnu.org; Thu, 16 Jan 2020 10:04:18 -0500 Original-Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]:39499) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1is6gw-0004ZN-4a; Thu, 16 Jan 2020 10:04:14 -0500 Original-Received: by mail-oi1-x22b.google.com with SMTP id a67so19121950oib.6; Thu, 16 Jan 2020 07:04:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2dfLa1Q9MlMWEqBoIyiFFFVBfGvjUCazw+tLBeZXdlE=; b=U/ojkQrebeMwOwuzWBCQyOX9eewMSEUA/LfbxEWi5AUVh18YwX3IxE06YRWt0LIT9x hL4/vlC8hJryx1olm5RkyHUaPSMsQ3dN5LMU6kUgdWvQDrSrLXpz5yiZlK89GHVcOB12 HGqLNS2Gq5wWlgPtBnLTQbL4KN+WI7K+yQVlgF7QrmJNLnbpEm131Y0zh9323bEWhrBU aaiHFxBwtoaJpLw9N5gCRlXvho4+tB4qxnYhm6hgtjizMDFntivgEuGRHM+UiGVJoytY wRwj0Qax5t3CmZPOsTak/u4mIUCCaGcrGnbE4Ex8HM/oqQKCB1KV9+/xEfBjcTYkQ0/I 6taw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2dfLa1Q9MlMWEqBoIyiFFFVBfGvjUCazw+tLBeZXdlE=; b=b/IFX+uOVk4c7pGMgD+bywVcz9bJq0aBsJNKX6YsPN6dUIeolfBBNo+9jVITLLhU+b 7woP/sgflSP6USTUlL2IFgDYMiSgOk3RaRff85NFmGJ5fPH9+zPwt/kI4sAg3LuUanTH 59WfhjKbfy/YpNxyW4wroceKxcEySGUu7apLT/G8oZOmMOmtlVq73GNxv5FstMMgXZvr cuU+Wxo4+4IpaXlu6U8pv8nAa0t9xQpQei5n6w+tCp2EqzzRRiSSoWBZe1d7KDc1XwBU +N2OUbIGgXbTM0fKEl3+rRnfCrXOrrsrNy4cCC/3kTya6TO1nohTUo5Njz/xoQfC9hzq INKw== X-Gm-Message-State: APjAAAXkyo2Vb2+4+s7yMRBBi05Yp7KHK4Fv5Zvow0hpFFZWOZJeGUjU 9GlzJl6tBHKOOde7qMSWEQInLHRfm8G6glSNB5kx2Q+olBzPTjYV X-Google-Smtp-Source: APXvYqzTXDABPBBVUEJE931ziJCQtTsHSAPyIHlqhzWqg5aIq+EoFdTGLh1NfnRw/GW646aTZk95/6FyQAFBFA7Is2I= X-Received: by 2002:aca:4b14:: with SMTP id y20mr4171177oia.160.1579187052985; Thu, 16 Jan 2020 07:04:12 -0800 (PST) In-Reply-To: <83v9pb314t.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::22b 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:244302 Archived-At: --0000000000005462c3059c4323a4 Content-Type: multipart/alternative; boundary="0000000000005462bf059c4323a2" --0000000000005462bf059c4323a2 Content-Type: text/plain; charset="UTF-8" > > I'm back working on gdb. This time I fixed a issue where gdb opens more > than one window to display source > > code. By the design of gdb-mi, it should only have one source window. > > Thanks, can you show a use case where such a problem happens? > Yes, basically any program with more than one source file and a large screen (display-buffer will reuse window if there aren't enough space). A minimal setup: a.c: int f1(int a) { return a + 1; } b.c: #include "a.c" int main() { int b = f1(1); int c = 0; return b + c; } Steps: - M-x gdb - b main - r - s (many times) And when you step into f1 which is in a.c, gdb opens another window to display it (again, if your screen is large enough). BTW, I say "by design gdb uses a single source window" because gdb-display-source-window is written that way. Yuan --0000000000005462bf059c4323a2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

> I'm back working on gdb. This time I fixed a issue where gdb opens= more than one window to display source
> code. By the design of gdb-mi, it should only have one source window.<= br>
Thanks, can you show a use case where such a problem happens?

Yes, basically any program with more than one source fil= e and a large screen (display-buffer will reuse window if there aren't = enough space).

A minimal setup:

a.c:

int f1(int a) {
=C2=A0 =C2=A0 ret= urn a + 1;
}

b.c:

#include "a.c"

int main() = {
=C2=A0 =C2=A0 int b =3D f1(1);
=C2=A0 =C2=A0 int c =3D 0;
=C2=A0= =C2=A0 return b + c;
}

Steps:
- M-x gdb
- b main
- r
- s (many times)

And when you step into = f1 which is in a.c, gdb opens another window to display it (again, if your = screen is large enough).

BTW, I say "by design gdb uses a single source win= dow" because gdb-display-source-window is written that way.

Yuan
<= /div>
--0000000000005462bf059c4323a2-- --0000000000005462c3059c4323a4 Content-Type: text/x-csrc; charset="US-ASCII"; name="b.c" Content-Disposition: attachment; filename="b.c" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k5gv3jyy1 I2luY2x1ZGUgImEuYyIKCmludCBtYWluKCkgewogICAgaW50IGIgPSBmMSgxKTsKICAgIGludCBj ID0gMDsKICAgIHJldHVybiBiICsgYzsKfQo= --0000000000005462c3059c4323a4 Content-Type: text/x-csrc; charset="US-ASCII"; name="a.c" Content-Disposition: attachment; filename="a.c" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k5gv3jyo0 aW50IGYxKGludCBhKSB7CiAgICByZXR1cm4gYSArIDE7Cn0K --0000000000005462c3059c4323a4--