File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -120,11 +120,11 @@ class LLDB_API SBSaveCoreOptions {
120
120
SBThreadCollection GetThreadsToSave () const ;
121
121
122
122
// / Get the current total number of bytes the core is expected to be but not
123
- // / including the overhead of the core file format. Requires a Process and
123
+ // / including the overhead of the core file format. Requires a Process and
124
124
// / Style to be specified.
125
- // /
125
+ // /
126
126
// / \note
127
- // / This can cause some modification of the underlying data store
127
+ // / This can cause some modification of the underlying data store
128
128
// / as regions with no permissions, or invalid permissions will be removed
129
129
// / and stacks will be minified up to their stack pointer + the redzone.
130
130
// /
Original file line number Diff line number Diff line change @@ -151,13 +151,17 @@ uint64_t SaveCoreOptions::GetCurrentSizeInBytes(Status &error) {
151
151
return 0 ;
152
152
}
153
153
154
+ error = EnsureValidConfiguration (m_process_sp);
155
+ if (error.Fail ())
156
+ return 0 ;
157
+
154
158
CoreFileMemoryRanges ranges;
155
159
error = m_process_sp->CalculateCoreFileSaveRanges (*this , ranges);
156
160
if (error.Fail ())
157
161
return 0 ;
158
162
159
163
uint64_t total_in_bytes = 0 ;
160
- for (auto & core_range : ranges)
164
+ for (auto & core_range : ranges)
161
165
total_in_bytes += core_range.data .range .size ();
162
166
163
167
return total_in_bytes;
You can’t perform that action at this time.
0 commit comments