{"id":21534548,"url":"https://github.com/winseros/qt6renderer","last_synced_at":"2025-08-04T15:38:49.956Z","repository":{"id":59131332,"uuid":"497098180","full_name":"winseros/Qt6Renderer","owner":"winseros","description":"Python scripts for pretty printing Qt types by GDB and LLDB","archived":false,"fork":false,"pushed_at":"2025-08-04T07:13:53.000Z","size":478,"stargazers_count":22,"open_issues_count":5,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-04T10:49:36.840Z","etag":null,"topics":["gdb","lldb","pretty-print","pretty-printing","qt","qt6"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/winseros.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-27T18:24:16.000Z","updated_at":"2025-08-04T07:13:57.000Z","dependencies_parsed_at":"2024-01-15T23:16:58.396Z","dependency_job_id":"ac3836b2-9476-4435-a250-749fb51a6ccb","html_url":"https://github.com/winseros/Qt6Renderer","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/winseros/Qt6Renderer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winseros%2FQt6Renderer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winseros%2FQt6Renderer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winseros%2FQt6Renderer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winseros%2FQt6Renderer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winseros","download_url":"https://codeload.github.com/winseros/Qt6Renderer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winseros%2FQt6Renderer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268716868,"owners_count":24295593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gdb","lldb","pretty-print","pretty-printing","qt","qt6"],"created_at":"2024-11-24T03:11:11.411Z","updated_at":"2025-08-04T15:38:49.948Z","avatar_url":"https://github.com/winseros.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QT6 Renderer\n\nThe set of scripts for pretty printing [Qt][qt] by [GDB][gdb] and [LLDB][lldb].\n\n## IDE plugins\n* [CLion][qt6renderer_intlj]\n* [Visual Studio Code][qt6renderer_vsc]\n\n## Qt versions support\n* 6.x\n\n## Qt types support\n* [See here for GDB](./python/gdb)\n* [See here for LLDB](./python/lldb)\n\nYou can use the [example project][qt6renderer_exmpl] for testsing.\n\n## Debuggers support\n* LLDB\n* GDB\n\n## Operating systems tested on\n* Windows\n* Linux  \n* macOS  \n\n## Architectures tested on\n* x64\n* arm64\n\n## Manual installation\n\n\u003e [!NOTE]\n\u003e Manual installation is an option if you prefer to run GDB executable without an IDE. Or if there is no plugin for your IDE. Or in any other situation when you know what you're doing.\n\u003e\n\u003e You do not need to install manually, if you use an IDE plugin.\n\n### GDB\n\n1. Copy the [qt6renderer](./python/gdb/qt6renderer/) folder somewhere at your system.\n2. Place the [gdbinit][gdbinit] in the any of the supported places at your system.\n3. Add the following content to the `gdbinit`:\n   ```python\n   python sys.path.append('/where/the/qt6renderer/folder/is/at/your/system') \n   # i.e. if the qt6renderer is at '~/gdb/scripts/qt6renderer'\n   # then you add '~/gdb/scripts'\n   python import qt6renderer\n   python gdb.pretty_printers.append(qt6renderer.qt6_lookup)\n   set print pretty on\n   ```\n\n### LLDB\n\n1. Copy the [qt6renderer lldb](./python/lldb/) folder somewhere at your system\n2. If you don't already have one, create a .lldbinit file in an appropriate place for your OS (on macOS this will be ~/.lldbinit)\n3. Add the following line to your `.lldbinit` (replacing /full/path/to... with the actual full path to register.py):\n```\ncommand script import \"/full/path/to/qt6renderer/lldb/register.py\"\n```\n\n## Requirements\nPretty printers need Debug information for `Qt`.\n\nIf you installed `Qt` with `Qt Online Installer`, ensure you have installed\nthe `Qt Debug Information Files`:\n\n![Checkbox for QtDebug Information Files](images/qt_debug_information_files_checkbox.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eIf you are using Arch Linux\u003c/summary\u003e\n\nThen you might wish to install `qt6-base-debug` package.\nYou can install manually (by specifying the url), or by enabling global repo. See [wiki](https://wiki.archlinux.org/title/Debugging/Getting_traces#Installing_debug_packages).\n\n```\npacman -U https://geo.mirror.pkgbuild.com/extra-debug/os/x86_64/qt6-base-debug-6.7.2-1-x86_64.pkg.tar.zst\n```\n\u003c/details\u003e\n\n## Troubleshooting\n\n### Qt Types are not pretty printed\n\n1. Ensure you have satisfied [requirements](#requirements).\n2. GDB only. Ensure there is nothing in your [gdbinit][gdbinit], what might disrupt pretty printing. Disable your `gdbinit`.\n\n   \u003cdetails\u003e\n     \u003csummary\u003eRun the command to check\u003c/summary\u003e\n\n     ```\n     info pretty-printer\n     ```\n\n     \u003e :large_blue_diamond: In the case of `Visual Studio Code` [you need][vscode_exec] to call the gdb commands with the `-exec` prefix. I.e. `-exec info pretty-printer`.\n\n     Should print something like:\n\n     ```\n     global pretty-printers:\n       builtin\n         mpx_bound128\n       qt6_lookup\n     objfile /usr/lib/libstdc++.so.6 pretty-printers:\n       libstdc++-v6\n     ```     \n\n  \u003c/details\u003e\n  \n3. Ensure the proper `Qt` files loaded at runtime.\n\n   \u003e :large_blue_diamond: On Linux one might have `Qt` installed on the host system as a runtime libraries, for instance if the host system runs KDE. The debug target might load the `Qt` libraries from the host system, instead of the `Qt` development SDK.\n\n   Run the command to check:\n\n   \u003cdetails\u003e\n    \u003csummary\u003eGDB\u003c/summary\u003e\n\n    ```\n    info sharedlibrary\n    ```\n\n    \u003e :large_blue_diamond: In the case of `Visual Studio Code` [you need][vscode_exec] to call the gdb commands with the `-exec` prefix. I.e. `-exec info sharedlibrary`.\n\n    Should print something like:\n    \n    ```\n    0x00007ffff7e63940  0x00007ffff7f58b1a Yes /home/user/Qt/6.6.1/gcc_64/lib/libQt6Network.so.6\n    0x00007ffff751f300  0x00007ffff7c0abe2 Yes /home/user/Qt/6.6.1/gcc_64/lib/libQt6Gui.so.6\n    0x00007ffff6cb75e0  0x00007ffff70848eb Yes /home/user/Qt/6.6.1/gcc_64/lib/libQt6Core.so.6\n    ```\n   \u003c/details\u003e\n\n   \u003cdetails\u003e\n    \u003csummary\u003eLLDB\u003c/summary\u003e\n        \n    ```\n    target modules list\n    ````\n\n    Should print something like:\n\n    ```\n    [  3] 0B3D90D4-3A24-26F8-2D28-E6FD902D2E1C-B1957B9C 0x00007ffff7e16000 /home/user/Qt/6.6.1/gcc_64/lib/libQt6Network.so.6 \n      /home/user/Qt/6.6.1/gcc_64/lib/Qt6Network.debug\n    [  4] 8D17CAB4-3968-A65B-FA7A-452CBB959B12-FE3D941E 0x00007ffff7400000 /home/user/Qt/6.6.1/gcc_64/lib/libQt6Gui.so.6 \n      /home/user/Qt/6.6.1/gcc_64/lib/Qt6Gui.debug\n    [  5] 70B3E481-9AFD-557A-D568-DB9065A3D74A-503165F0 0x00007ffff6c00000 /home/user/Qt/6.6.1/gcc_64/lib/libQt6Core.so.6 \n      /home/user/Qt/6.6.1/gcc_64/lib/Qt6Core.debug\n    ```\n   \u003c/details\u003e   \n  \n4. Ensure the `Qt` version supports pretty printing.   \n\n   \u003e :large_blue_diamond: There are problematic `Qt` versions, e.g. `6.4.2`, for which the debugger is unable to extract type metadata. Consider switching to another version of `Qt`.\n\n   To check whether the `Qt` version has metadata, run:\n\n   \u003cdetails\u003e\n    \u003csummary\u003eGDB\u003c/summary\u003e\n\n    ```\n    python print(gdb.parse_and_eval('*(\u0026qtHookData)'))\n    ```\n\n    \u003e :large_blue_diamond: In the case of `Visual Studio Code` [you need][vscode_exec] to call the gdb commands with the `-exec` prefix. I.e. `-exec python print(...)`.\n\n    If degugger could read the metadata, it will print something like:\n    \n    ```\n    {3, 7, 394754, 0, 0, 0, 22}\n    ```\n    \n    or\n    \n    ```\n    0x7ffff729bd00 \u003cqtHookData\u003e\n    ```\n\n    ![GDB could extract Qt Metadata - Visual Studio Code](images/gdb_qt_meta_available_vsc.png)\n\n    ![GDB could extract Qt Metadata - CLion](images/gdb_qt_meta_available_jb.png)\n\n    Otherwise:\n\n    ```\n    \u003cdata variable, no debug info\u003e\n    ```\n\n    ![GDB could not extract Qt Metadata - CLion](images/gdb_qt_meta_unavailable_jb.png)\n   \u003c/details\u003e\n\n   \u003cdetails\u003e\n     \u003csummary\u003eLLDB\u003c/summary\u003e\n\n     ```\n     script print(lldb.target.FindFirstGlobalVariable('qtHookData').GetPointeeData(2, 1))\n     ```\n\n     If degugger could read the metadata, it will print something like:\n    \n     ```\n     02 07 06 00 00 00 00 00\n     ```\n\n     ![LLDB could extract Qt Metadata - Visual Studio Code](images/lldb_qt_meta_available_vsc.png)\n\n     ![LLDB could extract Qt Metadata - CLion](images/lldb_qt_meta_available_jb.png)\n   \u003c/details\u003e\n\n\n\n[qt]: https://www.qt.io/\n[gdb]: https://sourceware.org/gdb/\n[lldb]: https://lldb.llvm.org/\n[qt6renderer_exmpl]: https://github.com/winseros/Qt6RendererExmpl\n[qt6renderer_intlj]: https://github.com/winseros/Qt6RendererIntlj\n[qt6renderer_vsc]: https://github.com/winseros/Qt6RendererVsc\n[gdbinit]: https://man7.org/linux/man-pages/man5/gdbinit.5.html\n[vscode_exec]: https://github.com/Microsoft/vscode-cpptools/issues/106","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinseros%2Fqt6renderer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinseros%2Fqt6renderer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinseros%2Fqt6renderer/lists"}