Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20939

Debugger: Fails to display GDB lazy string

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.8.0-beta1
    • Qt Creator 4.7.0
    • Debugger
    • None
    • Linux/X11
    • ec5e70eedadc659aeea7458e1989fded8f9bd03e

    Description

      Using LibreOffice's GDB Python pretty-printers for its custom 'OUString' string type does not work in Qt Creator, while it works just fine when using GDB on the command line.

      As far as I can see, the underlying problem is that there's an issue with displaying GDB's lazy string type in the debugger. While 'PlainDumper::_call_' passes a 'gdb.Type', 'DumperBase::putCharArrayHelper' calls methods that are only defined for the custom 'Type' value defined in 'dumper.py'.

      As a result, '<not accessible>' is displayed in the "Value" column for the variable in the debugger view, rather than the proper string representation.

      While the problem itself is independent of the LibreOffice use case, I could not easily create a simple example by myself. Please let me know if you need any additional information.

      System GDB pretty printers need to be enabled (i.e. 'Tools' -> 'Options' -> 'Debugger' -> 'GDB' -> 'Load system GDB pretty printers' needs to be enabled).

      For reference, LibreOffice's 'OUString' class is defined in [1], while the GDB pretty-printers are in [2].

      [1]: https://cgit.freedesktop.org/libreoffice/core/tree/include/rtl/ustring.hxx
      [2]: https://cgit.freedesktop.org/libreoffice/core/tree/solenv/gdb/libreoffice/

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-20939
        # Subject Branch Project Status CR V

        Activity

          People

            hjk hjk
            michaelweghorn Michael Weghorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes