Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.11.0, Qt Creator 4.14.0
-
None
-
-
185ceda8f10daca8692a35c5e18e762c5379c27c (qt-creator/qt-creator/5.0)
Description
I run qtcreator with the option "Load system GDB pretty printers" set on. This works on my C projects as long as objects are not cells of a C array, but fails as soon as they are. In the following example, I ask GDB to render Point as (x y) :
typedef struct Point { int x, y; } Point; int main() { Point line[] = { {0, 0}, {1, 1} }, point = line[1]; return 0; // breakpoint here }
Creator displays array items as <not accessible> , as much as in this ASCII rendering:
Name Value Type + line 0x7f...10 Point[2] [0] <not accessible> Point [1] <not accessible> Point point (1 1) Point
Both gdb and qtcreator are under Ubuntu 20.04:
- GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
- Qt Creator 4.11.0
I've also tried Creator 4.14.0 with the same results.
I've investigated a bit, and found that PlainDumper.call in /usr/share/qtcreator/debugger/gdbbridge.py is missing a value.nativeValue in the situation. Rebuilding locally some nativeValue from value and theDumper does fix the present example.