From: Tom de Vries <tdevries@suse.de>
To: Hannes Domani <ssbssa@yahoo.de>,
Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2][PR gdb/17320] Fix array pretty formatter
Date: Wed, 29 Apr 2020 23:09:03 +0200 [thread overview]
Message-ID: <96600c7d-fa3c-3b0e-f213-7809a92e1de4@suse.de> (raw)
In-Reply-To: <509127707.4013029.1588157997483@mail.yahoo.com>
On 29-04-2020 12:59, Hannes Domani via Gdb-patches wrote:
> Am Dienstag, 28. April 2020, 17:17:29 MESZ hat Simon Marchi <simark@simark.ca> Folgendes geschrieben:
>
>> 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.
>
> Pushed, thanks.
>
Hi,
this caused:
...
Running
/data/gdb_versions/devel/src/gdb/testsuite/gdb.python/py-format-string.exp
...
FAIL: gdb.python/py-format-string.exp: format_string: lang_c: an_array
with option pretty_arrays: pretty_arrays=true
FAIL: gdb.python/py-format-string.exp: format_string: lang_c:
an_array_with_repetition with option pretty_arrays: pretty_arrays=true
FAIL: gdb.python/py-format-string.exp: format_string: lang_c: set print
array on: an_array: no opts
FAIL: gdb.python/py-format-string.exp: format_string: lang_c: set print
array on: an_array: str
FAIL: gdb.python/py-format-string.exp: format_string: lang_c: set print
array on: an_array with option pretty_arrays: pretty_arrays=true
FAIL: gdb.python/py-format-string.exp: format_string: lang_c: set print
array on: an_array_with_repetition: no opts
FAIL: gdb.python/py-format-string.exp: format_string: lang_c: set print
array on: an_array_with_repetition: str
FAIL: gdb.python/py-format-string.exp: format_string: lang_c: set print
array on: an_array_with_repetition with option pretty_arrays:
pretty_arrays=true
FAIL: gdb.python/py-format-string.exp: format_string: lang_c: an_array
with option array_indexes=True, pretty_arrays=True
FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: an_array
with option pretty_arrays: pretty_arrays=true
FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp:
an_array_with_repetition with option pretty_arrays: pretty_arrays=true
FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: set
print array on: an_array: no opts
FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: set
print array on: an_array: str
FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: set
print array on: an_array with option pretty_arrays: pretty_arrays=true
FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: set
print array on: an_array_with_repetition: no opts
FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: set
print array on: an_array_with_repetition: str
FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: set
print array on: an_array_with_repetition with option pretty_arrays:
pretty_arrays=true
FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: an_array
with option array_indexes=True, pretty_arrays=True
=== gdb Summary ===
# of expected passes 960
# of unexpected failures 18
...
Thanks,
- Tom
next prev parent reply other threads:[~2020-04-29 21:09 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
2020-04-29 10:59 ` Hannes Domani
2020-04-29 21:09 ` Tom de Vries [this message]
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=96600c7d-fa3c-3b0e-f213-7809a92e1de4@suse.de \
--to=tdevries@suse.de \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).