This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/16047] New: python docs say printer .to_string is optional, but it is required


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

            Bug ID: 16047
           Summary: python docs say printer .to_string is optional, but it
                    is required
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: b.r.longbons at gmail dot com

The documentation of the GDB pretty printer API [1] says that the .to_string
method is called "if the to_string method exists". This would be useful if the
object only has synthetic children.

But the actual result is:

Python Exception <type 'exceptions.AttributeError'> 'ZString' object has no
attribute 'to_string':

[1]
https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing-API.html#index-pretty_005fprinter_002eto_005fstring-1860

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]