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:
mmentovai 2007-02-14 19:51:05 +00:00
parent 83befb1cb4
commit e5dc60822e
118 changed files with 37042 additions and 24117 deletions

View file

@ -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

View file

@ -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__

View file

@ -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) {

View file

@ -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

View file

@ -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__

View file

@ -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;

View file

@ -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 */

View file

@ -38,7 +38,7 @@
#include "client/minidump_file_writer.h"
namespace google_airbag {
namespace google_breakpad {
template<typename MDType>
inline bool TypedMDRVA<MDType>::Allocate() {
@ -86,6 +86,6 @@ inline bool TypedMDRVA<MDType>::Flush() {
return writer_->Copy(position_, &data_, sizeof(MDType));
}
} // namespace google_airbag
} // namespace google_breakpad
#endif // CLIENT_MINIDUMP_FILE_WRITER_INL_H__

View file

@ -40,7 +40,7 @@
#include "client/minidump_file_writer-inl.h"
#include "common/string_conversion.h"
namespace google_airbag {
namespace google_breakpad {
const MDRVA MinidumpFileWriter::kInvalidMDRVA = static_cast<MDRVA>(-1);
@ -248,4 +248,4 @@ bool UntypedMDRVA::Copy(MDRVA position, const void *src, size_t size) {
return writer_->Copy(position, src, size);
}
} // namespace google_airbag
} // namespace google_breakpad

View file

@ -28,7 +28,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// minidump_file_writer.h: Implements file-based minidump generation. It's
// intended to be used with the Google Airbag open source crash handling
// intended to be used with the Google Breakpad open source crash handling
// project.
#ifndef CLIENT_MINIDUMP_FILE_WRITER_H__
@ -36,9 +36,9 @@
#include <string>
#include "google_airbag/common/minidump_format.h"
#include "google_breakpad/common/minidump_format.h"
namespace google_airbag {
namespace google_breakpad {
class UntypedMDRVA;
template<typename MDType> class TypedMDRVA;
@ -245,6 +245,6 @@ class TypedMDRVA : public UntypedMDRVA {
AllocationState allocation_state_;
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // CLIENT_MINIDUMP_FILE_WRITER_H__

View file

@ -1,5 +1,5 @@
// Copyright (c) 2006, Google Inc. All rights reserved.
// Author: waylonis@google.com (Dan Waylonis)
// Copyright (c) 2006, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@ -27,6 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Author: waylonis@google.com (Dan Waylonis)
/*
g++ -I../ ../common/convert_UTF.c \
../common/string_conversion.cc \
@ -40,7 +42,7 @@
#include "minidump_file_writer-inl.h"
using google_airbag::MinidumpFileWriter;
using google_breakpad::MinidumpFileWriter;
#define ASSERT_TRUE(cond) \
if (!(cond)) { \
@ -72,7 +74,7 @@ static bool WriteFile(const char *path) {
MinidumpFileWriter writer;
if (writer.Open(path)) {
// Test a single structure
google_airbag::TypedMDRVA<StringStructure> strings(&writer);
google_breakpad::TypedMDRVA<StringStructure> strings(&writer);
ASSERT_TRUE(strings.Allocate());
strings.get()->integer_value = 0xBEEF;
const char *first = "First String";
@ -81,7 +83,7 @@ static bool WriteFile(const char *path) {
ASSERT_TRUE(writer.WriteString(second, 0, &strings.get()->second_string));
// Test an array structure
google_airbag::TypedMDRVA<ArrayStructure> array(&writer);
google_breakpad::TypedMDRVA<ArrayStructure> array(&writer);
unsigned int count = 10;
ASSERT_TRUE(array.AllocateArray(count));
for (unsigned int i = 0; i < count; ++i) {
@ -93,7 +95,7 @@ static bool WriteFile(const char *path) {
}
// Test an object followed by an array
google_airbag::TypedMDRVA<ObjectAndArrayStructure> obj_array(&writer);
google_breakpad::TypedMDRVA<ObjectAndArrayStructure> obj_array(&writer);
ASSERT_TRUE(obj_array.AllocateObjectAndArray(count,
sizeof(ArrayStructure)));
obj_array.get()->count = count;

View file

@ -37,7 +37,7 @@
#include "client/windows/handler/exception_handler.h"
#include "common/windows/guid_string.h"
namespace google_airbag {
namespace google_breakpad {
static const int kExceptionHandlerThreadInitialStackSize = 64 * 1024;
@ -144,7 +144,7 @@ ExceptionHandler::~ExceptionHandler() {
} else {
// TODO(mmentovai): use advapi32!ReportEvent to log the warning to the
// system's application event log.
fprintf(stderr, "warning: removing Airbag handler out of order\n");
fprintf(stderr, "warning: removing Breakpad handler out of order\n");
for (vector<ExceptionHandler *>::iterator iterator =
handler_stack_->begin();
iterator != handler_stack_->end();
@ -202,7 +202,7 @@ DWORD ExceptionHandler::ExceptionHandlerThreadMain(void *lpParameter) {
class AutoExceptionHandler {
public:
AutoExceptionHandler() {
// Increment handler_stack_index_ so that if another Airbag handler is
// Increment handler_stack_index_ so that if another Breakpad handler is
// registered using this same HandleException function, and it needs to be
// called while this handler is running (either becaause this handler
// declines to handle the exception, or an exception occurs during
@ -415,23 +415,23 @@ bool ExceptionHandler::WriteMinidumpWithException(
except_info.ExceptionPointers = exinfo;
except_info.ClientPointers = FALSE;
// Add an MDRawAirbagInfo stream to the minidump, to provide additional
// information about the exception handler to the Airbag processor. The
// Add an MDRawBreakpadInfo stream to the minidump, to provide additional
// information about the exception handler to the Breakpad processor. The
// information will help the processor determine which threads are
// relevant. The Airbag processor does not require this information but
// can function better with Airbag-generated dumps when it is present.
// relevant. The Breakpad processor does not require this information but
// can function better with Breakpad-generated dumps when it is present.
// The native debugger is not harmed by the presence of this information.
MDRawAirbagInfo airbag_info;
airbag_info.validity = MD_AIRBAG_INFO_VALID_DUMP_THREAD_ID |
MD_AIRBAG_INFO_VALID_REQUESTING_THREAD_ID;
airbag_info.dump_thread_id = GetCurrentThreadId();
airbag_info.requesting_thread_id = requesting_thread_id;
MDRawBreakpadInfo breakpad_info;
breakpad_info.validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID |
MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID;
breakpad_info.dump_thread_id = GetCurrentThreadId();
breakpad_info.requesting_thread_id = requesting_thread_id;
// Leave room in user_stream_array for a possible assertion info stream.
MINIDUMP_USER_STREAM user_stream_array[2];
user_stream_array[0].Type = MD_AIRBAG_INFO_STREAM;
user_stream_array[0].BufferSize = sizeof(airbag_info);
user_stream_array[0].Buffer = &airbag_info;
user_stream_array[0].Type = MD_BREAKPAD_INFO_STREAM;
user_stream_array[0].BufferSize = sizeof(breakpad_info);
user_stream_array[0].Buffer = &breakpad_info;
MINIDUMP_USER_STREAM_INFORMATION user_streams;
user_streams.UserStreamCount = 1;
@ -479,4 +479,4 @@ void ExceptionHandler::UpdateNextID() {
next_minidump_path_c_ = next_minidump_path_.c_str();
}
} // namespace google_airbag
} // namespace google_breakpad

View file

@ -70,24 +70,24 @@
#include <string>
#include <vector>
#include "google_airbag/common/minidump_format.h"
#include "google_breakpad/common/minidump_format.h"
namespace google_airbag {
namespace google_breakpad {
using std::vector;
using std::wstring;
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. exinfo points to the
// exception record, if any; assertion points to assertion information,
// if any.
//
// 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, EXCEPTION_POINTERS *exinfo,
@ -102,11 +102,11 @@ class ExceptionHandler {
// assertion points to information about an assertion if the handler was
// invoked by an assertion.
//
// If an exception occurred and the callback returns true, Airbag will treat
// If an exception occurred and the callback returns true, Breakpad will treat
// the exception as fully-handled, suppressing any other handlers from being
// notified of the exception. If the callback returns false, Airbag will
// notified of the exception. If the callback returns false, Breakpad will
// treat the exception as unhandled, and allow another handler to handle it.
// If there are no other handlers, Airbag will report the exception to the
// If there are no other handlers, Breakpad will report the exception to the
// system as unhandled, allowing a debugger or native crash dialog the
// opportunity to handle the exception. Most callback implementations
// should normally return the value of |succeeded|, or when they wish to
@ -121,7 +121,7 @@ class ExceptionHandler {
// Creates a new ExceptionHandler instance to handle writing minidumps.
// Before writing a minidump, the optional filter callback will be called.
// Its return value determines whether or not Airbag should write a minidump.
// Its return value determines whether or not Breakpad should write a minidump.
// Minidump files will be written to dump_path, and the optional callback
// is called after writing the dump file, as described above.
// If install_handler is true, then a minidump will be written whenever
@ -298,7 +298,7 @@ class ExceptionHandler {
// The index of the ExceptionHandler in handler_stack_ that will handle the
// next exception. Note that 0 means the last entry in handler_stack_, 1
// means the next-to-last entry, and so on. This is used by HandleException
// to support multiple stacked Airbag handlers.
// to support multiple stacked Breakpad handlers.
static LONG handler_stack_index_;
// handler_stack_critical_section_ guards operations on handler_stack_ and
@ -313,7 +313,7 @@ class ExceptionHandler {
void operator=(const ExceptionHandler &);
};
} // namespace google_airbag
} // namespace google_breakpad
#pragma warning( pop )

View file

@ -295,7 +295,7 @@
>
</File>
<File
RelativePath="..\..\..\google_airbag\common\minidump_format.h"
RelativePath="..\..\..\google_breakpad\common\minidump_format.h"
>
</File>
<File

View file

@ -33,7 +33,7 @@
#include "client/windows/sender/crash_report_sender.h"
#include "common/windows/http_upload.h"
namespace google_airbag {
namespace google_breakpad {
// static
ReportResult CrashReportSender::SendCrashReport(
@ -55,4 +55,4 @@ ReportResult CrashReportSender::SendCrashReport(
}
}
} // namespace google_airbag
} // namespace google_breakpad

View file

@ -45,7 +45,7 @@
#include <map>
#include <string>
namespace google_airbag {
namespace google_breakpad {
using std::wstring;
using std::map;
@ -83,7 +83,7 @@ class CrashReportSender {
~CrashReportSender();
};
} // namespace google_airbag
} // namespace google_breakpad
#pragma warning( pop )