From: Simon Marchi <simark@simark.ca>
To: Hannes Domani <ssbssa@yahoo.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2][PR gdb/17320] Fix array pretty formatter
Date: Tue, 28 Apr 2020 11:17:26 -0400 [thread overview]
Message-ID: <86e4c9c8-77bc-00c0-526c-b2974e15d7b9@simark.ca> (raw)
In-Reply-To: <20200427125900.5587-1-ssbssa@yahoo.de>
On 2020-04-27 8:59 a.m., Hannes Domani via Gdb-patches wrote:
> Currently, printing with array pretty formatting makes the output actually
> less readable than without:
>
> (gdb) p -array on -- {{1,2,3},{4,5,6}}
> $1 = { {1,
> 2,
> 3},
> {4,
> 5,
> 6}}
> (gdb) p -array on -array-indexes on -- {{1,2,3},{4,5,6}}
> $2 = {[0] = {[0] = 1,
> [1] = 2,
> [2] = 3},
> [1] = {[0] = 4,
> [1] = 5,
> [2] = 6}}
>
> These changes now also put the first element and the array end bracket on a new
> line, similar to the structure pretty formatter:
>
> (gdb) p -array on -- {{1,2,3},{4,5,6}}
> $1 = {
> {
> 1,
> 2,
> 3
> },
> {
> 4,
> 5,
> 6
> }
> }
> (gdb) p -array on -array-indexes on -- {{1,2,3},{4,5,6}}
> $2 = {
> [0] = {
> [0] = 1,
> [1] = 2,
> [2] = 3
> },
> [1] = {
> [0] = 4,
> [1] = 5,
> [2] = 6
> }
> }
Thanks for providing a test case, this is ok.
Simon
next prev parent reply other threads:[~2020-04-28 15:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200427125900.5587-1-ssbssa.ref@yahoo.de>
2020-04-27 12:59 ` Hannes Domani
2020-04-28 15:17 ` Simon Marchi [this message]
2020-04-29 10:59 ` Hannes Domani
2020-04-29 21:09 ` Tom de Vries
2020-04-30 11:46 ` Hannes Domani
2020-04-30 18:06 ` Tom Tromey
2020-04-30 18:14 ` Hannes Domani
2020-04-30 20:32 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86e4c9c8-77bc-00c0-526c-b2974e15d7b9@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=ssbssa@yahoo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox