bpftrace and printing content of QString
Unsolved
General and Desktop
-
Hi,
I'm experimenting with bpftrace to observe processing flow in Qt 6 URI intercepting process.
However, attempt to print value of QString received as argument or returned fails.#!/usr/bin/env bpftrace struct arrayDataPointer { int16_t *d; wchar_t *ptr; int size; }; struct qstring { struct arrayDataPointer * d; }; uprobe:/opt/Qt/Tools/QtDesignStudio/lib/Qt/lib/libQt6Qml.so.6.5.4:_ZN11QQmlImports19completeQmldirPathsERK7QStringRK5QListIS0_E13QTypeRevision { $ptr1 = (struct qstring *) arg0; $ptr2 = (struct qstring *) arg1; printf("\ncompleteQmldirPaths for arg0 Uri %s \n", str($ptr1->d->ptr)); printf("completeQmldirPaths for arg1 Uri %s \n", str($ptr2->d->ptr); }
There're prettyPrinters for gdb. But I failed to find similar support for bpftrace.
Anyone can help make it working? -
Hi,
Did you also contact the bpftrace folks about that request ?