[Lldb-commits] [lldb] [LLDB][Minidump] Add a progress bar to minidump (PR #108309)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 11 17:02:35 PDT 2024
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 96b7c64b8a874584a9dad44bb8901904c14701c0 e7054832dc6e54d4b9f3ce86a8babd1f62cac81a --extensions h,cpp -- lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
index 1765cc2472..a2100ea626 100644
--- a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
+++ b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
@@ -840,14 +840,14 @@ Status MinidumpFileBuilder::AddMemoryList() {
if (error.Fail())
return error;
- lldb_private::Progress progress_tracker("Saving Minidump File", "", all_core_memory_ranges.GetSize());
+ lldb_private::Progress progress_tracker("Saving Minidump File", "",
+ all_core_memory_ranges.GetSize());
std::vector<CoreFileMemoryRange> all_core_memory_vec;
// Extract all the data into just a vector of data. So we can mutate this in
// place.
for (const auto &core_range : all_core_memory_ranges)
all_core_memory_vec.push_back(core_range.data);
-
// Start by saving all of the stacks and ensuring they fit under the 32b
// limit.
uint64_t total_size = GetCurrentDataEndOffset();
@@ -974,8 +974,9 @@ GetLargestRangeSize(const std::vector<CoreFileMemoryRange> &ranges) {
return max_size;
}
-Status MinidumpFileBuilder::AddMemoryList_32(
- std::vector<CoreFileMemoryRange> &ranges, Progress &progressTracker) {
+Status
+MinidumpFileBuilder::AddMemoryList_32(std::vector<CoreFileMemoryRange> &ranges,
+ Progress &progressTracker) {
std::vector<MemoryDescriptor> descriptors;
Status error;
if (ranges.size() == 0)
@@ -1053,8 +1054,9 @@ Status MinidumpFileBuilder::AddMemoryList_32(
return error;
}
-Status MinidumpFileBuilder::AddMemoryList_64(
- std::vector<CoreFileMemoryRange> &ranges, Progress &progressTracker) {
+Status
+MinidumpFileBuilder::AddMemoryList_64(std::vector<CoreFileMemoryRange> &ranges,
+ Progress &progressTracker) {
Status error;
if (ranges.empty())
return error;
diff --git a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h
index 77c5dba6cd..93ae966347 100644
--- a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h
+++ b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h
@@ -23,6 +23,7 @@
#include <utility>
#include <variant>
+#include "lldb/Core/Progress.h"
#include "lldb/Symbol/SaveCoreOptions.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
@@ -30,7 +31,6 @@
#include "lldb/Utility/Status.h"
#include "lldb/lldb-forward.h"
#include "lldb/lldb-types.h"
-#include "lldb/Core/Progress.h"
#include "llvm/BinaryFormat/Minidump.h"
#include "llvm/Object/Minidump.h"
@@ -122,9 +122,11 @@ private:
lldb_private::Status AddData(const void *data, uint64_t size);
// Add MemoryList stream, containing dumps of important memory segments
lldb_private::Status
- AddMemoryList_64(std::vector<lldb_private::CoreFileMemoryRange> &ranges, lldb_private::Progress &progressTracker);
+ AddMemoryList_64(std::vector<lldb_private::CoreFileMemoryRange> &ranges,
+ lldb_private::Progress &progressTracker);
lldb_private::Status
- AddMemoryList_32(std::vector<lldb_private::CoreFileMemoryRange> &ranges, lldb_private::Progress &progressTracker);
+ AddMemoryList_32(std::vector<lldb_private::CoreFileMemoryRange> &ranges,
+ lldb_private::Progress &progressTracker);
// Update the thread list on disk with the newly emitted stack RVAs.
lldb_private::Status FixThreadStacks();
lldb_private::Status FlushBufferToDisk();
``````````
</details>
https://github.com/llvm/llvm-project/pull/108309
More information about the lldb-commits
mailing list