- fix: compile error in linux
- fix: can't receive gdb async output for commands
This commit is contained in:
parent
5e44a2a1c6
commit
fe8d3e9663
4
NEWS.md
4
NEWS.md
|
@ -1,3 +1,7 @@
|
|||
Version 0.12.5 For Dev-C++ 7 Beta
|
||||
- fix: compile error in linux
|
||||
- fix: can't receive gdb async output for commands
|
||||
|
||||
Version 0.12.4 For Dev-C++ 7 Beta
|
||||
- change: add copyright infos to each source file
|
||||
- fix: watch and local infos not updated when changing current frame in the call stack panel
|
||||
|
|
|
@ -246,8 +246,6 @@ bool Debugger::inferiorRunning()
|
|||
void Debugger::interrupt()
|
||||
{
|
||||
sendCommand("-exec-interrupt", "");
|
||||
QTimer::singleShot(1000,this, &Debugger::interruptRefresh);
|
||||
|
||||
}
|
||||
|
||||
void Debugger::addBreakpoint(int line, const Editor* editor)
|
||||
|
@ -408,11 +406,6 @@ void Debugger::fetchVarChildren(const QString &varName)
|
|||
}
|
||||
}
|
||||
|
||||
void Debugger::interruptRefresh()
|
||||
{
|
||||
sendCommand("noop","");
|
||||
}
|
||||
|
||||
void Debugger::removeWatchVars(bool deleteparent)
|
||||
{
|
||||
if (deleteparent) {
|
||||
|
@ -617,6 +610,7 @@ DebugReader::DebugReader(Debugger* debugger, QObject *parent) : QThread(parent),
|
|||
mDebugger = debugger;
|
||||
mProcess = std::make_shared<QProcess>();
|
||||
mCmdRunning = false;
|
||||
mAsyncUpdated = false;
|
||||
}
|
||||
|
||||
void DebugReader::postCommand(const QString &Command, const QString &Params,
|
||||
|
@ -936,12 +930,18 @@ void DebugReader::runNextCmd()
|
|||
{
|
||||
QMutexLocker locker(&mCmdQueueMutex);
|
||||
|
||||
PDebugCommand lastCmd = mCurrentCmd;
|
||||
if (mCurrentCmd) {
|
||||
mCurrentCmd.reset();
|
||||
mCurrentCmd=nullptr;
|
||||
emit cmdFinished();
|
||||
}
|
||||
if (mCmdQueue.isEmpty())
|
||||
if (mCmdQueue.isEmpty()) {
|
||||
if (pSettings->debugger().useGDBServer() && mInferiorRunning && !mAsyncUpdated) {
|
||||
mAsyncUpdated = true;
|
||||
QTimer::singleShot(1000,this,&DebugReader::asyncUpdate);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
PDebugCommand pCmd = mCmdQueue.dequeue();
|
||||
mCmdRunning = true;
|
||||
|
@ -1237,6 +1237,14 @@ QByteArray DebugReader::removeToken(const QByteArray &line)
|
|||
return line;
|
||||
}
|
||||
|
||||
void DebugReader::asyncUpdate()
|
||||
{
|
||||
QMutexLocker locker(&mCmdQueueMutex);
|
||||
if (mCmdQueue.isEmpty())
|
||||
postCommand("noop","",DebugCommandSource::Other);
|
||||
mAsyncUpdated = false;
|
||||
}
|
||||
|
||||
const QString &DebugReader::signalMeaning() const
|
||||
{
|
||||
return mSignalMeaning;
|
||||
|
|
|
@ -275,7 +275,6 @@ private slots:
|
|||
void updateRegisterValues(const QHash<int,QString>& values);
|
||||
void refreshWatchVars();
|
||||
void fetchVarChildren(const QString& varName);
|
||||
void interruptRefresh();
|
||||
private:
|
||||
bool mExecuting;
|
||||
bool mCommandChanged;
|
||||
|
@ -424,6 +423,8 @@ private:
|
|||
void processDebugOutput(const QByteArray& debugOutput);
|
||||
void runInferiorStoppedHook();
|
||||
QByteArray removeToken(const QByteArray& line);
|
||||
private slots:
|
||||
void asyncUpdate();
|
||||
private:
|
||||
Debugger *mDebugger;
|
||||
QString mDebuggerPath;
|
||||
|
@ -431,7 +432,7 @@ private:
|
|||
QSemaphore mStartSemaphore;
|
||||
QQueue<PDebugCommand> mCmdQueue;
|
||||
bool mErrorOccured;
|
||||
|
||||
bool mAsyncUpdated;
|
||||
//fOnInvalidateAllVars: TInvalidateAllVarsEvent;
|
||||
bool mCmdRunning;
|
||||
PDebugCommand mCurrentCmd;
|
||||
|
|
|
@ -178,7 +178,7 @@ QString Settings::Dirs::appLibDir() const
|
|||
return appDir();
|
||||
#elif defined(Q_OS_LINUX)
|
||||
if (isGreenEdition()) {
|
||||
return app();
|
||||
return appDir();
|
||||
}
|
||||
return includeTrailingPathDelimiter(PREFIX)+"lib";
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue