Commit 35218bbe authored by con's avatar con
Browse files

Add missing type information into gdb calls.

The missing type information lead to non-relocatable debugging helpers
on the Mac.

Reviewed-by: Oswald Buddenhagen
parent e0f7b845
...@@ -3145,7 +3145,7 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren) ...@@ -3145,7 +3145,7 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren)
sendWatchParameters(params); sendWatchParameters(params);
QString cmd ="call " QString cmd ="call "
+ QString("qDumpObjectData440(") + QString("(void*)qDumpObjectData440(")
+ QString::number(protocol) + QString::number(protocol)
+ ',' + "%1+1" // placeholder for token + ',' + "%1+1" // placeholder for token
+ ',' + addr + ',' + addr
...@@ -3441,7 +3441,7 @@ void GdbEngine::sendWatchParameters(const QByteArray &params0) ...@@ -3441,7 +3441,7 @@ void GdbEngine::sendWatchParameters(const QByteArray &params0)
QByteArray params = params0; QByteArray params = params0;
params.append('\0'); params.append('\0');
char buf[50]; char buf[50];
sprintf(buf, "set {char[%d]} qDumpInBuffer = {", params.size()); sprintf(buf, "set {char[%d]} &qDumpInBuffer = {", params.size());
QByteArray encoded; QByteArray encoded;
encoded.append(buf); encoded.append(buf);
for (int i = 0; i != params.size(); ++i) { for (int i = 0; i != params.size(); ++i) {
...@@ -4179,14 +4179,14 @@ void GdbEngine::tryLoadDebuggingHelpers() ...@@ -4179,14 +4179,14 @@ void GdbEngine::tryLoadDebuggingHelpers()
sendCommand("sharedlibrary " + dotEscape(lib)); sendCommand("sharedlibrary " + dotEscape(lib));
#endif #endif
// retreive list of dumpable classes // retreive list of dumpable classes
sendCommand("call qDumpObjectData440(1,%1+1,0,0,0,0,0,0)"); sendCommand("call (void*)qDumpObjectData440(1,%1+1,0,0,0,0,0,0)");
sendCommand("p (char*)&qDumpOutBuffer", GdbQueryDebuggingHelper); sendCommand("p (char*)&qDumpOutBuffer", GdbQueryDebuggingHelper);
} }
void GdbEngine::recheckDebuggingHelperAvailability() void GdbEngine::recheckDebuggingHelperAvailability()
{ {
// retreive list of dumpable classes // retreive list of dumpable classes
sendCommand("call qDumpObjectData440(1,%1+1,0,0,0,0,0,0)"); sendCommand("call (void*)qDumpObjectData440(1,%1+1,0,0,0,0,0,0)");
sendCommand("p (char*)&qDumpOutBuffer", GdbQueryDebuggingHelper); sendCommand("p (char*)&qDumpOutBuffer", GdbQueryDebuggingHelper);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment