[Lldb-commits] [lldb] [lldb] add stop-at-user-entry option to process launch (PR #67019)

José Lira Junior via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 27 07:25:48 PDT 2023


================
@@ -38,7 +39,36 @@ Status CommandOptionsProcessLaunch::SetOptionValue(
   case 's': // Stop at program entry point
     launch_info.GetFlags().Set(eLaunchFlagStopAtEntry);
     break;
-
+  case 'm': // Stop at user entry point
+  {
+    TargetSP target_sp =
+        execution_context ? execution_context->GetTargetSP() : TargetSP();
+    ModuleSP main_module_sp = target_sp->GetExecutableModule();
+    FileSpecList shared_lib_filter;
+    shared_lib_filter.Append(main_module_sp->GetFileSpec());
+    std::vector<std::string> entryPointNames;
+    for (LanguageType lang_type : Language::GetSupportedLanguages()) {
+      Language *lang = Language::FindPlugin(lang_type);
+      if (lang) {
+        std::string entryPointName = lang->GetUserEntryPointName();
+        if (!entryPointName.empty()) {
+          entryPointNames.push_back(entryPointName);
+        }
----------------
junior-jl wrote:

Corrected! Thank you for the reminder.

https://github.com/llvm/llvm-project/pull/67019


More information about the lldb-commits mailing list