On ubuntu:
I have to install autoconf package.
sudo apt-get install autoconf
Get a copy of source code
svn checkout http://google-breakpad.googlecode.com/svn/trunk/ google-breakpad-read-only
then the build steps are same as building other projects
./configure
make
sudo make install
The nice feature of breakpad is that, the client can work with or without out of process server, so I don't need to worry in case the server is not running.
const MINIDUMP_TYPE dumptype = (MINIDUMP_TYPE) (MiniDumpWithFullMemory
| MiniDumpWithHandleData | MiniDumpWithUnloadedModules | MiniDumpWithProcessThreadData);
ExceptionHandler* handler = new ExceptionHandler( dump_file_folder,
myFilterCallback,
myMinidumpCallback,
NULL/*void* callback_context*/,
ExceptionHandler::HANDLER_ALL,
dumptype/*MiniDumpNormal MINIDUMP_TYPE dump_type*/,
kPipeName/*const wchar_t* pipe_name*/,
NULL/*const CustomClientInfo* custom_info*/);
On Windows:
D:/src/breakpad>set path=%path%;c:/Python27
D:/src/breakpad>src/tools/gyp/gyp.bat src/client/windows/breakpad_client.gyp
then open D:/src/breakpad/src/client/windows/breakpad_client.sln
add the following preprocessor to VC++ projects (gtest, gmock and client_tests) when building with VC++ 2010
GTEST_USE_OWN_TR1_TUPLE=0
refer to http://code.google.com/p/googletest/issues/detail?id=217#makechanges
Change C/C++ "Output Files" "Program Database File Name" to
$(OutDir)lib/$(TargetName).pdb (old value: $(IntDir)$(ProjectName)/vc80.pdb)