Skip to content

Commit cc60709

Browse files
JlalondAlexisPerry
authored andcommitted
[LLDB][Minidump] Change expected directories to the correct type; size_t (llvm#96564)
In llvm#95312 I incorrectly set `m_expected_directories` to uint, this broke the windows build and is the incorrect type. `size_t` is more accurate because this value only ever represents the expected upper bound of the directory vector.
1 parent c7c118e commit cc60709

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Status MinidumpFileBuilder::AddDirectory(StreamType type,
109109
if (m_directories.size() + 1 > m_expected_directories) {
110110
error.SetErrorStringWithFormat(
111111
"Unable to add directory for stream type %x, exceeded expected number "
112-
"of directories %d.",
112+
"of directories %zu.",
113113
(uint32_t)type, m_expected_directories);
114114
return error;
115115
}

lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class MinidumpFileBuilder {
146146
lldb_private::DataBufferHeap m_data;
147147
lldb::ProcessSP m_process_sp;
148148

149-
uint m_expected_directories = 0;
149+
size_t m_expected_directories = 0;
150150
uint64_t m_saved_data_size = 0;
151151
lldb::offset_t m_thread_list_start = 0;
152152
// We set the max write amount to 128 mb, this is arbitrary

0 commit comments

Comments
 (0)