winseros / Qt6Renderer

Python scripts for pretty printing Qt types by GDB and LLDB
GNU General Public License v3.0
17 stars 4 forks source link

no data visible #7

Closed reybeamde closed 8 months ago

reybeamde commented 8 months ago

I installed the plugin on Linux (Kubuntu 23.10) with clion CLion 2023.3.4, bundled gdb 13.2, Qt 6.4.2, and tested with the example program given in your repository. But no data is visible. Are there any further settings or dependencies?

image

winseros commented 8 months ago

Please try a different version of Qt.

There are problematic Qt versions, for which the debugger is unable to extract type metadata. I am aware of 6.2.4, but there may be further ones as well.

You can use the GDB console to make a quick check if a specific version includes type metainfo by setting a breakpoint and running the command:

python print(gdb.parse_and_eval('*(&qtHookData)'))

For examlpe, "good" 6.6.1 gives the output: image

And the 6.4.2 gives: image

reybeamde commented 8 months ago

With 6.6.1 i get the same result image

winseros commented 8 months ago

Do you have Debug information files installed? image

reybeamde commented 8 months ago

yes sorry, i forgot to download the debug info files for 6.6.1.

It's working now. Thanks a lot for your help and the great plugin :)

Ashark commented 8 months ago

In Arch Linux (Qt 6.6.2 currently), I also had "no debug info" message:

(gdb) python print(gdb.parse_and_eval('*(&qtHookData)'))
<data variable, no debug info>

Probably worth mentioning this in the project Readme.

Installing the qt6-base-debug package helped. Install manually (by specifying the url), or by enabling global repo. See wiki.

sudo pacman -U https://geo.mirror.pkgbuild.com/extra-debug/os/x86_64/qt6-base-debug-6.6.2-4-x86_64.pkg.tar.zst

Now the message is good:

(gdb) python print(gdb.parse_and_eval('*(&qtHookData)'))
{3, 7, 394754, 0, 0, 0, 22}