From 0e91d185cac51ed1b2c9163afca998660ebda08e Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Wed, 19 Sep 2012 12:55:16 +0000 Subject: Minidumps never contain MD_LINUX_DSO_DEBUG info when breakpad is in a shared library A=Mike Hommey R=ted at http://breakpad.appspot.com/422002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1044 4c0a9323-5329-0410-9bdc-e9ce6186880e --- .../linux/minidump_writer/minidump_writer_unittest.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/client/linux/minidump_writer/minidump_writer_unittest.cc') diff --git a/src/client/linux/minidump_writer/minidump_writer_unittest.cc b/src/client/linux/minidump_writer/minidump_writer_unittest.cc index 0a6b07d1..e0d0fa9c 100644 --- a/src/client/linux/minidump_writer/minidump_writer_unittest.cc +++ b/src/client/linux/minidump_writer/minidump_writer_unittest.cc @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -172,7 +173,8 @@ TEST(MinidumpWriterTest, MappingInfo) { ExceptionHandler::CrashContext context; memset(&context, 0, sizeof(context)); - context.tid = 1; + ASSERT_EQ(0, getcontext(&context.context)); + context.tid = child; AutoTempDir temp_dir; string templ = temp_dir.path() + "/minidump-writer-unittest"; @@ -210,6 +212,20 @@ TEST(MinidumpWriterTest, MappingInfo) { EXPECT_EQ(kMemoryName, module->code_file()); EXPECT_EQ(module_identifier, module->debug_identifier()); + u_int32_t len; + // These streams are expected to be there + EXPECT_TRUE(minidump.SeekToStreamType(MD_THREAD_LIST_STREAM, &len)); + EXPECT_TRUE(minidump.SeekToStreamType(MD_MEMORY_LIST_STREAM, &len)); + EXPECT_TRUE(minidump.SeekToStreamType(MD_EXCEPTION_STREAM, &len)); + EXPECT_TRUE(minidump.SeekToStreamType(MD_SYSTEM_INFO_STREAM, &len)); + EXPECT_TRUE(minidump.SeekToStreamType(MD_LINUX_CPU_INFO, &len)); + EXPECT_TRUE(minidump.SeekToStreamType(MD_LINUX_PROC_STATUS, &len)); + EXPECT_TRUE(minidump.SeekToStreamType(MD_LINUX_CMD_LINE, &len)); + EXPECT_TRUE(minidump.SeekToStreamType(MD_LINUX_ENVIRON, &len)); + EXPECT_TRUE(minidump.SeekToStreamType(MD_LINUX_AUXV, &len)); + EXPECT_TRUE(minidump.SeekToStreamType(MD_LINUX_MAPS, &len)); + EXPECT_TRUE(minidump.SeekToStreamType(MD_LINUX_DSO_DEBUG, &len)); + close(fds[1]); } -- cgit v1.2.1