Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 4.7.0
-
-
f4dc3fd5c519e9181db5d241eee989b0284950db (qt-creator/qt-creator/master)
Description
Currently, Qt Creator does not always show pointer types as such in the debugger.
Steps to reproduce:
1) Set up a new project with the sample program given at the end that uses `QString` pointer types.
2) set up the project to use either GDB or LLDB as debugger
3) set a breakpoint for the `return a.exec()`
4) start program in debugger
5) check what the debugger view shows for the local variables, in particular `str`, `ptr` and `ptrptr`
Result:
The following values are shown in the "Name", "Value" and "Type" columns:
- str, "hello", QString
- ptr, "hello", QString
- ptrptr, "hello", QString
Expected result:
Since `ptr` and `ptrptr` are of pointer types `QString*` and `QString**`, those should be shown in their "Type" column, i.e.:
- str, "hello", QString
- ptr, "hello", QString *
- ptrptr, "hello", QString * *
Small sample program:
#include <QCoreApplication> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QString str("hello"); QString *ptr = &str; QString **ptrptr = &ptr; return a.exec(); }
I also tested this with the current development version (master branch as of commit 0f96f735f009a8f79a97ef81183bb43eaedc3a1e).
Attachments
For Gerrit Dashboard: QTCREATORBUG-20907 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
236066,1 | Debugger: Show pointer types as such | master | qt-creator/qt-creator | Status: ABANDONED | 0 | 0 |
334952,2 | Debugger: Prepend '*'s for autodereferenced pointers | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
334953,1 | WIP: Debugger: Make prepended '*'s for autodereferenced pointers gray | master | qt-creator/qt-creator | Status: ABANDONED | -2 | 0 |