gecko-dev/toolkit/crashreporter/test/dumputils.cpp
Ted Mielczarek b6eeed94e0 bug 620974 - Add Breakpad processor code to binary test component to allow testing minidump contents. r=bsmedberg a=testonly
--HG--
extra : rebase_source : ba728fe297e9ce066438719b839e07deb38b1dd5
2011-01-12 14:14:15 -05:00

20 lines
400 B
C++

#include "google_breakpad/processor/minidump.h"
#include "nscore.h"
using namespace google_breakpad;
extern "C"
NS_EXPORT bool
DumpHasStream(const char* dump_file, u_int32_t stream_type)
{
Minidump dump(dump_file);
if (!dump.Read())
return false;
u_int32_t length;
if (!dump.SeekToStreamType(stream_type, &length) || length == 0)
return false;
return true;
}