Fix a bug about debug mode 62/293862/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 7 Jun 2023 07:24:48 +0000 (07:24 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 7 Jun 2023 07:24:48 +0000 (07:24 +0000)
The EXE tag can be empty. Unfortunately, the launchpad does not check
whether the exe is empty or not. This patch adds the empty check before
inserting the exe path to the vector.

Change-Id: I2f86449d24364f3a805ed026020c4e14459c9a23
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad-process-pool/debug.cc

index c9f43e2..7785623 100644 (file)
@@ -103,7 +103,9 @@ void Debug::PrepareDebugger(const tizen_base::Bundle& b) {
     ParseAndSetEnvironment(b, extra_env);
 
   debug_argv_ = debugger_info_->GetDefaultOptList();
-  debug_argv_.insert(debug_argv_.begin(), debugger_info_->GetExe());
+  if (!debugger_info_->GetExe().empty())
+    debug_argv_.insert(debug_argv_.begin(), debugger_info_->GetExe());
+
   for (const auto& extra_key : debugger_info_->GetExtraKeyList())
     ParseAndAddArgv(b, extra_key);