Skip to content

Commit a167f7a

Browse files
committed
Readd the getExceptionStream API, so that we can modify LLDB consumers of it in a different patch
1 parent c4d703e commit a167f7a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

llvm/include/llvm/Object/Minidump.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,17 @@ class MinidumpFile : public Binary {
9595
return getStreamFromDirectory<minidump::ExceptionStream>(Directory);
9696
}
9797

98+
/// Returns the first exception stream in the file. An error is returned if
99+
/// the associated stream is smaller than the size of the ExceptionStream
100+
/// structure. Or the directory supplied is not of kind exception stream.
101+
Expected<const minidump::ExceptionStream &>
102+
getExceptionStream() const {
103+
auto it = getExceptionStreams();
104+
if (it.begin() == it.end())
105+
return createError("No exception streams");
106+
return *it.begin();
107+
}
108+
98109
/// Returns the list of descriptors embedded in the MemoryList stream. The
99110
/// descriptors provide the content of interesting regions of memory at the
100111
/// time the minidump was taken. An error is returned if the file does not

0 commit comments

Comments
 (0)