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

@@ -38,7 +38,7 @@
#include "processor/address_map.h"
namespace google_airbag {
namespace google_breakpad {
template<typename AddressType, typename EntryType>
bool AddressMap<AddressType, EntryType>::Store(const AddressType &address,
@@ -81,6 +81,6 @@ void AddressMap<AddressType, EntryType>::Clear() {
map_.clear();
}
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_ADDRESS_MAP_INL_H__

View File

@@ -40,7 +40,7 @@
#include <map>
namespace google_airbag {
namespace google_breakpad {
template<typename AddressType, typename EntryType>
class AddressMap {
@@ -74,7 +74,7 @@ class AddressMap {
AddressToEntryMap map_;
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_ADDRESS_MAP_H__

View File

@@ -49,8 +49,8 @@
namespace {
using google_airbag::AddressMap;
using google_airbag::linked_ptr;
using google_breakpad::AddressMap;
using google_breakpad::linked_ptr;
// A CountedObject holds an int. A global (not thread safe!) count of
// allocated CountedObjects is maintained to help test memory management.

View File

@@ -43,9 +43,9 @@
#include <string>
#include "google_airbag/processor/code_module.h"
#include "google_breakpad/processor/code_module.h"
namespace google_airbag {
namespace google_breakpad {
using std::string;
@@ -90,6 +90,6 @@ class BasicCodeModule : public CodeModule {
void operator=(const BasicCodeModule &that);
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_BASIC_CODE_MODULE_H__

View File

@@ -37,11 +37,11 @@
#include <cassert>
#include "processor/basic_code_modules.h"
#include "google_airbag/processor/code_module.h"
#include "google_breakpad/processor/code_module.h"
#include "processor/linked_ptr.h"
#include "processor/range_map-inl.h"
namespace google_airbag {
namespace google_breakpad {
BasicCodeModules::BasicCodeModules(const CodeModules *that)
: main_address_(0),
@@ -109,4 +109,4 @@ const CodeModules* BasicCodeModules::Copy() const {
return new BasicCodeModules(this);
}
} // namespace google_airbag
} // namespace google_breakpad

View File

@@ -41,9 +41,9 @@
#ifndef PROCESSOR_BASIC_CODE_MODULES_H__
#define PROCESSOR_BASIC_CODE_MODULES_H__
#include "google_airbag/processor/code_modules.h"
#include "google_breakpad/processor/code_modules.h"
namespace google_airbag {
namespace google_breakpad {
template<typename T> class linked_ptr;
template<typename AddressType, typename EntryType> class RangeMap;
@@ -80,6 +80,6 @@ class BasicCodeModules : public CodeModules {
void operator=(const BasicCodeModules &that);
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_BASIC_CODE_MODULES_H__

View File

@@ -38,9 +38,9 @@
#include "processor/contained_range_map-inl.h"
#include "processor/range_map-inl.h"
#include "google_airbag/processor/basic_source_line_resolver.h"
#include "google_airbag/processor/code_module.h"
#include "google_airbag/processor/stack_frame.h"
#include "google_breakpad/processor/basic_source_line_resolver.h"
#include "google_breakpad/processor/code_module.h"
#include "google_breakpad/processor/stack_frame.h"
#include "processor/linked_ptr.h"
#include "processor/scoped_ptr.h"
#include "processor/stack_frame_info.h"
@@ -50,7 +50,7 @@ using std::vector;
using std::make_pair;
using __gnu_cxx::hash;
namespace google_airbag {
namespace google_breakpad {
struct BasicSourceLineResolver::Line {
Line(MemAddr addr, MemAddr code_size, int file_id, int source_line)
@@ -558,4 +558,4 @@ size_t BasicSourceLineResolver::HashString::operator()(const string &s) const {
return hash<const char*>()(s.c_str());
}
} // namespace google_airbag
} // namespace google_breakpad

View File

@@ -29,9 +29,9 @@
#include <cstdio>
#include <string>
#include "google_airbag/processor/basic_source_line_resolver.h"
#include "google_airbag/processor/code_module.h"
#include "google_airbag/processor/stack_frame.h"
#include "google_breakpad/processor/basic_source_line_resolver.h"
#include "google_breakpad/processor/code_module.h"
#include "google_breakpad/processor/stack_frame.h"
#include "processor/linked_ptr.h"
#include "processor/scoped_ptr.h"
#include "processor/stack_frame_info.h"
@@ -49,12 +49,12 @@
namespace {
using std::string;
using google_airbag::BasicSourceLineResolver;
using google_airbag::CodeModule;
using google_airbag::linked_ptr;
using google_airbag::scoped_ptr;
using google_airbag::StackFrame;
using google_airbag::StackFrameInfo;
using google_breakpad::BasicSourceLineResolver;
using google_breakpad::CodeModule;
using google_breakpad::linked_ptr;
using google_breakpad::scoped_ptr;
using google_breakpad::StackFrame;
using google_breakpad::StackFrameInfo;
class TestCodeModule : public CodeModule {
public:

View File

@@ -33,10 +33,10 @@
//
// Author: Mark Mentovai
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/stack_frame.h"
#include "google_breakpad/processor/call_stack.h"
#include "google_breakpad/processor/stack_frame.h"
namespace google_airbag {
namespace google_breakpad {
CallStack::~CallStack() {
Clear();
@@ -50,4 +50,4 @@ void CallStack::Clear() {
}
}
} // namespace google_airbag
} // namespace google_breakpad

View File

@@ -40,7 +40,7 @@
#include "processor/contained_range_map.h"
namespace google_airbag {
namespace google_breakpad {
template<typename AddressType, typename EntryType>
@@ -166,7 +166,7 @@ void ContainedRangeMap<AddressType, EntryType>::Clear() {
}
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_CONTAINED_RANGE_MAP_INL_H__

View File

@@ -64,7 +64,7 @@
#include <map>
namespace google_airbag {
namespace google_breakpad {
template<typename AddressType, typename EntryType>
@@ -140,7 +140,7 @@ class ContainedRangeMap {
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_CONTAINED_RANGE_MAP_H__

View File

@@ -48,7 +48,7 @@
namespace {
using google_airbag::ContainedRangeMap;
using google_breakpad::ContainedRangeMap;
static bool RunTests() {

View File

@@ -53,7 +53,7 @@
#ifndef PROCESSOR_LINKED_PTR_H__
#define PROCESSOR_LINKED_PTR_H__
namespace google_airbag {
namespace google_breakpad {
// This is used internally by all instances of linked_ptr<>. It needs to be
// a non-template class because different types of linked_ptr<> can refer to
@@ -188,6 +188,6 @@ linked_ptr<T> make_linked_ptr(T* ptr) {
return linked_ptr<T>(ptr);
}
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_LINKED_PTR_H__

View File

@@ -54,13 +54,13 @@ typedef SSIZE_T ssize_t;
#include "processor/range_map-inl.h"
#include "google_airbag/processor/minidump.h"
#include "google_breakpad/processor/minidump.h"
#include "processor/basic_code_module.h"
#include "processor/basic_code_modules.h"
#include "processor/scoped_ptr.h"
namespace google_airbag {
namespace google_breakpad {
using std::vector;
@@ -1280,7 +1280,7 @@ string MinidumpModule::debug_identifier() const {
// miscellaneous debug record. It only carries a filename, though, and no
// identifier. I'm not sure what the right thing to do for the identifier
// is in that case, but I don't expect to find many modules without a
// CodeView record (or some other Airbag extension structure in place of
// CodeView record (or some other Breakpad extension structure in place of
// a CodeView record). Treat it as an error (empty identifier) for now.
// TODO(mmentovai): on the Mac, provide fallbacks as in code_identifier().
@@ -1399,7 +1399,7 @@ const u_int8_t* MinidumpModule::GetCVRecord(u_int32_t* size) {
}
// If the signature doesn't match something above, it's not something
// that Airbag can presently handle directly. Because some modules in
// that Breakpad can presently handle directly. Because some modules in
// the wild contain such CodeView records as MD_CVINFOCV50_SIGNATURE,
// don't bail out here - allow the data to be returned to the user,
// although byte-swapping can't be done.
@@ -2323,29 +2323,29 @@ void MinidumpMiscInfo::Print() {
//
// MinidumpAirbagInfo
// MinidumpBreakpadInfo
//
MinidumpAirbagInfo::MinidumpAirbagInfo(Minidump* minidump)
MinidumpBreakpadInfo::MinidumpBreakpadInfo(Minidump* minidump)
: MinidumpStream(minidump),
airbag_info_() {
breakpad_info_() {
}
bool MinidumpAirbagInfo::Read(u_int32_t expected_size) {
bool MinidumpBreakpadInfo::Read(u_int32_t expected_size) {
valid_ = false;
if (expected_size != sizeof(airbag_info_))
if (expected_size != sizeof(breakpad_info_))
return false;
if (!minidump_->ReadBytes(&airbag_info_, sizeof(airbag_info_)))
if (!minidump_->ReadBytes(&breakpad_info_, sizeof(breakpad_info_)))
return false;
if (minidump_->swap()) {
Swap(&airbag_info_.validity);
Swap(&airbag_info_.dump_thread_id);
Swap(&airbag_info_.requesting_thread_id);
Swap(&breakpad_info_.validity);
Swap(&breakpad_info_.dump_thread_id);
Swap(&breakpad_info_.requesting_thread_id);
}
valid_ = true;
@@ -2353,45 +2353,45 @@ bool MinidumpAirbagInfo::Read(u_int32_t expected_size) {
}
bool MinidumpAirbagInfo::GetDumpThreadID(u_int32_t *thread_id) const {
bool MinidumpBreakpadInfo::GetDumpThreadID(u_int32_t *thread_id) const {
if (!thread_id || !valid_ ||
!(airbag_info_.validity & MD_AIRBAG_INFO_VALID_DUMP_THREAD_ID)) {
!(breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID)) {
return false;
}
*thread_id = airbag_info_.dump_thread_id;
*thread_id = breakpad_info_.dump_thread_id;
return true;
}
bool MinidumpAirbagInfo::GetRequestingThreadID(u_int32_t *thread_id)
bool MinidumpBreakpadInfo::GetRequestingThreadID(u_int32_t *thread_id)
const {
if (!thread_id || !valid_ ||
!(airbag_info_.validity & MD_AIRBAG_INFO_VALID_REQUESTING_THREAD_ID)) {
!(breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID)) {
return false;
}
*thread_id = airbag_info_.requesting_thread_id;
*thread_id = breakpad_info_.requesting_thread_id;
return true;
}
void MinidumpAirbagInfo::Print() {
void MinidumpBreakpadInfo::Print() {
if (!valid_)
return;
printf("MDRawAirbagInfo\n");
printf(" validity = 0x%x\n", airbag_info_.validity);
printf("MDRawBreakpadInfo\n");
printf(" validity = 0x%x\n", breakpad_info_.validity);
if (airbag_info_.validity & MD_AIRBAG_INFO_VALID_DUMP_THREAD_ID) {
printf(" dump_thread_id = 0x%x\n", airbag_info_.dump_thread_id);
if (breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID) {
printf(" dump_thread_id = 0x%x\n", breakpad_info_.dump_thread_id);
} else {
printf(" dump_thread_id = (invalid)\n");
}
if (airbag_info_.validity & MD_AIRBAG_INFO_VALID_DUMP_THREAD_ID) {
if (breakpad_info_.validity & MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID) {
printf(" requesting_thread_id = 0x%x\n",
airbag_info_.requesting_thread_id);
breakpad_info_.requesting_thread_id);
} else {
printf(" requesting_thread_id = (invalid)\n");
}
@@ -2523,7 +2523,7 @@ bool Minidump::Read() {
case MD_EXCEPTION_STREAM:
case MD_SYSTEM_INFO_STREAM:
case MD_MISC_INFO_STREAM:
case MD_AIRBAG_INFO_STREAM: {
case MD_BREAKPAD_INFO_STREAM: {
if (stream_map_->find(stream_type) != stream_map_->end()) {
// Another stream with this type was already found. A minidump
// file should contain at most one of each of these stream types.
@@ -2584,9 +2584,9 @@ MinidumpMiscInfo* Minidump::GetMiscInfo() {
}
MinidumpAirbagInfo* Minidump::GetAirbagInfo() {
MinidumpAirbagInfo* airbag_info;
return GetStream(&airbag_info);
MinidumpBreakpadInfo* Minidump::GetBreakpadInfo() {
MinidumpBreakpadInfo* breakpad_info;
return GetStream(&breakpad_info);
}
@@ -2766,4 +2766,4 @@ T* Minidump::GetStream(T** stream) {
}
} // namespace google_airbag
} // namespace google_breakpad

View File

@@ -34,18 +34,18 @@
#include <cstdio>
#include "google_airbag/processor/minidump.h"
#include "google_breakpad/processor/minidump.h"
namespace {
using google_airbag::Minidump;
using google_airbag::MinidumpThreadList;
using google_airbag::MinidumpModuleList;
using google_airbag::MinidumpMemoryList;
using google_airbag::MinidumpException;
using google_airbag::MinidumpSystemInfo;
using google_airbag::MinidumpMiscInfo;
using google_airbag::MinidumpAirbagInfo;
using google_breakpad::Minidump;
using google_breakpad::MinidumpThreadList;
using google_breakpad::MinidumpModuleList;
using google_breakpad::MinidumpMemoryList;
using google_breakpad::MinidumpException;
using google_breakpad::MinidumpSystemInfo;
using google_breakpad::MinidumpMiscInfo;
using google_breakpad::MinidumpBreakpadInfo;
static bool PrintMinidumpDump(const char *minidump_file) {
Minidump minidump(minidump_file);
@@ -105,12 +105,12 @@ static bool PrintMinidumpDump(const char *minidump_file) {
misc_info->Print();
}
MinidumpAirbagInfo *airbag_info = minidump.GetAirbagInfo();
if (!airbag_info) {
// Airbag info is optional, so don't treat this as an error.
printf("minidump.GetAirbagInfo() failed\n");
MinidumpBreakpadInfo *breakpad_info = minidump.GetBreakpadInfo();
if (!breakpad_info) {
// Breakpad info is optional, so don't treat this as an error.
printf("minidump.GetBreakpadInfo() failed\n");
} else {
airbag_info->Print();
breakpad_info->Print();
}
return errors == 0;

View File

@@ -29,14 +29,14 @@
#include <cassert>
#include "google_airbag/processor/minidump_processor.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/minidump.h"
#include "google_airbag/processor/process_state.h"
#include "google_breakpad/processor/minidump_processor.h"
#include "google_breakpad/processor/call_stack.h"
#include "google_breakpad/processor/minidump.h"
#include "google_breakpad/processor/process_state.h"
#include "processor/scoped_ptr.h"
#include "processor/stackwalker_x86.h"
namespace google_airbag {
namespace google_breakpad {
MinidumpProcessor::MinidumpProcessor(SymbolSupplier *supplier,
SourceLineResolverInterface *resolver)
@@ -67,11 +67,11 @@ MinidumpProcessor::ProcessResult MinidumpProcessor::Process(
u_int32_t requesting_thread_id = 0;
bool has_requesting_thread = false;
MinidumpAirbagInfo *airbag_info = dump.GetAirbagInfo();
if (airbag_info) {
has_dump_thread = airbag_info->GetDumpThreadID(&dump_thread_id);
MinidumpBreakpadInfo *breakpad_info = dump.GetBreakpadInfo();
if (breakpad_info) {
has_dump_thread = breakpad_info->GetDumpThreadID(&dump_thread_id);
has_requesting_thread =
airbag_info->GetRequestingThreadID(&requesting_thread_id);
breakpad_info->GetRequestingThreadID(&requesting_thread_id);
}
MinidumpException *exception = dump.GetException();
@@ -675,4 +675,4 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) {
return reason;
}
} // namespace google_airbag
} // namespace google_breakpad

View File

@@ -32,27 +32,27 @@
#include <cstdlib>
#include <string>
#include "google_airbag/processor/basic_source_line_resolver.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/code_module.h"
#include "google_airbag/processor/code_modules.h"
#include "google_airbag/processor/minidump_processor.h"
#include "google_airbag/processor/process_state.h"
#include "google_airbag/processor/stack_frame.h"
#include "google_airbag/processor/symbol_supplier.h"
#include "google_breakpad/processor/basic_source_line_resolver.h"
#include "google_breakpad/processor/call_stack.h"
#include "google_breakpad/processor/code_module.h"
#include "google_breakpad/processor/code_modules.h"
#include "google_breakpad/processor/minidump_processor.h"
#include "google_breakpad/processor/process_state.h"
#include "google_breakpad/processor/stack_frame.h"
#include "google_breakpad/processor/symbol_supplier.h"
#include "processor/scoped_ptr.h"
namespace {
using std::string;
using google_airbag::BasicSourceLineResolver;
using google_airbag::CallStack;
using google_airbag::CodeModule;
using google_airbag::MinidumpProcessor;
using google_airbag::ProcessState;
using google_airbag::scoped_ptr;
using google_airbag::SymbolSupplier;
using google_airbag::SystemInfo;
using google_breakpad::BasicSourceLineResolver;
using google_breakpad::CallStack;
using google_breakpad::CodeModule;
using google_breakpad::MinidumpProcessor;
using google_breakpad::ProcessState;
using google_breakpad::scoped_ptr;
using google_breakpad::SymbolSupplier;
using google_breakpad::SystemInfo;
static const char *kSystemInfoOS = "Windows NT";
static const char *kSystemInfoOSShort = "windows";
@@ -111,7 +111,7 @@ SymbolSupplier::SymbolResult TestSymbolSupplier::GetSymbolFile(
return INTERRUPT;
}
if (module && module->code_file() == "C:\\test_app.exe") {
if (module && module->code_file() == "c:\\test_app.exe") {
*symbol_file = string(getenv("srcdir") ? getenv("srcdir") : ".") +
"/src/processor/testdata/symbols/test_app.pdb/" +
module->debug_identifier() +
@@ -150,27 +150,27 @@ static bool RunTests() {
ASSERT_TRUE(stack->frames()->at(0)->module);
ASSERT_EQ(stack->frames()->at(0)->module->base_address(), 0x400000);
ASSERT_EQ(stack->frames()->at(0)->module->code_file(), "C:\\test_app.exe");
ASSERT_EQ(stack->frames()->at(0)->module->code_file(), "c:\\test_app.exe");
ASSERT_EQ(stack->frames()->at(0)->function_name,
"`anonymous namespace'::CrashFunction");
ASSERT_EQ(stack->frames()->at(0)->source_file_name, "c:\\test_app.cc");
ASSERT_EQ(stack->frames()->at(0)->source_line, 56);
ASSERT_EQ(stack->frames()->at(0)->source_line, 58);
ASSERT_TRUE(stack->frames()->at(1)->module);
ASSERT_EQ(stack->frames()->at(1)->module->base_address(), 0x400000);
ASSERT_EQ(stack->frames()->at(1)->module->code_file(), "C:\\test_app.exe");
ASSERT_EQ(stack->frames()->at(1)->module->code_file(), "c:\\test_app.exe");
ASSERT_EQ(stack->frames()->at(1)->function_name, "main");
ASSERT_EQ(stack->frames()->at(1)->source_file_name, "c:\\test_app.cc");
ASSERT_EQ(stack->frames()->at(1)->source_line, 63);
ASSERT_EQ(stack->frames()->at(1)->source_line, 65);
// This comes from the CRT
ASSERT_TRUE(stack->frames()->at(2)->module);
ASSERT_EQ(stack->frames()->at(2)->module->base_address(), 0x400000);
ASSERT_EQ(stack->frames()->at(2)->module->code_file(), "C:\\test_app.exe");
ASSERT_EQ(stack->frames()->at(2)->module->code_file(), "c:\\test_app.exe");
ASSERT_EQ(stack->frames()->at(2)->function_name, "__tmainCRTStartup");
ASSERT_EQ(stack->frames()->at(2)->source_file_name,
"f:\\rtm\\vctools\\crt_bld\\self_x86\\crt\\src\\crt0.c");
ASSERT_EQ(stack->frames()->at(2)->source_line, 318);
"f:\\sp\\vctools\\crt_bld\\self_x86\\crt\\src\\crt0.c");
ASSERT_EQ(stack->frames()->at(2)->source_line, 327);
// No debug info available for kernel32.dll
ASSERT_TRUE(stack->frames()->at(3)->module);
@@ -183,7 +183,7 @@ static bool RunTests() {
ASSERT_EQ(state.modules()->module_count(), 13);
ASSERT_TRUE(state.modules()->GetMainModule());
ASSERT_EQ(state.modules()->GetMainModule()->code_file(), "C:\\test_app.exe");
ASSERT_EQ(state.modules()->GetMainModule()->code_file(), "c:\\test_app.exe");
ASSERT_FALSE(state.modules()->GetModuleForAddress(0));
ASSERT_EQ(state.modules()->GetMainModule(),
state.modules()->GetModuleForAddress(0x400000));

View File

@@ -37,14 +37,14 @@
#include <string>
#include <vector>
#include "google_airbag/processor/basic_source_line_resolver.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/code_module.h"
#include "google_airbag/processor/code_modules.h"
#include "google_airbag/processor/minidump.h"
#include "google_airbag/processor/minidump_processor.h"
#include "google_airbag/processor/process_state.h"
#include "google_airbag/processor/stack_frame_cpu.h"
#include "google_breakpad/processor/basic_source_line_resolver.h"
#include "google_breakpad/processor/call_stack.h"
#include "google_breakpad/processor/code_module.h"
#include "google_breakpad/processor/code_modules.h"
#include "google_breakpad/processor/minidump.h"
#include "google_breakpad/processor/minidump_processor.h"
#include "google_breakpad/processor/process_state.h"
#include "google_breakpad/processor/stack_frame_cpu.h"
#include "processor/pathname_stripper.h"
#include "processor/scoped_ptr.h"
#include "processor/simple_symbol_supplier.h"
@@ -53,19 +53,19 @@ namespace {
using std::string;
using std::vector;
using google_airbag::BasicSourceLineResolver;
using google_airbag::CallStack;
using google_airbag::CodeModule;
using google_airbag::CodeModules;
using google_airbag::MinidumpModule;
using google_airbag::MinidumpProcessor;
using google_airbag::PathnameStripper;
using google_airbag::ProcessState;
using google_airbag::scoped_ptr;
using google_airbag::SimpleSymbolSupplier;
using google_airbag::StackFrame;
using google_airbag::StackFramePPC;
using google_airbag::StackFrameX86;
using google_breakpad::BasicSourceLineResolver;
using google_breakpad::CallStack;
using google_breakpad::CodeModule;
using google_breakpad::CodeModules;
using google_breakpad::MinidumpModule;
using google_breakpad::MinidumpProcessor;
using google_breakpad::PathnameStripper;
using google_breakpad::ProcessState;
using google_breakpad::scoped_ptr;
using google_breakpad::SimpleSymbolSupplier;
using google_breakpad::StackFrame;
using google_breakpad::StackFramePPC;
using google_breakpad::StackFrameX86;
// Separator character for machine readable output.
static const char kOutputSeparator = '|';

View File

@@ -35,7 +35,7 @@
#include "processor/pathname_stripper.h"
namespace google_airbag {
namespace google_breakpad {
// static
string PathnameStripper::File(const string &path) {
@@ -53,4 +53,4 @@ string PathnameStripper::File(const string &path) {
return path.substr(file_start);
}
} // namespace google_airbag
} // namespace google_breakpad

View File

@@ -36,7 +36,7 @@
#include <string>
namespace google_airbag {
namespace google_breakpad {
using std::string;
@@ -48,6 +48,6 @@ class PathnameStripper {
static string File(const string &path);
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_PATHNAME_STRIPPER_H__

View File

@@ -39,7 +39,7 @@
namespace {
using google_airbag::PathnameStripper;
using google_breakpad::PathnameStripper;
static bool RunTests() {
ASSERT_EQ(PathnameStripper::File("/dir/file"), "file");

View File

@@ -26,9 +26,9 @@
#include <sstream>
#include "processor/postfix_evaluator.h"
#include "google_airbag/processor/memory_region.h"
#include "google_breakpad/processor/memory_region.h"
namespace google_airbag {
namespace google_breakpad {
using std::istringstream;
using std::ostringstream;
@@ -235,7 +235,7 @@ void PostfixEvaluator<ValueType>::PushValue(const ValueType &value) {
}
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_POSTFIX_EVALUATOR_INL_H__

View File

@@ -55,7 +55,7 @@
#include <string>
#include <vector>
namespace google_airbag {
namespace google_breakpad {
using std::map;
using std::string;
@@ -137,7 +137,7 @@ class PostfixEvaluator {
vector<string> stack_;
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_POSTFIX_EVALUATOR_H__

View File

@@ -37,8 +37,8 @@
#include "processor/postfix_evaluator-inl.h"
#include "google_airbag/common/airbag_types.h"
#include "google_airbag/processor/memory_region.h"
#include "google_breakpad/common/breakpad_types.h"
#include "google_breakpad/processor/memory_region.h"
namespace {
@@ -46,8 +46,8 @@ namespace {
using std::map;
using std::string;
using google_airbag::MemoryRegion;
using google_airbag::PostfixEvaluator;
using google_breakpad::MemoryRegion;
using google_breakpad::PostfixEvaluator;
// FakeMemoryRegion is used to test PostfixEvaluator's dereference (^)

View File

@@ -33,11 +33,11 @@
//
// Author: Mark Mentovai
#include "google_airbag/processor/process_state.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/code_modules.h"
#include "google_breakpad/processor/process_state.h"
#include "google_breakpad/processor/call_stack.h"
#include "google_breakpad/processor/code_modules.h"
namespace google_airbag {
namespace google_breakpad {
ProcessState::~ProcessState() {
Clear();
@@ -60,4 +60,4 @@ void ProcessState::Clear() {
modules_ = NULL;
}
} // namespace google_airbag
} // namespace google_breakpad

View File

@@ -40,7 +40,7 @@
#include "processor/range_map.h"
namespace google_airbag {
namespace google_breakpad {
template<typename AddressType, typename EntryType>
@@ -176,7 +176,7 @@ void RangeMap<AddressType, EntryType>::Clear() {
}
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_RANGE_MAP_INL_H__

View File

@@ -44,7 +44,7 @@
#include <map>
namespace google_airbag {
namespace google_breakpad {
template<typename AddressType, typename EntryType>
@@ -121,7 +121,7 @@ class RangeMap {
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_RANGE_MAP_H__

View File

@@ -44,9 +44,9 @@
namespace {
using google_airbag::linked_ptr;
using google_airbag::scoped_ptr;
using google_airbag::RangeMap;
using google_breakpad::linked_ptr;
using google_breakpad::scoped_ptr;
using google_breakpad::RangeMap;
// A CountedObject holds an int. A global (not thread safe!) count of

View File

@@ -53,7 +53,7 @@
#include <assert.h> // for assert
#include <stdlib.h> // for free() decl
namespace google_airbag {
namespace google_breakpad {
template <typename T>
class scoped_ptr {
@@ -330,6 +330,6 @@ bool operator!=(T* p, const scoped_ptr_malloc<T,FP>& b) {
return p != b.get();
}
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_SCOPED_PTR_H__

View File

@@ -39,11 +39,11 @@
#include <cassert>
#include "processor/simple_symbol_supplier.h"
#include "google_airbag/processor/code_module.h"
#include "google_airbag/processor/system_info.h"
#include "google_breakpad/processor/code_module.h"
#include "google_breakpad/processor/system_info.h"
#include "processor/pathname_stripper.h"
namespace google_airbag {
namespace google_breakpad {
static bool file_exists(const string &file_name) {
struct stat sb;
@@ -110,4 +110,4 @@ SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFileAtPath(
return FOUND;
}
} // namespace google_airbag
} // namespace google_breakpad

View File

@@ -79,9 +79,9 @@
#include <string>
#include <vector>
#include "google_airbag/processor/symbol_supplier.h"
#include "google_breakpad/processor/symbol_supplier.h"
namespace google_airbag {
namespace google_breakpad {
using std::string;
using std::vector;
@@ -116,6 +116,6 @@ class SimpleSymbolSupplier : public SymbolSupplier {
vector<string> paths_;
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_SIMPLE_SYMBOL_SUPPLIER_H__

View File

@@ -40,9 +40,9 @@
#include <string>
#include "google_airbag/common/airbag_types.h"
#include "google_breakpad/common/breakpad_types.h"
namespace google_airbag {
namespace google_breakpad {
struct StackFrameInfo {
public:
@@ -120,7 +120,7 @@ struct StackFrameInfo {
std::string program_string;
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_STACK_FRAME_INFO_H__

View File

@@ -36,21 +36,21 @@
#include <cassert>
#include "google_airbag/processor/stackwalker.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/code_module.h"
#include "google_airbag/processor/code_modules.h"
#include "google_airbag/processor/minidump.h"
#include "google_airbag/processor/source_line_resolver_interface.h"
#include "google_airbag/processor/stack_frame.h"
#include "google_airbag/processor/symbol_supplier.h"
#include "google_breakpad/processor/stackwalker.h"
#include "google_breakpad/processor/call_stack.h"
#include "google_breakpad/processor/code_module.h"
#include "google_breakpad/processor/code_modules.h"
#include "google_breakpad/processor/minidump.h"
#include "google_breakpad/processor/source_line_resolver_interface.h"
#include "google_breakpad/processor/stack_frame.h"
#include "google_breakpad/processor/symbol_supplier.h"
#include "processor/linked_ptr.h"
#include "processor/scoped_ptr.h"
#include "processor/stack_frame_info.h"
#include "processor/stackwalker_ppc.h"
#include "processor/stackwalker_x86.h"
namespace google_airbag {
namespace google_breakpad {
Stackwalker::Stackwalker(const SystemInfo *system_info,
@@ -162,4 +162,4 @@ Stackwalker* Stackwalker::StackwalkerForCPU(
}
} // namespace google_airbag
} // namespace google_breakpad

View File

@@ -35,11 +35,11 @@
#include "processor/stackwalker_ppc.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/memory_region.h"
#include "google_airbag/processor/stack_frame_cpu.h"
#include "google_breakpad/processor/call_stack.h"
#include "google_breakpad/processor/memory_region.h"
#include "google_breakpad/processor/stack_frame_cpu.h"
namespace google_airbag {
namespace google_breakpad {
StackwalkerPPC::StackwalkerPPC(const SystemInfo *system_info,
@@ -135,4 +135,4 @@ StackFrame* StackwalkerPPC::GetCallerFrame(
}
} // namespace google_airbag
} // namespace google_breakpad

View File

@@ -39,11 +39,11 @@
#define PROCESSOR_STACKWALKER_PPC_H__
#include "google_airbag/common/airbag_types.h"
#include "google_airbag/common/minidump_format.h"
#include "google_airbag/processor/stackwalker.h"
#include "google_breakpad/common/breakpad_types.h"
#include "google_breakpad/common/minidump_format.h"
#include "google_breakpad/processor/stackwalker.h"
namespace google_airbag {
namespace google_breakpad {
class CodeModules;
@@ -75,7 +75,7 @@ class StackwalkerPPC : public Stackwalker {
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_STACKWALKER_PPC_H__

View File

@@ -54,29 +54,29 @@
#include <cstdio>
#include "google_airbag/common/airbag_types.h"
#include "google_airbag/common/minidump_format.h"
#include "google_airbag/processor/basic_source_line_resolver.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/memory_region.h"
#include "google_airbag/processor/stack_frame.h"
#include "google_airbag/processor/stack_frame_cpu.h"
#include "google_breakpad/common/breakpad_types.h"
#include "google_breakpad/common/minidump_format.h"
#include "google_breakpad/processor/basic_source_line_resolver.h"
#include "google_breakpad/processor/call_stack.h"
#include "google_breakpad/processor/memory_region.h"
#include "google_breakpad/processor/stack_frame.h"
#include "google_breakpad/processor/stack_frame_cpu.h"
#include "processor/scoped_ptr.h"
using google_airbag::BasicSourceLineResolver;
using google_airbag::CallStack;
using google_airbag::MemoryRegion;
using google_airbag::scoped_ptr;
using google_airbag::StackFrame;
using google_airbag::StackFramePPC;
using google_airbag::StackFrameX86;
using google_breakpad::BasicSourceLineResolver;
using google_breakpad::CallStack;
using google_breakpad::MemoryRegion;
using google_breakpad::scoped_ptr;
using google_breakpad::StackFrame;
using google_breakpad::StackFramePPC;
using google_breakpad::StackFrameX86;
#if defined(__i386__)
#include "processor/stackwalker_x86.h"
using google_airbag::StackwalkerX86;
using google_breakpad::StackwalkerX86;
#elif defined(__ppc__)
#include "processor/stackwalker_ppc.h"
using google_airbag::StackwalkerPPC;
using google_breakpad::StackwalkerPPC;
#endif // __i386__ || __ppc__
#define RECURSION_DEPTH 100

View File

@@ -37,13 +37,13 @@
#include "processor/postfix_evaluator-inl.h"
#include "processor/stackwalker_x86.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/memory_region.h"
#include "google_airbag/processor/stack_frame_cpu.h"
#include "google_breakpad/processor/call_stack.h"
#include "google_breakpad/processor/memory_region.h"
#include "google_breakpad/processor/stack_frame_cpu.h"
#include "processor/linked_ptr.h"
#include "processor/stack_frame_info.h"
namespace google_airbag {
namespace google_breakpad {
StackwalkerX86::StackwalkerX86(const SystemInfo *system_info,
@@ -134,7 +134,7 @@ StackFrame* StackwalkerX86::GetCallerFrame(
// Set up the dictionary for the PostfixEvaluator. %ebp and %esp are used
// in each program string, and their previous values are known, so set them
// here. .cbCalleeParams is an Airbag extension that allows us to use
// here. .cbCalleeParams is an Breakpad extension that allows us to use
// the PostfixEvaluator engine when certain types of debugging information
// are present without having to write the constants into the program string
// as literals.
@@ -312,4 +312,4 @@ StackFrame* StackwalkerX86::GetCallerFrame(
}
} // namespace google_airbag
} // namespace google_breakpad

View File

@@ -39,11 +39,11 @@
#define PROCESSOR_STACKWALKER_X86_H__
#include "google_airbag/common/airbag_types.h"
#include "google_airbag/common/minidump_format.h"
#include "google_airbag/processor/stackwalker.h"
#include "google_breakpad/common/breakpad_types.h"
#include "google_breakpad/common/minidump_format.h"
#include "google_breakpad/processor/stackwalker.h"
namespace google_airbag {
namespace google_breakpad {
class CodeModules;
@@ -76,7 +76,7 @@ class StackwalkerX86 : public Stackwalker {
};
} // namespace google_airbag
} // namespace google_breakpad
#endif // PROCESSOR_STACKWALKER_X86_H__

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
OS|Windows NT|5.1.2600 Service Pack 2
CPU|x86|GenuineIntel family 6 model 13 stepping 8
Crash|EXCEPTION_ACCESS_VIOLATION|0x45|0
Module|test_app.exe||0x00400000|0x0042bfff|1
Module|test_app.exe||0x00400000|0x0042cfff|1
Module|dbghelp.dll|5.1.2600.2180|0x59a60000|0x59b00fff|0
Module|imm32.dll|5.1.2600.2180|0x76390000|0x763acfff|0
Module|psapi.dll|5.1.2600.2180|0x76bf0000|0x76bfafff|0
@@ -15,7 +15,7 @@ Module|gdi32.dll|5.1.2600.2818|0x77f10000|0x77f56fff|0
Module|kernel32.dll|5.1.2600.2945|0x7c800000|0x7c8f3fff|0
Module|ntdll.dll|5.1.2600.2180|0x7c900000|0x7c9affff|0
0|0|test_app.exe|`anonymous namespace'::CrashFunction|c:\test_app.cc|56|0x3
0|1|test_app.exe|main|c:\test_app.cc|63|0x4
0|2|test_app.exe|__tmainCRTStartup|f:\rtm\vctools\crt_bld\self_x86\crt\src\crt0.c|318|0x11
0|0|test_app.exe|`anonymous namespace'::CrashFunction|c:\test_app.cc|58|0x3
0|1|test_app.exe|main|c:\test_app.cc|65|0x4
0|2|test_app.exe|__tmainCRTStartup|f:\sp\vctools\crt_bld\self_x86\crt\src\crt0.c|327|0x11
0|3|kernel32.dll|BaseProcessStart|||0x22

View File

@@ -7,19 +7,19 @@ Crash reason: EXCEPTION_ACCESS_VIOLATION
Crash address: 0x45
Thread 0 (crashed)
0 test_app.exe!`anonymous namespace'::CrashFunction [test_app.cc : 56 + 0x3]
eip = 0x00403f6e esp = 0x0012fe8c ebp = 0x0012fe90 ebx = 0x7c80abc1
esi = 0x00000002 edi = 0x00000a28 eax = 0x00000045 ecx = 0x0012fe9c
edx = 0x0042ac60 efl = 0x00010246
1 test_app.exe!main [test_app.cc : 63 + 0x4]
eip = 0x00403ed0 esp = 0x0012fe98 ebp = 0x0012ff70
2 test_app.exe!__tmainCRTStartup [crt0.c : 318 + 0x11]
eip = 0x00405096 esp = 0x0012ff78 ebp = 0x0012ffc0
0 test_app.exe!`anonymous namespace'::CrashFunction [test_app.cc : 58 + 0x3]
eip = 0x0040429e esp = 0x0012fe84 ebp = 0x0012fe88 ebx = 0x7c80abc1
esi = 0x00000002 edi = 0x00000a28 eax = 0x00000045 ecx = 0x0012fe94
edx = 0x0042bc58 efl = 0x00010246
1 test_app.exe!main [test_app.cc : 65 + 0x4]
eip = 0x00404200 esp = 0x0012fe90 ebp = 0x0012ff70
2 test_app.exe!__tmainCRTStartup [crt0.c : 327 + 0x11]
eip = 0x004053ec esp = 0x0012ff78 ebp = 0x0012ffc0
3 kernel32.dll!BaseProcessStart + 0x22
eip = 0x7c816fd7 esp = 0x0012ffc8 ebp = 0x0012fff0
Loaded modules:
0x00400000 - 0x0042bfff test_app.exe ??? (main)
0x00400000 - 0x0042cfff test_app.exe ??? (main)
0x59a60000 - 0x59b00fff dbghelp.dll 5.1.2600.2180
0x76390000 - 0x763acfff imm32.dll 5.1.2600.2180
0x76bf0000 - 0x76bfafff psapi.dll 5.1.2600.2180

File diff suppressed because it is too large Load Diff

View File

@@ -28,8 +28,8 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// This file is used to generate minidump2.dmp and minidump2.sym.
// cl /Zi test_app.cc /Fetest_app.exe /I airbag/src \
// airbag/src/client/windows/releasestaticcrt/exception_handler.lib \
// cl /Zi test_app.cc /Fetest_app.exe /I google_breakpad/src \
// google_breakpad/src/client/windows/releasestaticcrt/exception_handler.lib \
// ole32.lib
// Then run test_app to generate a dump, and dump_syms to create the .sym file.
@@ -61,7 +61,7 @@ static void CrashFunction() {
} // namespace
int main(int argc, char **argv) {
google_airbag::ExceptionHandler eh(L".", NULL, callback, NULL, true);
google_breakpad::ExceptionHandler eh(L".", NULL, callback, NULL, true);
CrashFunction();
printf("did not crash?\n");
return 0;