Skip to content

Commit

Permalink
[LLDB][Minidump] Change expected directories to the correct type; siz…
Browse files Browse the repository at this point in the history
…e_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.
  • Loading branch information
Jlalond authored Jun 24, 2024
1 parent dc27ff1 commit 361543e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Status MinidumpFileBuilder::AddDirectory(StreamType type,
if (m_directories.size() + 1 > m_expected_directories) {
error.SetErrorStringWithFormat(
"Unable to add directory for stream type %x, exceeded expected number "
"of directories %d.",
"of directories %zu.",
(uint32_t)type, m_expected_directories);
return error;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class MinidumpFileBuilder {
lldb_private::DataBufferHeap m_data;
lldb::ProcessSP m_process_sp;

uint m_expected_directories = 0;
size_t m_expected_directories = 0;
uint64_t m_saved_data_size = 0;
lldb::offset_t m_thread_list_start = 0;
// We set the max write amount to 128 mb, this is arbitrary
Expand Down

0 comments on commit 361543e

Please sign in to comment.