From 1fafd2c273f6d5e01d946d61ce8f05435872e313 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Wed, 3 Apr 2024 17:25:34 +0800 Subject: [PATCH] eliminate error message when start debug in lldb-mi --- RedPandaIDE/debugger/gdbmidebugger.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/RedPandaIDE/debugger/gdbmidebugger.cpp b/RedPandaIDE/debugger/gdbmidebugger.cpp index 35bd34ec..94639287 100644 --- a/RedPandaIDE/debugger/gdbmidebugger.cpp +++ b/RedPandaIDE/debugger/gdbmidebugger.cpp @@ -985,10 +985,12 @@ void GDBMIDebuggerClient::initialize(const QString& inferior, bool hasSymbols) postCommand("-enable-pretty-printing",""); postCommand("-gdb-set", "width 0"); // don't wrap output, very annoying postCommand("-gdb-set", "confirm off"); - postCommand("-gdb-set", "print repeats 10"); - postCommand("-gdb-set", "print null-stop"); - postCommand("-gdb-set", QString("print elements %1").arg(pSettings->debugger().arrayElements())); // limit array elements to 30 - postCommand("-gdb-set", QString("print characters %1").arg(pSettings->debugger().characters())); // limit array elements to 300 + if (clientType() == DebuggerType::GDB) { + postCommand("-gdb-set", "print repeats 10"); + postCommand("-gdb-set", "print null-stop"); + postCommand("-gdb-set", QString("print elements %1").arg(pSettings->debugger().arrayElements())); // limit array elements to 30 + postCommand("-gdb-set", QString("print characters %1").arg(pSettings->debugger().characters())); // limit array elements to 300 + } postCommand("-environment-cd", QString("\"%1\"").arg(extractFileDir(inferior))); // restore working directory if (hasSymbols) {