Priority: Not Evaluated
Affects Version/s: Qt Creator 4.10.0-beta1
Fix Version/s: Qt Creator 4.9.0-beta2
Environment:Debian testing, Qt Creator self-built from master branch (as of commit bc7134dce5260717c2261030f6251fed9d099c0e)
When using system GDB pretty printers, variable values are not properly shown in case the pretty printers return values that contain double quotes (`"`).
Attached is a simple example project to reproduce the issue.
1) make sure that the use of system GDB pretty printers is enabled at "Tools" -> "Options" -> "Debugger" -> "GDB" -> "Load system GDB pretty printers"
2) set up a project for the C++ file in the attached archive
* e.g. extract the archive containing the project and run 'make' to create the binary; then use the "Custem Executable" run configuration in Qt Creator
* alternatively: configure the use of another build system for the *.cpp file
3) set a breakpoint at the end of the main function (line 20 in 'test.cpp')
4) start debugging
5) when the breakpoint has been reached: check what Qt Creator displays as values for the variables 'first' and 'second' in the variable pane
- `My class object (name: ` is shown for both variables
- `My class object (name: ""Hello"")` should be shown for `first`
- `My class object (name: ""Bye"")` should be shown for `second`
Apparently, Qt Creator has issues with the quote returned in the 'to_string' function of the Python GDB pretty printer 'MyClassPrinter' and does not print any characters following it.
- When enabling the "Debugger Log" and manually printing the variables (using 'p first' and 'p second') there, the values are properly shown.
- It may be necessary to either adapt the path from where GDB automatically loads files ('add-auto-load-safe-path </path/to/project/directory') or manually source the 'test-gdb.py' file for the pretty printer to actually be used.
- The real world example where the issue was encountered was in LibreOffice's GDB pretty printers.