[Lldb-commits] [lldb] [LLDB][SBSaveCoreOptions] Add new API to expose the expected core size in bytes (PR #138169)

Jacob Lalonde via lldb-commits lldb-commits at lists.llvm.org
Thu May 1 10:17:47 PDT 2025


================
@@ -119,6 +119,19 @@ class LLDB_API SBSaveCoreOptions {
   ///   an empty collection will be returned.
   SBThreadCollection GetThreadsToSave() const;
 
+  /// Get the current total number of bytes the core is expected to be but not
+  /// including the overhead of the core file format. Requires a Process and
+  /// Style to be specified.
+  ///
+  /// \note
+  ///   This can cause some modification of the underlying data store
+  ///   as regions with no permissions, or invalid permissions will be removed
+  ///   and stacks will be minified up to their stack pointer + the redzone.
+  ///
+  /// \returns
+  ///   The expected size of the data contained in the core in bytes.
+  uint64_t GetCurrentSizeInBytes(SBError &error);
----------------
Jlalond wrote:

@bulbazord Alex per usual I would appreciate your expert opinion on the new API phrasing and comments.

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


More information about the lldb-commits mailing list