public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/30816] New: [meta] Pretty-printing v2
@ 2023-08-31 16:57 tromey at sourceware dot org
  2023-08-31 16:58 ` [Bug python/30816] " tromey at sourceware dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 16:57 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

            Bug ID: 30816
           Summary: [meta] Pretty-printing v2
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org
  Target Milestone: ---

The current pretty-printer API is somewhat simple -- too simple.
Over the years a number of desirable additions have been identified.
This bug is a meta-bug to track all of these.

Some came up in the context of DAP:

https://sourceware.org/pipermail/gdb-patches/2023-June/200503.html

These aren't too different from some varobj desires: it would
be nice to be able to query a printer to get an expression
that would evaluate to to the particular child.

The main issue with changing pretty-printers is that we never
advertised that we may extend the API.  So one main goal of
v2 should be to fix this -- not just for the additions we need
now, but also for any future changes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
@ 2023-08-31 16:58 ` tromey at sourceware dot org
  2023-08-31 16:59 ` tromey at sourceware dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 16:58 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |12806


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=12806
[Bug 12806] multi-level pretty-printing
-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
  2023-08-31 16:58 ` [Bug python/30816] " tromey at sourceware dot org
@ 2023-08-31 16:59 ` tromey at sourceware dot org
  2023-08-31 17:00 ` tromey at sourceware dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 16:59 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |10659


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=10659
[Bug 10659] pretty-printing: Display vectors of vectors as matrix
-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
  2023-08-31 16:58 ` [Bug python/30816] " tromey at sourceware dot org
  2023-08-31 16:59 ` tromey at sourceware dot org
@ 2023-08-31 17:00 ` tromey at sourceware dot org
  2023-08-31 17:23 ` tromey at sourceware dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 17:00 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |14363


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=14363
[Bug 14363] Pretty-Printing of cyclic references produces infinite recursion
-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
                   ` (2 preceding siblings ...)
  2023-08-31 17:00 ` tromey at sourceware dot org
@ 2023-08-31 17:23 ` tromey at sourceware dot org
  2023-08-31 19:13 ` tromey at sourceware dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 17:23 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |10252


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=10252
[Bug 10252] -var-info-path-expression broken with python pretty-printing
-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
                   ` (3 preceding siblings ...)
  2023-08-31 17:23 ` tromey at sourceware dot org
@ 2023-08-31 19:13 ` tromey at sourceware dot org
  2023-08-31 19:15 ` tromey at sourceware dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 19:13 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
One idea in the DAP thread is to let pretty-printers
indicate how many children they have, and to allow
random access to children.  This can be faster in
many cases.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
                   ` (4 preceding siblings ...)
  2023-08-31 19:13 ` tromey at sourceware dot org
@ 2023-08-31 19:15 ` tromey at sourceware dot org
  2023-08-31 20:01 ` tromey at sourceware dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 19:15 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Another idea is to see what is missing to fully
implement natvis, see

https://github.com/asarium/gdb-natvis
https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/debugger/create-custom-views-of-native-objects?view=vs-2015#BKMK_Using_Natvis_files

The first link says "synthetic" which I think is covered
by bug#12806.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
                   ` (5 preceding siblings ...)
  2023-08-31 19:15 ` tromey at sourceware dot org
@ 2023-08-31 20:01 ` tromey at sourceware dot org
  2023-09-04 17:02 ` tromey at sourceware dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 20:01 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|10252, 10659, 12806, 14363  |
             Blocks|                            |10252, 10659, 12806, 14363

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
It occurs to me I got the dependencies wrong.
Pretty-printing v2 is needed to fix these other bugs.


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=10252
[Bug 10252] -var-info-path-expression broken with python pretty-printing
https://sourceware.org/bugzilla/show_bug.cgi?id=10659
[Bug 10659] pretty-printing: Display vectors of vectors as matrix
https://sourceware.org/bugzilla/show_bug.cgi?id=12806
[Bug 12806] multi-level pretty-printing
https://sourceware.org/bugzilla/show_bug.cgi?id=14363
[Bug 14363] Pretty-Printing of cyclic references produces infinite recursion
-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
                   ` (6 preceding siblings ...)
  2023-08-31 20:01 ` tromey at sourceware dot org
@ 2023-09-04 17:02 ` tromey at sourceware dot org
  2023-09-08 19:24 ` tromey at sourceware dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-09-04 17:02 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
I think this can probably be done pretty easily.
gdb can supply a pretty-printer base class, and
then the core can recognize when a printer object
is derived from this class, and make any extra
calls it likes.  With this setup we don't need to
change the registration API at all.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
                   ` (7 preceding siblings ...)
  2023-09-04 17:02 ` tromey at sourceware dot org
@ 2023-09-08 19:24 ` tromey at sourceware dot org
  2023-09-15 18:29 ` tromey at sourceware dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-09-08 19:24 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |tromey at sourceware dot org

--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
I have an initial patch to add the base class
and update the gdb-provided printers, and DAP.
Will submit once I write docs.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
                   ` (8 preceding siblings ...)
  2023-09-08 19:24 ` tromey at sourceware dot org
@ 2023-09-15 18:29 ` tromey at sourceware dot org
  2023-09-26 15:30 ` cvs-commit at gcc dot gnu.org
  2023-09-26 15:35 ` tromey at sourceware dot org
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-09-15 18:29 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
https://sourceware.org/pipermail/gdb-patches/2023-September/202342.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
                   ` (9 preceding siblings ...)
  2023-09-15 18:29 ` tromey at sourceware dot org
@ 2023-09-26 15:30 ` cvs-commit at gcc dot gnu.org
  2023-09-26 15:35 ` tromey at sourceware dot org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-26 15:30 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

--- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fb282576998ca7ce70526dea42d41a7f418879c9

commit fb282576998ca7ce70526dea42d41a7f418879c9
Author: Tom Tromey <tromey@adacore.com>
Date:   Thu Sep 7 13:40:29 2023 -0600

    Introduce gdb.ValuePrinter

    There was an earlier thread about adding new methods to
    pretty-printers:

    https://sourceware.org/pipermail/gdb-patches/2023-June/200503.html

    We've known about the need for printer extensibility for a while, but
    have been hampered by backward-compatibilty concerns: gdb never
    documented that printers might acquire new methods, and so existing
    printers may have attribute name clashes.

    To solve this problem, this patch adds a new pretty-printer tag class
    that signals to gdb that the printer follows new extensibility rules.

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30816
    Reviewed-By: Eli Zaretskii <eliz@gnu.org>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug python/30816] [meta] Pretty-printing v2
  2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
                   ` (10 preceding siblings ...)
  2023-09-26 15:30 ` cvs-commit at gcc dot gnu.org
@ 2023-09-26 15:35 ` tromey at sourceware dot org
  11 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-09-26 15:35 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30816

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.1
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #8 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-09-26 15:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-31 16:57 [Bug python/30816] New: [meta] Pretty-printing v2 tromey at sourceware dot org
2023-08-31 16:58 ` [Bug python/30816] " tromey at sourceware dot org
2023-08-31 16:59 ` tromey at sourceware dot org
2023-08-31 17:00 ` tromey at sourceware dot org
2023-08-31 17:23 ` tromey at sourceware dot org
2023-08-31 19:13 ` tromey at sourceware dot org
2023-08-31 19:15 ` tromey at sourceware dot org
2023-08-31 20:01 ` tromey at sourceware dot org
2023-09-04 17:02 ` tromey at sourceware dot org
2023-09-08 19:24 ` tromey at sourceware dot org
2023-09-15 18:29 ` tromey at sourceware dot org
2023-09-26 15:30 ` cvs-commit at gcc dot gnu.org
2023-09-26 15:35 ` tromey at sourceware dot org

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).