aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/crash_generation
diff options
context:
space:
mode:
authorcdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-05-03 18:15:11 +0000
committercdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-05-03 18:15:11 +0000
commitfa31053b42a3447e4154e08847a6fa9b781f6e7b (patch)
tree4e618330ac375728c74ffa73f0d8194c10e72f2d /src/client/windows/crash_generation
parentIn the AMD64 stackwalker, use heuristics to provide %rbp more often, as (diff)
downloadbreakpad-fa31053b42a3447e4154e08847a6fa9b781f6e7b.tar.xz
wires up the crash client side so that the deferred upload callback can be used.
TEST=N/A Review URL: https://breakpad.appspot.com/384001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@961 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/crash_generation')
-rw-r--r--src/client/windows/crash_generation/crash_generation_client.cc17
-rw-r--r--src/client/windows/crash_generation/crash_generation_client.h4
-rw-r--r--src/client/windows/crash_generation/crash_generation_server.cc3
3 files changed, 23 insertions, 1 deletions
diff --git a/src/client/windows/crash_generation/crash_generation_client.cc b/src/client/windows/crash_generation/crash_generation_client.cc
index 749223f1..20f7177a 100644
--- a/src/client/windows/crash_generation/crash_generation_client.cc
+++ b/src/client/windows/crash_generation/crash_generation_client.cc
@@ -167,6 +167,23 @@ bool CrashGenerationClient::Register() {
return success;
}
+bool CrashGenerationClient::RequestUpload(DWORD crash_id) {
+ HANDLE pipe = ConnectToServer();
+ if (!pipe) {
+ return false;
+ }
+
+ CustomClientInfo custom_info;
+ ProtocolMessage msg(MESSAGE_TAG_UPLOAD_REQUEST, crash_id,
+ static_cast<MINIDUMP_TYPE>(NULL), NULL, NULL, NULL,
+ custom_info, NULL, NULL, NULL);
+ DWORD bytes_count = 0;
+ bool success = WriteFile(pipe, &msg, sizeof(msg), &bytes_count, NULL);
+
+ CloseHandle(pipe);
+ return success;
+}
+
HANDLE CrashGenerationClient::ConnectToServer() {
HANDLE pipe = ConnectToPipe(pipe_name_.c_str(),
kPipeDesiredAccess,
diff --git a/src/client/windows/crash_generation/crash_generation_client.h b/src/client/windows/crash_generation/crash_generation_client.h
index 01d13dde..85a0456c 100644
--- a/src/client/windows/crash_generation/crash_generation_client.h
+++ b/src/client/windows/crash_generation/crash_generation_client.h
@@ -73,6 +73,10 @@ class CrashGenerationClient {
// Returns true if the registration is successful; false otherwise.
bool Register();
+ // Requests the crash server to upload a previous dump with the
+ // given crash id.
+ bool RequestUpload(DWORD crash_id);
+
bool RequestDump(EXCEPTION_POINTERS* ex_info,
MDRawAssertionInfo* assert_info);
diff --git a/src/client/windows/crash_generation/crash_generation_server.cc b/src/client/windows/crash_generation/crash_generation_server.cc
index d9769ae8..794742db 100644
--- a/src/client/windows/crash_generation/crash_generation_server.cc
+++ b/src/client/windows/crash_generation/crash_generation_server.cc
@@ -424,9 +424,10 @@ void CrashGenerationServer::HandleReadDoneState() {
if (msg_.tag == MESSAGE_TAG_UPLOAD_REQUEST) {
if (upload_request_callback_)
upload_request_callback_(upload_context_, msg_.id);
+ EnterStateImmediately(IPC_SERVER_STATE_DISCONNECTING);
return;
}
-
+
scoped_ptr<ClientInfo> client_info(
new ClientInfo(this,
msg_.id,