=?utf-8?q?José?= L. Junior <jljunio...@gmail.com>, =?utf-8?q?José?= L. Junior <jljunio...@gmail.com>, =?utf-8?q?José?= L. Junior <jljunio...@gmail.com> Message-ID: In-Reply-To: <llvm/llvm-project/pull/67019/l...@github.com>
================ @@ -38,7 +38,18 @@ Status CommandOptionsProcessLaunch::SetOptionValue( case 's': // Stop at program entry point launch_info.GetFlags().Set(eLaunchFlagStopAtEntry); break; - + case 'm': // Stop at main function + { + TargetSP target_sp = + execution_context ? execution_context->GetTargetSP() : TargetSP(); + BreakpointSP bp_sp = target_sp->CreateBreakpoint( + nullptr, nullptr, "main", eFunctionNameTypeAuto, eLanguageTypeUnknown, ---------------- jimingham wrote: IIUC, we're not trying to break at the actual entry point (that's what -stop-at-entry-point does) but the main executable's Language entry point. I'm not sure that is something the platform can know. For all the C-based languages it was "main", but for some other languages it might be something else. For Ada apparently it can be anything and you designate it "main" some other way. In other languages it could just have a different name than "main"... If that's true, shouldn't we be asking all the Languages we support what their "main" function is, not the Platforms. I'm not sure they can know. And for situations like the Ada one the language would have to be able to figure out what the main function was by some Ada specific means. https://github.com/llvm/llvm-project/pull/67019 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits