From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59730: gdb-mi.el: Local variables reordering Date: Thu, 01 Dec 2022 17:44:44 +0200 Message-ID: <83y1rrgmc3.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34185"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59730@debbugs.gnu.org To: Gustaf Waldemarson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 01 16:47:15 2022 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 1p0lmM-0008fV-TH for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Dec 2022 16:47:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0llF-0001AQ-3m; Thu, 01 Dec 2022 10:46:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0llC-00018x-U5 for bug-gnu-emacs@gnu.org; Thu, 01 Dec 2022 10:46:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0llC-0005xi-LC for bug-gnu-emacs@gnu.org; Thu, 01 Dec 2022 10:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0llC-0000QB-HU for bug-gnu-emacs@gnu.org; Thu, 01 Dec 2022 10:46: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: Thu, 01 Dec 2022 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59730 X-GNU-PR-Package: emacs Original-Received: via spool by 59730-submit@debbugs.gnu.org id=B59730.16699095191604 (code B ref 59730); Thu, 01 Dec 2022 15:46:02 +0000 Original-Received: (at 59730) by debbugs.gnu.org; 1 Dec 2022 15:45:19 +0000 Original-Received: from localhost ([127.0.0.1]:40388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0lkU-0000Po-N4 for submit@debbugs.gnu.org; Thu, 01 Dec 2022 10:45:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0lkT-0000Pg-1t for 59730@debbugs.gnu.org; Thu, 01 Dec 2022 10:45:17 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0lkN-0005hC-Qp; Thu, 01 Dec 2022 10:45:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=oFIqO3PaPQH5ooKs10PzEzmg4xNbAA0a5d6PaNmOcoI=; b=U2WmEI3/MNKl XpD+Rw64atsVqDVg4kkNgojgQ0/MP2rMdgF4EVn7pF3JlnkAl1an1/i1O6S3xKH9Lgv0oNuB4AAE7 2LwuRSQEvPT4bRBpKMDOzf74c6EcdXeHLeje++fwoLDPgqoYcbYJMcUAaoaCzN/c0SvAAOsgYkn9g vmMj7nbTazdkRonriSocrslnO4DEYUdhO8+nNbgyPt3oHQR7k3FvvXAP2q4ldYJuMx+1k1QnU2YZO OHYlcJj+fflQ+yrLQO37pyZh//r5RjVvAyijODBfLBVOzO4sNIUQBZMatw6v0mN/v67ionBxc6okN RFI8BslqreA1hnWv7pgKjw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0lkM-0001uX-PI; Thu, 01 Dec 2022 10:45:11 -0500 In-Reply-To: (message from Gustaf Waldemarson on Wed, 30 Nov 2022 23:09:14 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249641 Archived-At: > From: Gustaf Waldemarson > Date: Wed, 30 Nov 2022 23:09:14 +0100 > > In summary, this patch does this: In gdb-mi.el mode, for local C/C++ variables that were previously written > out: > > - | type | name | value| > > Now write them out as: > > - | name | type | value | > > Additionally, cap the string length of the name and type to `gdb-locals-max-name-length` and > `gdb-locals-max-type-length` respectively (new custom variables with a default set to 20). I also changed the > table to always left-align the values when we're printing the locals. > > Turns out it was really easy to fix, but I may have missed some subtleties, so feel free to give it a look or > start a discussion whether this is a good idea or not. I personally prefer it this way since it is much easier > and faster to see the values of individual variables, especially when the type-info get very long. First, if the problem is that the type names are long, maybe it will be enough to truncate them without changing the order? Also, latest version of GDB allow control on which types get shown in full and which are shown as <...> -- did you try to use that GDB option to make the display more easily readable? And wouldn't it be better to truncate the string with truncate-string-to-width or with string-truncate-left instead? And finally, when the type is truncated, would it be possible to add a tooltip with the full name of the type, so that users who need that could hover the mouse above the truncated type and see it in full? Thanks.