diff options
author | Cristian Adam <cristian.adam@qt.io> | 2024-04-25 17:59:50 +0200 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2024-04-25 16:44:43 +0000 |
commit | 3f46037b373f5b507389f36154fc8ea857645048 (patch) | |
tree | 5a6ba61c7c3f4a58482f2f6334c429645fb59b12 | |
parent | 041727fb29aa16f709fa2046f319401a9604ec33 (diff) |
Debugger: Execute additional attach commands for LLDB
This allows setting _Preferences > Debugger > GDB > Additional Attach
Commands_ with the content:
process handle SIGSEGV --pass true --stop false --notify true
which results in the debugger not stopping in assembler for Java runtime
exceptions.
Task-number: QTCREATORBUG-29928
Change-Id: I8edf0d79dcccfe7ddb27502edb122fb5fb2c646c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: hjk <hjk@qt.io>
-rw-r--r-- | src/plugins/debugger/lldb/lldbengine.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 2934f1db44..c6daabd863 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -30,6 +30,7 @@ #include <projectexplorer/runcontrol.h> +#include <utils/algorithm.h> #include <utils/environment.h> #include <utils/process.h> #include <utils/processinterface.h> @@ -328,6 +329,16 @@ void LldbEngine::handleLldbStarted() runEngine(); }; runCommand(cmd3); + + // Execute post attach commands + QStringList commands = settings().gdbPostAttachCommands().split('\n'); + commands = Utils::filtered(commands, [](const QString line) { + const QString trimmed = line.trimmed(); + return !trimmed.isEmpty() && !trimmed.startsWith('#'); + }); + for (const QString &cmd : commands) { + executeDebuggerCommand(cmd); + } } else { notifyEngineSetupFailed(); } |