[Lldb-commits] [lldb] [lldb] add stop-at-main option to process launch (PR #67019)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 25 15:01:09 PDT 2023
=?utf-8?q?José?= L. Junior <jljuniorpb at gmail.com>,
=?utf-8?q?José?= L. Junior <jljuniorpb at gmail.com>,
=?utf-8?q?José?= L. Junior <jljuniorpb at gmail.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/67019/lldb at 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,
+ 0, eLazyBoolNo, false, false);
----------------
clayborg wrote:
It is useful to put c style comment with variable names in it, so instead of the above line, you would have:
```
/*offset=*/0, /*skip_prologue=*/eLazyBoolNo, /*internal=*/false, /*request_hardware=*/false);
https://github.com/llvm/llvm-project/pull/67019
More information about the lldb-commits
mailing list