diff options
author | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-09-19 12:55:16 +0000 |
---|---|---|
committer | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-09-19 12:55:16 +0000 |
commit | 0e91d185cac51ed1b2c9163afca998660ebda08e (patch) | |
tree | a154d70d8918dd48c9ec161c94fff037d05ea113 /src/client/linux/minidump_writer/minidump_writer_unittest.cc | |
parent | Allow generating minidumps from live process on Linux via ExceptionHandler (diff) | |
download | breakpad-0e91d185cac51ed1b2c9163afca998660ebda08e.tar.xz |
Minidumps never contain MD_LINUX_DSO_DEBUG info when breakpad is in a shared library
A=Mike Hommey <mh@glandium.org>
R=ted at http://breakpad.appspot.com/422002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1044 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/minidump_writer/minidump_writer_unittest.cc')
-rw-r--r-- | src/client/linux/minidump_writer/minidump_writer_unittest.cc | 18 |
1 files changed, 17 insertions, 1 deletions
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 <sys/types.h> #include <ucontext.h> #include <unistd.h> +#include <ucontext.h> #include <string> @@ -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]); } |