Comments (6)
Could you please try attached patch?
diff --git a/launcher/injector/gdbinjector.cpp b/launcher/injector/gdbinjector.cpp
index 7ab88ff..511e060 100644
--- a/launcher/injector/gdbinjector.cpp
+++ b/launcher/injector/gdbinjector.cpp
@@ -104,17 +104,24 @@ bool GdbInjector::startGdb(const QStringList &args)
bool GdbInjector::injectAndDetach(const QString &probeDll, const QString &probeFunc)
{
Q_ASSERT(m_process);
+
+ // load the probe dll
#ifndef Q_OS_MAC
execGdbCmd("sha dl");
#endif
execGdbCmd(qPrintable(QString::fromLatin1("call (void) dlopen(\"%1\", %2)").
arg(probeDll).arg(RTLD_NOW)));
+
+ // call the probe inject function
#ifndef Q_OS_MAC
+ // try this on non-mac systems, see ddd7c13f1272e72606396b61c910521041dfd2eb
execGdbCmd(qPrintable(QString::fromLatin1("sha %1").arg(probeDll)));
-#endif
-// execGdbCmd(qPrintable(QString::fromLatin1("call (void) %1()").arg(probeFunc)));
execGdbCmd(qPrintable(QString::fromLatin1("print %1").arg(probeFunc)));
execGdbCmd("call $()");
+#else
+ // try to use call function, see issue #10
+ execGdbCmd(qPrintable(QString::fromLatin1("call (void) %1()").arg(probeFunc)));
+#endif
if (qgetenv("GAMMARAY_UNITTEST") != "1") {
execGdbCmd("detach");
Copy this diff to file "diff", then apply with "patch -p1 < diff".
from gammaray.
Sorry for the delay but I've tried the patch today on latest source. Now it crashes instead:
Command line output:
$ /Users/tobias/gammaray/bin/gammaray
QProcess: Destroyed while process is still running.
ASSERT: "m_data == sortedProcesses" in file /Users/tobias/dev/rep/GammaRay/launcher/processmodel.cpp, line 102
[1] 9302 abort /Users/tobias/gammaray/bin/gammaray
Backtrace:
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8653a212 **pthread_kill + 10
1 libsystem_c.dylib 0x00007fff89920b34 pthread_kill + 90
2 libsystem_c.dylib 0x00007fff89964dfa abort + 143
3 QtCore 0x00000001018ef555 qt_message_output(QtMsgType, char const_) + 149
4 QtCore 0x00000001018ef70d qt_message(QtMsgType, char const_, __va_list_tag_) + 381
5 QtCore 0x00000001018ef92d qFatal(char const_, ...) + 141
6 QtCore 0x00000001018ef97a qt_assert(char const_, char const_, int) + 26
7 gammaray 0x000000010183b2c8 GammaRay::ProcessModel::mergeProcesses(QList<ProcData> const&) + 1176
8 gammaray 0x0000000101838932 GammaRay::AttachDialog::updateProcessesFinished() + 194
9 QtCore 0x00000001019fd201 QMetaObject::activate(QObject_, QMetaObject const_, int, void*_) + 2001
10 QtCore 0x00000001018e9d06 QFutureWatcherBase::event(QEvent_) + 122
11 QtGui 0x0000000101c80e98 QApplicationPrivate::notify_helper(QObject_, QEvent_) + 304
12 QtGui 0x0000000101c81119 QApplication::notify(QObject_, QEvent_) + 603
13 QtCore 0x00000001019e83d6 QCoreApplication::notifyInternal(QObject_, QEvent_) + 104
14 QtCore 0x00000001019e87c3 QCoreApplicationPrivate::sendPostedEvents(QObject_, int, QThreadData_) + 557
15 com.apple.CoreFoundation 0x00007fff878a8841 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION** + 17
16 com.apple.CoreFoundation 0x00007fff878a8165 __CFRunLoopDoSources0 + 245
17 com.apple.CoreFoundation 0x00007fff878cb4e5 __CFRunLoopRun + 789
18 com.apple.CoreFoundation 0x00007fff878cadd2 CFRunLoopRunSpecific + 290
19 com.apple.HIToolbox 0x00007fff81bf4774 RunCurrentEventLoopInMode + 209
20 com.apple.HIToolbox 0x00007fff81bf4512 ReceiveNextEventCommon + 356
21 com.apple.HIToolbox 0x00007fff81bf43a3 BlockUntilNextEventMatchingListInMode + 62
22 com.apple.AppKit 0x00007fff88738fa3 _DPSNextEvent + 685
23 com.apple.AppKit 0x00007fff88738862 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
24 QtGui 0x0000000101c3c9c1 QEventDispatcherMac::processEvents(QFlagsQEventLoop::ProcessEventsFlag) + 617
25 QtCore 0x00000001019e5838 QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) + 394
26 QtGui 0x00000001020bb673 QDialog::exec() + 243
27 gammaray 0x0000000101830947 main + 1255
28 libdyld.dylib 0x00007fff826247e1 start + 1
from gammaray.
Can anyone of the OSX guys reproduce this?
from gammaray.
tfar, ping. any update on this?
from gammaray.
K. Just tried most recent GammaRay from git. It built, but when i tried to attach it to a Qt program the command line showed this:
~/gammaray/bin/gammaray
QProcess: Destroyed while process is still running.
/Users/tobias/dev/rep/GammaRay/build/80461: No such file or directory
Unable to call function "gammaray_probe_inject" at 0x1604faaa0: no return type information available.
To call this function anyway, you can cast the return type explicitly (e.g. 'print (float) fabs (3.0)')
from gammaray.
Closing because of lack of feedback.
from gammaray.
Related Issues (20)
- Widget Inspector not updating in real time HOT 1
- Can't attach to PySide2 Application importing QtCore HOT 8
- [Feature request] Improve the Connection Error dialog HOT 1
- Help Needed: Building GammaRay from Source on UBUNTU HOT 5
- GammaRay: Failed to load: ..\gammaray\plugins\gammaray\3.0\qt6_5-GNU-x86_64d\gammaray_probed.dll HOT 3
- GammaRay exits after 1 minute HOT 3
- Building against custom Qt6 build fails if `qmake` is missing HOT 1
- Qt widgets tab inspector does not exist HOT 1
- This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
- Build failure in the absence of QtWidget HOT 20
- Build Failed : no such file or directory direct.h HOT 4
- Qt platform plugin could be initialized HOT 1
- Error while building GammaRay for Qt 6.6.2 on windows HOT 4
- QT 6.7 Target not responding HOT 2
- GammayRay exit on attach to process HOT 2
- Please make sure your Qt5 installation contains private headers. HOT 1
- QuickScenes view is once again unusable with QQuickWidget apps HOT 2
- Qt 6.7 supported? HOT 3
- connectiontest-preload-filter and connectiontest-style-filter fail from time to time
- error when i cloned gammaray from github HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gammaray.