[Lldb-commits] [PATCH] D24385: MinidumpParsing: pid, modules, exceptions
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 13 03:41:38 PDT 2016
labath added a comment.
Just a couple of tiny comments from me.
================
Comment at: source/Plugins/Process/minidump/MinidumpParser.cpp:86
@@ +85,3 @@
+llvm::Optional<std::string> MinidumpParser::GetMinidumpString(uint32_t rva) {
+ auto arr_ref = m_data_sp->GetData().drop_front(rva);
+ return parseMinidumpString(arr_ref);
----------------
What should the function do if we call it with an out-of-bounds index? Right now it will crash in drop_front()...
================
Comment at: unittests/Process/minidump/MinidumpParserTest.cpp:76
@@ -76,3 +75,3 @@
thread_list = parser->GetThreads();
- ASSERT_FALSE(thread_list.hasValue());
+ ASSERT_TRUE(thread_list.size() == 0);
}
----------------
ASSERT_EQ(0, thread_list.size())
================
Comment at: unittests/Process/minidump/MinidumpParserTest.cpp:136
@@ +135,3 @@
+ parser->GetExceptionStream();
+ ASSERT_TRUE(exception_stream != nullptr);
+ ASSERT_EQ(11UL, exception_stream->exception_record.exception_code);
----------------
ASSERT_NE
https://reviews.llvm.org/D24385
More information about the lldb-commits
mailing list