- fix: the last line in the debug console is not correctly displayed
This commit is contained in:
parent
cbec8f60f4
commit
2fffe33bb7
1
NEWS.md
1
NEWS.md
|
@ -1,6 +1,7 @@
|
|||
Version 0.10.1 For Dev-C++ 7 Beta
|
||||
- fix: can't correctly expand watch expression that has spaces in it
|
||||
- fix: can't correctly display stl containers in watch
|
||||
- fix: the last line in the debug console is not correctly displayed
|
||||
|
||||
Version 0.10.0 For Dev-C++ 7 Beta
|
||||
- enhancement: use gdb/mi interface to communicate with gdb debug session
|
||||
|
|
|
@ -466,10 +466,20 @@ void Debugger::syncFinishedParsing()
|
|||
for (const QString& line:mReader->fullOutput()) {
|
||||
pMainWindow->addDebugOutput(line);
|
||||
}
|
||||
} else {
|
||||
if (mReader->currentCmd() && mReader->currentCmd()->command == "disas") {
|
||||
|
||||
} else {
|
||||
for (const QString& line:mReader->consoleOutput()) {
|
||||
pMainWindow->addDebugOutput(line);
|
||||
}
|
||||
if (
|
||||
(mReader->currentCmd()
|
||||
&& mReader->currentCmd()->source== DebugCommandSource::Console)
|
||||
|| !mReader->consoleOutput().isEmpty() ) {
|
||||
pMainWindow->addDebugOutput("(gdb)");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -851,6 +861,7 @@ void DebugReader::processDebugOutput(const QByteArray& debugOutput)
|
|||
|
||||
for (int i=0;i<lines.count();i++) {
|
||||
QByteArray line = lines[i];
|
||||
if (pSettings->debugger().showDetailLog())
|
||||
mFullOutput.append(line);
|
||||
line = removeToken(line);
|
||||
if (line.isEmpty()) {
|
||||
|
@ -924,9 +935,8 @@ void DebugReader::runNextCmd()
|
|||
// if devDebugger.ShowCommandLog or pCmd^.ShowInConsole then begin
|
||||
if (pSettings->debugger().enableDebugConsole() ) {
|
||||
//update debug console
|
||||
if (!pSettings->debugger().showDetailLog()) {
|
||||
emit changeDebugConsoleLastLine(pCmd->command + ' ' + params);
|
||||
} else {
|
||||
if (pSettings->debugger().showDetailLog()
|
||||
&& pCmd->source != DebugCommandSource::Console) {
|
||||
emit changeDebugConsoleLastLine(pCmd->command + ' ' + params);
|
||||
}
|
||||
}
|
||||
|
@ -1333,7 +1343,7 @@ void DebugReader::run()
|
|||
} else if (!mCmdRunning && readed.isEmpty()){
|
||||
runNextCmd();
|
||||
} else if (readed.isEmpty()){
|
||||
msleep(100);
|
||||
msleep(1);
|
||||
}
|
||||
}
|
||||
if (errorOccurred) {
|
||||
|
|
|
@ -741,6 +741,8 @@ void MainWindow::updateAppTitle()
|
|||
|
||||
void MainWindow::addDebugOutput(const QString &text)
|
||||
{
|
||||
if (!pSettings->debugger().enableDebugConsole())
|
||||
return;
|
||||
if (text.isEmpty()) {
|
||||
ui->debugConsole->addLine("");
|
||||
} else {
|
||||
|
@ -1572,7 +1574,7 @@ void MainWindow::prepareDebugger()
|
|||
|
||||
// Clear logs
|
||||
ui->debugConsole->clear();
|
||||
if (!pSettings->debugger().enableDebugConsole()) {
|
||||
if (pSettings->debugger().enableDebugConsole()) {
|
||||
ui->debugConsole->addLine("(gdb) ");
|
||||
}
|
||||
ui->txtEvalOutput->clear();
|
||||
|
|
|
@ -276,7 +276,7 @@ void QConsole::setTopRow(int value)
|
|||
|
||||
int QConsole::maxScrollHeight()
|
||||
{
|
||||
return std::max(mContents.rows()-mRowsInWindow,1);
|
||||
return std::max(mContents.rows()-mRowsInWindow+1,1);
|
||||
}
|
||||
|
||||
void QConsole::updateScrollbars()
|
||||
|
|
Loading…
Reference in New Issue