From 5b46f6006f8b3affa82f5f9509176bdd314fb4ab Mon Sep 17 00:00:00 2001 From: Xusheng Date: Thu, 30 Mar 2023 13:48:05 +0800 Subject: [PATCH] Only stop at the entry point for an ELF with no loader when we are debugging the executable itself (not a shared library) --- core/adapters/lldbadapter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/adapters/lldbadapter.cpp b/core/adapters/lldbadapter.cpp index 8bedb615..72838864 100644 --- a/core/adapters/lldbadapter.cpp +++ b/core/adapters/lldbadapter.cpp @@ -207,7 +207,8 @@ bool LldbAdapter::ExecuteWithArgs(const std::string& path, const std::string& ar AddBreakpoint(ModuleNameAndOffset(configs.inputFile, m_entryPoint - m_start)); std::string launchCommand = "process launch"; - if (Settings::Instance()->Get("debugger.stopAtSystemEntryPoint") || m_isElFWithoutDynamicLoader) + if (Settings::Instance()->Get("debugger.stopAtSystemEntryPoint") || + (m_isElFWithoutDynamicLoader && (path == configs.inputFile))) launchCommand += " --stop-at-entry"; if (configs.requestTerminalEmulator)