Add a way for the client apps to specify custom information in case of out-of-process

scenarios that the OOP server can use in whatever way it wants to.

Fix a bug in CrashGenerationserver where CreateNamedPipe failure was not checked correctly.

TODO in near future: Add a custom stream to minidump files for the custom information.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@267 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
doshimun
2008-05-05 20:03:56 +00:00
parent 47df365bf8
commit 0ded3d718f
10 changed files with 187 additions and 25 deletions

View File

@@ -32,7 +32,9 @@
#include <Windows.h>
#include <DbgHelp.h>
#include "client/windows/common/ipc_protocol.h"
#include "google_breakpad/common/minidump_format.h"
#include "processor/scoped_ptr.h"
namespace google_breakpad {
@@ -49,7 +51,8 @@ class ClientInfo {
MINIDUMP_TYPE dump_type,
DWORD* thread_id,
EXCEPTION_POINTERS** ex_info,
MDRawAssertionInfo* assert_info);
MDRawAssertionInfo* assert_info,
const CustomClientInfo& custom_client_info);
~ClientInfo();
@@ -85,6 +88,10 @@ class ClientInfo {
bool Initialize();
bool GetClientExceptionInfo(EXCEPTION_POINTERS** ex_info) const;
bool GetClientThreadId(DWORD* thread_id) const;
// Reads the custom information from the client process address space.
bool PopulateCustomInfo();
// Returns the client custom information.
int GetCustomInfo(CustomInfoEntry const** custom_info) const;
private:
// Crash generation server.
@@ -113,6 +120,14 @@ class ClientInfo {
// in the address space of another process.
MDRawAssertionInfo* assert_info_;
// Custom information about the client.
CustomClientInfo custom_client_info_;
// Contains the custom client info entries read from the client process
// memory. This will be populated only if the method GetClientCustomInfo
// is called.
scoped_array<CustomInfoEntry> custom_info_entries_;
// Address of a variable in the client process address space that
// will contain the thread id of the crashing client thread.
//