From a892e21ed3903c85ed65e6abdd2d9d7e0daec51d Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sun, 24 Mar 2024 18:07:32 +0800 Subject: [PATCH] - fix #319 : Register names in the cpu info are not in correct order. --- NEWS.md | 1 + RedPandaIDE/debugger/gdbmidebugger.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index bae2c041..f2e8de35 100644 --- a/NEWS.md +++ b/NEWS.md @@ -81,6 +81,7 @@ Red Panda C++ Version 2.27 - enhancement: Restore line position after file is modified outside and reloaded. - fix: Caret on '('/',' in string/comment shouldn't invoke function info tips. - fix: Function name not correctly found if it and the '(' is not in one line; + - fix: Register names in the cpu info are not in correct order. Red Panda C++ Version 2.26 - enhancement: Code suggestion for embedded std::vectors. diff --git a/RedPandaIDE/debugger/gdbmidebugger.cpp b/RedPandaIDE/debugger/gdbmidebugger.cpp index ba319ef3..64749c7b 100644 --- a/RedPandaIDE/debugger/gdbmidebugger.cpp +++ b/RedPandaIDE/debugger/gdbmidebugger.cpp @@ -986,8 +986,8 @@ void GDBMIDebuggerClient::initialize(const QString& inferior, bool hasSymbols) 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 (clientType()==DebuggerType::GDB) - postCommand("-data-list-register-names",""); + // if (clientType()==DebuggerType::GDB) + // postCommand("-data-list-register-names",""); if (hasSymbols) { postCommand("-file-exec-and-symbols", '"' + inferior + '"'); @@ -1208,8 +1208,9 @@ void GDBMIDebuggerClient::refreshFrame() void GDBMIDebuggerClient::refreshRegisters() { - if (clientType()==DebuggerType::LLDB_MI) - postCommand("-data-list-register-names",""); + // if (clientType()==DebuggerType::LLDB_MI) + // postCommand("-data-list-register-names",""); + postCommand("-data-list-register-names",""); postCommand("-data-list-register-values", "N"); }