[Lldb-commits] [lldb] [lldb][Module] Make eLoadScriptFromSymFileWarn behave as a "dry-run" (PR #189943)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 1 08:04:44 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- lldb/include/lldb/Core/Module.h lldb/include/lldb/Target/Target.h lldb/source/Commands/CommandObjectTarget.cpp lldb/source/Core/Module.cpp lldb/source/Core/ModuleList.cpp lldb/source/Target/Target.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h
index cccc6fb81..c4ada11b8 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -800,7 +800,8 @@ public:
const llvm::DenseMap<uint32_t, ScriptedFrameProviderDescriptor> &
GetScriptedFrameProviderDescriptors() const;
- void ReportScriptLoading(const llvm::SmallVector<std::string> &warned_script_paths);
+ void ReportScriptLoading(
+ const llvm::SmallVector<std::string> &warned_script_paths);
protected:
/// Invalidate all potentially cached frame providers for all threads
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 1ed0c3942..be0d3dfcb 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -4402,7 +4402,8 @@ protected:
// in the debug info files in case the platform supports that.
Status error;
llvm::SmallVector<std::string> warned_script_paths;
- module_sp->LoadScriptingResourceInTarget(target, error, warned_script_paths);
+ module_sp->LoadScriptingResourceInTarget(target, error,
+ warned_script_paths);
if (error.Fail() && error.AsCString())
result.AppendWarningWithFormat(
"unable to load scripting data for module %s - error "
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index 6159060c3..b6527a354 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -1351,7 +1351,8 @@ bool ModuleList::LoadScriptingResourcesInTarget(Target *target,
for (auto module : tmp_module_list.ModulesNoLocking()) {
if (module) {
Status error;
- if (!module->LoadScriptingResourceInTarget(target, error, warned_script_paths)) {
+ if (!module->LoadScriptingResourceInTarget(target, error,
+ warned_script_paths)) {
if (error.Fail() && error.AsCString()) {
error = Status::FromErrorStringWithFormat(
"unable to load scripting data for "
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index faa966a61..23ce56663 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -1544,11 +1544,12 @@ Module *Target::GetExecutableModulePointer() {
return GetExecutableModule().get();
}
-static void LoadScriptingResourceForModule(const ModuleSP &module_sp,
- Target *target,
- llvm::SmallVector<std::string> &warned) {
+static void
+LoadScriptingResourceForModule(const ModuleSP &module_sp, Target *target,
+ llvm::SmallVector<std::string> &warned) {
Status error;
- if (module_sp && !module_sp->LoadScriptingResourceInTarget(target, error, warned)) {
+ if (module_sp &&
+ !module_sp->LoadScriptingResourceInTarget(target, error, warned)) {
if (error.AsCString())
target->GetDebugger().GetAsyncErrorStream()->Printf(
"unable to load scripting data for module %s - error reported was "
@@ -5394,7 +5395,8 @@ void Target::NotifyBreakpointChanged(
BroadcastEvent(Target::eBroadcastBitBreakpointChanged, breakpoint_data_sp);
}
-void Target::ReportScriptLoading(const llvm::SmallVector<std::string> &warned_script_paths) {
+void Target::ReportScriptLoading(
+ const llvm::SmallVector<std::string> &warned_script_paths) {
if (warned_script_paths.empty())
return;
``````````
</details>
https://github.com/llvm/llvm-project/pull/189943
More information about the lldb-commits
mailing list