mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-26 17:25:04 +01:00
Rename Airbag to Breakpad.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@122 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
83befb1cb4
commit
e5dc60822e
118 changed files with 37042 additions and 24117 deletions
|
|
@ -33,7 +33,7 @@
|
|||
#include "client/mac/handler/exception_handler.h"
|
||||
#include "client/mac/handler/minidump_generator.h"
|
||||
|
||||
namespace google_airbag {
|
||||
namespace google_breakpad {
|
||||
|
||||
using std::map;
|
||||
|
||||
|
|
@ -512,4 +512,4 @@ void ExceptionHandler::UpdateNextID() {
|
|||
next_minidump_id_c_ = next_minidump_id_.c_str();
|
||||
}
|
||||
|
||||
} // namespace google_airbag
|
||||
} // namespace google_breakpad
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
namespace google_airbag {
|
||||
namespace google_breakpad {
|
||||
|
||||
using std::string;
|
||||
|
||||
|
|
@ -48,13 +48,13 @@ struct ExceptionParameters;
|
|||
|
||||
class ExceptionHandler {
|
||||
public:
|
||||
// A callback function to run before Airbag performs any substantial
|
||||
// A callback function to run before Breakpad performs any substantial
|
||||
// processing of an exception. A FilterCallback is called before writing
|
||||
// a minidump. context is the parameter supplied by the user as
|
||||
// callback_context when the handler was created.
|
||||
//
|
||||
// If a FilterCallback returns true, Airbag will continue processing,
|
||||
// attempting to write a minidump. If a FilterCallback returns false, Airbag
|
||||
// If a FilterCallback returns true, Breakpad will continue processing,
|
||||
// attempting to write a minidump. If a FilterCallback returns false, Breakpad
|
||||
// will immediately report the exception as unhandled without writing a
|
||||
// minidump, allowing another handler the opportunity to handle it.
|
||||
typedef bool (*FilterCallback)(void *context);
|
||||
|
|
@ -64,7 +64,7 @@ class ExceptionHandler {
|
|||
// file is <dump_dir>/<minidump_id>.dmp.
|
||||
// |context| is the value passed into the constructor.
|
||||
// |succeeded| indicates whether a minidump file was successfully written.
|
||||
// Return true if the exception was fully handled and airbag should exit.
|
||||
// Return true if the exception was fully handled and breakpad should exit.
|
||||
// Return false to allow any other exception handlers to process the
|
||||
// exception.
|
||||
typedef bool (*MinidumpCallback)(const char *dump_dir,
|
||||
|
|
@ -183,6 +183,6 @@ class ExceptionHandler {
|
|||
bool use_minidump_write_mutex_;
|
||||
};
|
||||
|
||||
} // namespace google_airbag
|
||||
} // namespace google_breakpad
|
||||
|
||||
#endif // CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
//
|
||||
// Copyright (c) 2006, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
|
|
@ -39,6 +38,7 @@ g++ -framework CoreFoundation -I../../.. \
|
|||
exception_handler_test.cc \
|
||||
-o exception_handler_test
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
|
|
@ -49,7 +49,7 @@ g++ -framework CoreFoundation -I../../.. \
|
|||
#include "minidump_generator.h"
|
||||
|
||||
using std::string;
|
||||
using google_airbag::ExceptionHandler;
|
||||
using google_breakpad::ExceptionHandler;
|
||||
|
||||
static void *SleepyFunction(void *) {
|
||||
while (1) {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
using MacStringUtils::ConvertToString;
|
||||
using MacStringUtils::IntegerValueAtIndex;
|
||||
|
||||
namespace google_airbag {
|
||||
namespace google_breakpad {
|
||||
|
||||
MinidumpGenerator::MinidumpGenerator()
|
||||
: exception_type_(0),
|
||||
|
|
@ -136,7 +136,7 @@ bool MinidumpGenerator::Write(const char *path) {
|
|||
&MinidumpGenerator::WriteSystemInfoStream,
|
||||
&MinidumpGenerator::WriteModuleListStream,
|
||||
&MinidumpGenerator::WriteMiscInfoStream,
|
||||
&MinidumpGenerator::WriteAirbagInfoStream,
|
||||
&MinidumpGenerator::WriteBreakpadInfoStream,
|
||||
// Exception stream needs to be the last entry in this array as it may
|
||||
// be omitted in the case where the minidump is written without an
|
||||
// exception.
|
||||
|
|
@ -679,24 +679,24 @@ bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool MinidumpGenerator::WriteAirbagInfoStream(
|
||||
MDRawDirectory *airbag_info_stream) {
|
||||
TypedMDRVA<MDRawAirbagInfo> info(&writer_);
|
||||
bool MinidumpGenerator::WriteBreakpadInfoStream(
|
||||
MDRawDirectory *breakpad_info_stream) {
|
||||
TypedMDRVA<MDRawBreakpadInfo> info(&writer_);
|
||||
|
||||
if (!info.Allocate())
|
||||
return false;
|
||||
|
||||
airbag_info_stream->stream_type = MD_AIRBAG_INFO_STREAM;
|
||||
airbag_info_stream->location = info.location();
|
||||
MDRawAirbagInfo *info_ptr = info.get();
|
||||
breakpad_info_stream->stream_type = MD_BREAKPAD_INFO_STREAM;
|
||||
breakpad_info_stream->location = info.location();
|
||||
MDRawBreakpadInfo *info_ptr = info.get();
|
||||
|
||||
if (exception_thread_ && exception_type_) {
|
||||
info_ptr->validity = MD_AIRBAG_INFO_VALID_DUMP_THREAD_ID |
|
||||
MD_AIRBAG_INFO_VALID_REQUESTING_THREAD_ID;
|
||||
info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID |
|
||||
MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID;
|
||||
info_ptr->dump_thread_id = mach_thread_self();
|
||||
info_ptr->requesting_thread_id = exception_thread_;
|
||||
} else {
|
||||
info_ptr->validity = MD_AIRBAG_INFO_VALID_DUMP_THREAD_ID;
|
||||
info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID;
|
||||
info_ptr->dump_thread_id = mach_thread_self();
|
||||
info_ptr->requesting_thread_id = 0;
|
||||
}
|
||||
|
|
@ -704,4 +704,4 @@ bool MinidumpGenerator::WriteAirbagInfoStream(
|
|||
return true;
|
||||
}
|
||||
|
||||
} // namespace google_airbag
|
||||
} // namespace google_breakpad
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@
|
|||
#include <string>
|
||||
|
||||
#include "client/minidump_file_writer.h"
|
||||
#include "google_airbag/common/minidump_format.h"
|
||||
#include "google_breakpad/common/minidump_format.h"
|
||||
|
||||
namespace google_airbag {
|
||||
namespace google_breakpad {
|
||||
|
||||
using std::string;
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ class MinidumpGenerator {
|
|||
bool WriteSystemInfoStream(MDRawDirectory *system_info_stream);
|
||||
bool WriteModuleListStream(MDRawDirectory *module_list_stream);
|
||||
bool WriteMiscInfoStream(MDRawDirectory *misc_info_stream);
|
||||
bool WriteAirbagInfoStream(MDRawDirectory *airbag_info_stream);
|
||||
bool WriteBreakpadInfoStream(MDRawDirectory *breakpad_info_stream);
|
||||
|
||||
// Helpers
|
||||
u_int64_t CurrentPCForStack(thread_state_data_t state);
|
||||
|
|
@ -118,6 +118,6 @@ class MinidumpGenerator {
|
|||
static int os_build_number_;
|
||||
};
|
||||
|
||||
} // namespace google_airbag
|
||||
} // namespace google_breakpad
|
||||
|
||||
#endif // CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
//
|
||||
// Copyright (c) 2006, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
|
|
@ -39,7 +38,7 @@
|
|||
#include "minidump_file_writer.h"
|
||||
|
||||
using std::string;
|
||||
using google_airbag::MinidumpGenerator;
|
||||
using google_breakpad::MinidumpGenerator;
|
||||
|
||||
static bool doneWritingReport = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
08FB7794FE84155DC02AAC07 /* MinidumpWriter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BD82C040B0133420055103E /* Airbag */,
|
||||
9BD82C040B0133420055103E /* Breakpad */,
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
9B37CEEA0AF98EB600FA4BD4 /* Frameworks */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BD82C040B0133420055103E /* Airbag */ = {
|
||||
9BD82C040B0133420055103E /* Breakpad */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B35FF560B267D5F008DE8C7 /* convert_UTF.c */,
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
9BD82C2B0B01345E0055103E /* string_utilities.cc */,
|
||||
9BD82C2C0B01345E0055103E /* string_utilities.h */,
|
||||
);
|
||||
name = Airbag;
|
||||
name = Breakpad;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue