Skip to content

Commit a823853

Browse files
committed
Add a new docstring
1 parent ef3cf72 commit a823853

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

lldb/bindings/interface/SBSaveCoreOptionsDocstrings.i

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ Note that currently ELF Core files are not supported."
6363
Get an SBThreadCollection of all threads marked to be saved. This collection is not sorted according to insertion order."
6464
) lldb::SBSaveCoreOptions::GetThreadsToSave;
6565

66+
%feature("docstring", "
67+
Get the current total number of bytes the core is expectd to have, excluding the overhead of the core file format.
68+
Requires both a Process and a Style to be specified."
69+
) lldb::SBSaveCoreOptions::GetCurrentSizeInBytes;
70+
6671
%feature("docstring", "
6772
Unset all options."
6873
) lldb::SBSaveCoreOptions::Clear;

lldb/source/API/SBSaveCoreOptions.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,16 @@ void SBSaveCoreOptions::Clear() {
116116

117117
uint64_t SBSaveCoreOptions::GetCurrentSizeInBytes(SBError &error) {
118118
LLDB_INSTRUMENT_VA(this, error);
119-
llvm::Expected<uint64_t> expected_bytes = m_opaque_up->GetCurrentSizeInBytes();
119+
llvm::Expected<uint64_t> expected_bytes =
120+
m_opaque_up->GetCurrentSizeInBytes();
120121
if (!expected_bytes) {
121-
error = SBError(lldb_private::Status::FromError(expected_bytes.takeError()));
122+
error =
123+
SBError(lldb_private::Status::FromError(expected_bytes.takeError()));
122124
return 0;
123125
}
124126
// Clear the error, so if the clearer uses it we set it to success.
125127
error.Clear();
126-
return *expected_bytes;
128+
return *expected_bytes;
127129
}
128130

129131
lldb_private::SaveCoreOptions &SBSaveCoreOptions::ref() const {

lldb/source/Symbol/SaveCoreOptions.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ llvm::Expected<uint64_t> SaveCoreOptions::GetCurrentSizeInBytes() {
150150
if (!m_process_sp)
151151
return Status::FromErrorString("Requires a process to be set.").takeError();
152152

153-
154153
error = EnsureValidConfiguration(m_process_sp);
155154
if (error.Fail())
156155
return error.takeError();

0 commit comments

Comments
 (0)