QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
showMessage(_("TRYING TO START ADAPTER"));
- if (!m_engine->startGdb())
+ QStringList args;
+ args.append(_("-ex"));
+ args.append(_("set auto-solib-add off"));
+ if (!m_engine->startGdb(args))
return;
//if (m_executable.isEmpty()) {
void CoreGdbAdapter::handleTemporaryDetach(const GdbResponse &response)
{
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
- if (response.resultClass == GdbResultDone)
+ if (response.resultClass == GdbResultDone) {
m_engine->notifyEngineSetupOk();
- else
+ } else {
m_engine->notifyEngineSetupFailed();
+ }
}
void CoreGdbAdapter::setupInferior()
m_engine->loadPythonDumpers();
showMessage(tr("Attached to core."), StatusBar);
m_engine->handleInferiorPrepared();
+ // Due to the auto-solib-add off setting, we don't have any
+ // symbols yet. Load them in order of importance.
+ m_engine->reloadStack(true);
+ m_engine->postCommand("info shared", CB(handleModulesList));
return;
}
QString msg = tr("Attach to core \"%1\" failed:\n")
m_engine->notifyInferiorSetupFailed(msg);
}
+void CoreGdbAdapter::handleModulesList(const GdbResponse &response)
+{
+ m_engine->handleModulesList(response);
+ loadSymbolsForStack();
+}
+
+void CoreGdbAdapter::loadSymbolsForStack()
+{
+ m_engine->loadSymbolsForStack();
+ QTimer::singleShot(1000, this, SLOT(loadAllSymbols()));
+}
+
+void CoreGdbAdapter::loadAllSymbols()
+{
+ m_engine->loadAllSymbols();
+}
+
void CoreGdbAdapter::runEngine()
{
QTC_ASSERT(state() == EngineRunRequested, qDebug() << state());
void shutdownInferior();
void shutdownAdapter();
+ Q_SLOT void loadSymbolsForStack();
+ Q_SLOT void loadAllSymbols();
+
AbstractGdbProcess *gdbProc() { return &m_gdbProc; }
void handleTemporaryDetach(const GdbResponse &response);
void handleTemporaryTargetCore(const GdbResponse &response);
void handleFileExecAndSymbols(const GdbResponse &response);
void handleTargetCore(const GdbResponse &response);
+ void handleModulesList(const GdbResponse &response);
QString m_executable;
const QByteArray m_coreName;
const Modules &modules = modulesHandler()->modules();
foreach (const StackFrame &frame, stackHandler()->frames()) {
if (frame.function == _("??")) {
- qDebug() << "LOAD FOR " << frame.address;
+ //qDebug() << "LOAD FOR " << frame.address;
foreach (const Module &module, modules) {
if (module.startAddress <= frame.address
&& frame.address < module.endAddress) {
#endif
}
- // Initial attempt to set breakpoints
- showStatusMessage(tr("Setting breakpoints..."));
- showMessage(tr("Setting breakpoints..."));
- attemptBreakpointSynchronization();
+ // Initial attempt to set breakpoints.
+ if (startParameters().startMode != AttachCore) {
+ showStatusMessage(tr("Setting breakpoints..."));
+ showMessage(tr("Setting breakpoints..."));
+ attemptBreakpointSynchronization();
+ }
if (m_cookieForToken.isEmpty()) {
finishInferiorSetup();