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

GDB Pretty Printers don't init properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.7.1
    • Qt Creator 4.6.2
    • Debugger
    • None
    • e2144db165cf391cce8003c7cc07ba121499095b

    Description

      Background: I was using the version of Qt Creator that came with CentOS 7 - I believe it was version 4.1 - to develop in Unreal Engine 4. The GDB pretty printers Epics Games ships with the engine weren't created according to the format specified in the (admittedly limited and somewhat confusing) documentation for pretty printers, so Qt didn't parse them correctly. I made a small tweak to them, and got them working in Qt (https://github.com/EpicGames/UnrealEngine/pull/4629).

      Fast forward to maybe 2 months ago, where some OS updates forced me to install the latest Qt Creator from qt.io. Suddenly, the UE4 pretty printers no longer work.

      I've spent the better part of today trying to figure out what the problem is, and I think I've tracked it down to https://github.com/qt-creator/qt-creator/commit/2244e2b26cf2be01fdd80411d581533aa269b1ee.

      When the abstraction was introduced that wrapped the results of gdb.parse_and_eval(), it looks like that abstraction started getting passed to GDB's pretty printers. These printers are set up to expect only GDB-native info, and thus stop working.

      I can fix this by checking if a nativeType property exists in the value passed to init, but then I'm modifying GDB printers to work with Qt Creator instead of having Qt Creator work with existing "standard" pretty printers. Seems to me something that should probably be fixed Qt Creator-side.

       

      Side note: Even with my local fix, and a seemingly valid "result" string in the Debugger Log window:

      result={token=\"0\",data=[{iname=\"watch.0\",wname=\"4669727374436f6d6d616e644c696e65546f6b656e\",numchild=\"0\",address=\"0x7fffffffbf48\",type=\"FString\",value=\"My String Is Here!\",},],typeinfo=[],partial=\"1\",counts={},timings=[]}\n

      the "Value" column in my Expressions window remains blank. So, there's something still not quite right.

      Attachments

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

        Activity

          People

            hjk hjk
            philbax Phillip Baxter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes