Move headers for exported interfaces into src/google_airbag (#51). r=bryner

http://groups.google.com/group/airbag-dev/browse_thread/thread/e01f177386e8794a


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@60 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
mmentovai 2006-11-06 19:39:47 +00:00
parent 80866e7945
commit fe82bf24a9
35 changed files with 133 additions and 135 deletions

View file

@ -50,23 +50,24 @@ dist_doc_DATA = \
lib_LTLIBRARIES = src/libairbag.la
src_libairbag_la_SOURCES = \
src/google/airbag_types.h \
src/google/call_stack.h \
src/google/minidump_processor.h \
src/google/process_state.h \
src/google/stack_frame.h \
src/google/stack_frame_cpu.h \
src/google/symbol_supplier.h \
src/google_airbag/common/airbag_types.h \
src/google_airbag/common/minidump_format.h \
src/google_airbag/processor/call_stack.h \
src/google_airbag/processor/memory_region.h \
src/google_airbag/processor/minidump.h \
src/google_airbag/processor/minidump_processor.h \
src/google_airbag/processor/process_state.h \
src/google_airbag/processor/stack_frame.h \
src/google_airbag/processor/stack_frame_cpu.h \
src/google_airbag/processor/stackwalker.h \
src/google_airbag/processor/symbol_supplier.h \
src/processor/address_map.h \
src/processor/address_map-inl.h \
src/processor/call_stack.cc \
src/processor/contained_range_map.h \
src/processor/contained_range_map-inl.h \
src/processor/linked_ptr.h \
src/processor/memory_region.h \
src/processor/minidump.cc \
src/processor/minidump.h \
src/processor/minidump_format.h \
src/processor/minidump_processor.cc \
src/processor/pathname_stripper.cc \
src/processor/pathname_stripper.h \
@ -82,7 +83,6 @@ src_libairbag_la_SOURCES = \
src/processor/source_line_resolver.h \
src/processor/stack_frame_info.h \
src/processor/stackwalker.cc \
src/processor/stackwalker.h \
src/processor/stackwalker_ppc.cc \
src/processor/stackwalker_ppc.h \
src/processor/stackwalker_x86.cc \

View file

@ -367,23 +367,24 @@ dist_doc_DATA = \
lib_LTLIBRARIES = src/libairbag.la
src_libairbag_la_SOURCES = \
src/google/airbag_types.h \
src/google/call_stack.h \
src/google/minidump_processor.h \
src/google/process_state.h \
src/google/stack_frame.h \
src/google/stack_frame_cpu.h \
src/google/symbol_supplier.h \
src/google_airbag/common/airbag_types.h \
src/google_airbag/common/minidump_format.h \
src/google_airbag/processor/call_stack.h \
src/google_airbag/processor/memory_region.h \
src/google_airbag/processor/minidump.h \
src/google_airbag/processor/minidump_processor.h \
src/google_airbag/processor/process_state.h \
src/google_airbag/processor/stack_frame.h \
src/google_airbag/processor/stack_frame_cpu.h \
src/google_airbag/processor/stackwalker.h \
src/google_airbag/processor/symbol_supplier.h \
src/processor/address_map.h \
src/processor/address_map-inl.h \
src/processor/call_stack.cc \
src/processor/contained_range_map.h \
src/processor/contained_range_map-inl.h \
src/processor/linked_ptr.h \
src/processor/memory_region.h \
src/processor/minidump.cc \
src/processor/minidump.h \
src/processor/minidump_format.h \
src/processor/minidump_processor.cc \
src/processor/pathname_stripper.cc \
src/processor/pathname_stripper.h \
@ -399,7 +400,6 @@ src_libairbag_la_SOURCES = \
src/processor/source_line_resolver.h \
src/processor/stack_frame_info.h \
src/processor/stackwalker.cc \
src/processor/stackwalker.h \
src/processor/stackwalker_ppc.cc \
src/processor/stackwalker_ppc.h \
src/processor/stackwalker_x86.cc \

View file

@ -37,9 +37,8 @@
*
* Author: Mark Mentovai */
#ifndef GOOGLE_AIRBAG_TYPES_H__
#define GOOGLE_AIRBAG_TYPES_H__
#ifndef GOOGLE_AIRBAG_COMMON_AIRBAG_TYPES_H__
#define GOOGLE_AIRBAG_COMMON_AIRBAG_TYPES_H__
#ifndef _WIN32
@ -62,4 +61,4 @@ typedef struct {
typedef u_int64_t airbag_time_t;
#endif /* GOOGLE_AIRBAG_TYPES_H__ */
#endif /* GOOGLE_AIRBAG_COMMON_AIRBAG_TYPES_H__ */

View file

@ -64,11 +64,11 @@
* Author: Mark Mentovai */
#ifndef PROCESSOR_MINIDUMP_FORMAT_H__
#define PROCESSOR_MINIDUMP_FORMAT_H__
#ifndef GOOGLE_AIRBAG_COMMON_MINIDUMP_FORMAT_H__
#define GOOGLE_AIRBAG_COMMON_MINIDUMP_FORMAT_H__
#include "google/airbag_types.h"
#include "google_airbag/common/airbag_types.h"
/*
@ -963,4 +963,4 @@ typedef enum {
} MDMiscInfoFlags1;
#endif /* PROCESSOR_MINIDUMP_FORMAT_H__ */
#endif /* GOOGLE_AIRBAG_COMMON_MINIDUMP_FORMAT_H__ */

View file

@ -42,8 +42,8 @@
//
// Author: Mark Mentovai
#ifndef GOOGLE_CALL_STACK_H__
#define GOOGLE_CALL_STACK_H__
#ifndef GOOGLE_AIRBAG_PROCESSOR_CALL_STACK_H__
#define GOOGLE_AIRBAG_PROCESSOR_CALL_STACK_H__
#include <vector>
@ -73,4 +73,4 @@ class CallStack {
} // namespace google_airbag
#endif // GOOGLE_CALL_STACK_H__
#endif // GOOGLE_AIRBAG_PROCSSOR_CALL_STACK_H__

View file

@ -35,11 +35,11 @@
//
// Author: Mark Mentovai
#ifndef PROCESSOR_MEMORY_REGION_H__
#define PROCESSOR_MEMORY_REGION_H__
#ifndef GOOGLE_AIRBAG_PROCESSOR_MEMORY_REGION_H__
#define GOOGLE_AIRBAG_PROCESSOR_MEMORY_REGION_H__
#include "google/airbag_types.h"
#include "google_airbag/common/airbag_types.h"
namespace google_airbag {
@ -73,4 +73,4 @@ class MemoryRegion {
} // namespace google_airbag
#endif // PROCESSOR_MEMORY_REGION_H__
#endif // GOOGLE_AIRBAG_PROCESSOR_MEMORY_REGION_H__

View file

@ -76,18 +76,16 @@
//
// Author: Mark Mentovai
#ifndef PROCESSOR_MINIDUMP_H__
#define PROCESSOR_MINIDUMP_H__
#ifndef GOOGLE_AIRBAG_PROCESSOR_MINIDUMP_H__
#define GOOGLE_AIRBAG_PROCESSOR_MINIDUMP_H__
// TODO(mmentovai): is it ok to include non-<string> header in .h?
#include <map>
#include <string>
#include <vector>
#include "processor/minidump_format.h"
#include "processor/memory_region.h"
#include "processor/range_map.h"
#include "google_airbag/common/minidump_format.h"
#include "google_airbag/processor/memory_region.h"
namespace google_airbag {
@ -99,6 +97,7 @@ using std::vector;
class Minidump;
template<typename AddressType, typename EntryType> class RangeMap;
// MinidumpObject is the base of all Minidump* objects except for Minidump
@ -444,10 +443,10 @@ class MinidumpModuleList : public MinidumpStream {
bool Read(u_int32_t expected_size);
// Access to modules using addresses as the key.
RangeMap<u_int64_t, unsigned int> range_map_;
RangeMap<u_int64_t, unsigned int> *range_map_;
MinidumpModules* modules_;
u_int32_t module_count_;
MinidumpModules *modules_;
u_int32_t module_count_;
};
@ -489,17 +488,17 @@ class MinidumpMemoryList : public MinidumpStream {
bool Read(u_int32_t expected_size);
// Access to memory regions using addresses as the key.
RangeMap<u_int64_t, unsigned int> range_map_;
RangeMap<u_int64_t, unsigned int> *range_map_;
// The list of descriptors. This is maintained separately from the list
// of regions, because MemoryRegion doesn't own its MemoryDescriptor, it
// maintains a pointer to it. descriptors_ provides the storage for this
// purpose.
MemoryDescriptors* descriptors_;
MemoryDescriptors *descriptors_;
// The list of regions.
MemoryRegions* regions_;
u_int32_t region_count_;
MemoryRegions *regions_;
u_int32_t region_count_;
};
@ -733,4 +732,4 @@ class Minidump {
} // namespace google_airbag
#endif // PROCESSOR_MINIDUMP_H__
#endif // GOOGLE_AIRBAG_PROCESSOR_MINIDUMP_H__

View file

@ -27,8 +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.
#ifndef GOOGLE_MINIDUMP_PROCESSOR_H__
#define GOOGLE_MINIDUMP_PROCESSOR_H__
#ifndef GOOGLE_AIRBAG_PROCESSOR_MINIDUMP_PROCESSOR_H__
#define GOOGLE_AIRBAG_PROCESSOR_MINIDUMP_PROCESSOR_H__
#include <string>
@ -82,4 +82,4 @@ class MinidumpProcessor {
} // namespace google_airbag
#endif // GOOGLE_MINIDUMP_PROCESSOR_H__
#endif // GOOGLE_AIRBAG_PROCESSOR_MINIDUMP_PROCESSOR_H__

View file

@ -31,8 +31,8 @@
//
// Author: Mark Mentovai
#ifndef GOOGLE_PROCESS_STATE_H__
#define GOOGLE_PROCESS_STATE_H__
#ifndef GOOGLE_AIRBAG_PROCESSOR_PROCESS_STATE_H__
#define GOOGLE_AIRBAG_PROCESSOR_PROCESS_STATE_H__
#include <string>
#include <vector>
@ -118,4 +118,4 @@ class ProcessState {
} // namespace google_airbag
#endif // GOOGLE_CALL_STACK_H__
#endif // GOOGLE_AIRBAG_PROCESSOR_CALL_STACK_H__

View file

@ -27,11 +27,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GOOGLE_STACK_FRAME_H__
#define GOOGLE_STACK_FRAME_H__
#ifndef GOOGLE_AIRBAG_PROCESSOR_STACK_FRAME_H__
#define GOOGLE_AIRBAG_PROCESSOR_STACK_FRAME_H__
#include <string>
#include "google/airbag_types.h"
#include "google_airbag/common/airbag_types.h"
namespace google_airbag {
@ -83,4 +83,4 @@ struct StackFrame {
} // namespace google_airbag
#endif // GOOGLE_STACK_FRAME_H__
#endif // GOOGLE_AIRBAG_PROCESSOR_STACK_FRAME_H__

View file

@ -36,11 +36,11 @@
//
// Author: Mark Mentovai
#ifndef GOOGLE_STACK_FRAME_CPU_H__
#define GOOGLE_STACK_FRAME_CPU_H__
#ifndef GOOGLE_AIRBAG_PROCESSOR_STACK_FRAME_CPU_H__
#define GOOGLE_AIRBAG_PROCESSOR_STACK_FRAME_CPU_H__
#include "google/stack_frame.h"
#include "processor/minidump_format.h"
#include "google_airbag/common/minidump_format.h"
#include "google_airbag/processor/stack_frame.h"
namespace google_airbag {
@ -100,4 +100,4 @@ struct StackFramePPC : public StackFrame {
} // namespace google_airbag
#endif // GOOGLE_STACK_FRAME_CPU_H__
#endif // GOOGLE_AIRBAG_PROCESSOR_STACK_FRAME_CPU_H__

View file

@ -38,8 +38,8 @@
// Author: Mark Mentovai
#ifndef PROCESSOR_STACKWALKER_H__
#define PROCESSOR_STACKWALKER_H__
#ifndef GOOGLE_AIRBAG_PROCESSOR_STACKWALKER_H__
#define GOOGLE_AIRBAG_PROCESSOR_STACKWALKER_H__
#include <vector>
@ -120,4 +120,4 @@ class Stackwalker {
} // namespace google_airbag
#endif // PROCESSOR_STACKWALKER_H__
#endif // GOOGLE_AIRBAG_PROCESSOR_STACKWALKER_H__

View file

@ -30,8 +30,8 @@
// The caller may implement the SymbolSupplier abstract base class
// to provide symbols for a given module.
#ifndef GOOGLE_SYMBOL_SUPPLIER_H__
#define GOOGLE_SYMBOL_SUPPLIER_H__
#ifndef GOOGLE_AIRBAG_PROCESSOR_SYMBOL_SUPPLIER_H__
#define GOOGLE_AIRBAG_PROCESSOR_SYMBOL_SUPPLIER_H__
#include <string>
@ -50,4 +50,4 @@ class SymbolSupplier {
} // namespace google_airbag
#endif // GOOGLE_SYMBOL_SUPPLIER_H__
#endif // GOOGLE_AIRBAG_PROCESSOR_SYMBOL_SUPPLIER_H__

View file

@ -33,8 +33,8 @@
//
// Author: Mark Mentovai
#include "google/call_stack.h"
#include "google/stack_frame.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/stack_frame.h"
namespace google_airbag {

View file

@ -53,7 +53,7 @@ typedef SSIZE_T ssize_t;
#include "processor/range_map-inl.h"
#include "processor/minidump.h"
#include "google_airbag/processor/minidump.h"
#include "processor/scoped_ptr.h"
@ -1408,20 +1408,21 @@ void MinidumpModule::Print() {
MinidumpModuleList::MinidumpModuleList(Minidump* minidump)
: MinidumpStream(minidump),
range_map_(),
range_map_(new RangeMap<u_int64_t, unsigned int>()),
modules_(NULL),
module_count_(0) {
}
MinidumpModuleList::~MinidumpModuleList() {
delete range_map_;
delete modules_;
}
bool MinidumpModuleList::Read(u_int32_t expected_size) {
// Invalidate cached data.
range_map_.Clear();
range_map_->Clear();
delete modules_;
modules_ = NULL;
module_count_ = 0;
@ -1460,7 +1461,7 @@ bool MinidumpModuleList::Read(u_int32_t expected_size) {
if (base_address == (u_int64_t)-1)
return false;
if (!range_map_.StoreRange(base_address, module_size, module_index))
if (!range_map_->StoreRange(base_address, module_size, module_index))
return false;
}
@ -1486,7 +1487,7 @@ MinidumpModule* MinidumpModuleList::GetModuleForAddress(u_int64_t address) {
return NULL;
unsigned int module_index;
if (!range_map_.RetrieveRange(address, &module_index, NULL, NULL))
if (!range_map_->RetrieveRange(address, &module_index, NULL, NULL))
return NULL;
return GetModuleAtIndex(module_index);
@ -1518,7 +1519,7 @@ void MinidumpModuleList::Print() {
MinidumpMemoryList::MinidumpMemoryList(Minidump* minidump)
: MinidumpStream(minidump),
range_map_(),
range_map_(new RangeMap<u_int64_t, unsigned int>()),
descriptors_(NULL),
regions_(NULL),
region_count_(0) {
@ -1526,6 +1527,7 @@ MinidumpMemoryList::MinidumpMemoryList(Minidump* minidump)
MinidumpMemoryList::~MinidumpMemoryList() {
delete range_map_;
delete descriptors_;
delete regions_;
}
@ -1537,7 +1539,7 @@ bool MinidumpMemoryList::Read(u_int32_t expected_size) {
descriptors_ = NULL;
delete regions_;
regions_ = NULL;
range_map_.Clear();
range_map_->Clear();
region_count_ = 0;
valid_ = false;
@ -1587,7 +1589,7 @@ bool MinidumpMemoryList::Read(u_int32_t expected_size) {
if (region_size == 0 || high_address < base_address)
return false;
if (!range_map_.StoreRange(base_address, region_size, region_index))
if (!range_map_->StoreRange(base_address, region_size, region_index))
return false;
(*regions)[region_index].SetDescriptor(descriptor);
@ -1617,7 +1619,7 @@ MinidumpMemoryRegion* MinidumpMemoryList::GetMemoryRegionForAddress(
return NULL;
unsigned int region_index;
if (!range_map_.RetrieveRange(address, &region_index, NULL, NULL))
if (!range_map_->RetrieveRange(address, &region_index, NULL, NULL))
return NULL;
return GetMemoryRegionAtIndex(region_index);

View file

@ -37,7 +37,7 @@
#include <string>
#include "processor/minidump.h"
#include "google_airbag/processor/minidump.h"
using std::string;

View file

@ -27,10 +27,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "google/minidump_processor.h"
#include "google/call_stack.h"
#include "google/process_state.h"
#include "processor/minidump.h"
#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 "processor/scoped_ptr.h"
#include "processor/stackwalker_x86.h"

View file

@ -31,12 +31,12 @@
// corresponding symbol file, and checks the stack frames for correctness.
#include <string>
#include "google/call_stack.h"
#include "google/minidump_processor.h"
#include "google/process_state.h"
#include "google/stack_frame.h"
#include "google/symbol_supplier.h"
#include "processor/minidump.h"
#include "google_airbag/processor/call_stack.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.h"
#include "google_airbag/processor/symbol_supplier.h"
#include "processor/scoped_ptr.h"
using std::string;

View file

@ -36,11 +36,11 @@
#include <cstdlib>
#include <string>
#include "google/call_stack.h"
#include "google/minidump_processor.h"
#include "google/process_state.h"
#include "google/stack_frame_cpu.h"
#include "processor/minidump.h"
#include "google_airbag/processor/call_stack.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 "processor/pathname_stripper.h"
#include "processor/scoped_ptr.h"
#include "processor/simple_symbol_supplier.h"

View file

@ -26,7 +26,7 @@
#include <sstream>
#include "processor/postfix_evaluator.h"
#include "processor/memory_region.h"
#include "google_airbag/processor/memory_region.h"
namespace google_airbag {

View file

@ -55,8 +55,6 @@
#include <string>
#include <vector>
#include "processor/memory_region.h"
namespace google_airbag {
using std::map;

View file

@ -22,8 +22,8 @@
#include "processor/postfix_evaluator-inl.h"
#include "google/airbag_types.h"
#include "processor/memory_region.h"
#include "google_airbag/common/airbag_types.h"
#include "google_airbag/processor/memory_region.h"
using std::map;

View file

@ -33,8 +33,8 @@
//
// Author: Mark Mentovai
#include "google/process_state.h"
#include "google/call_stack.h"
#include "google_airbag/processor/process_state.h"
#include "google_airbag/processor/call_stack.h"
namespace google_airbag {

View file

@ -34,7 +34,7 @@
// Author: Mark Mentovai
#include "processor/simple_symbol_supplier.h"
#include "processor/minidump.h"
#include "google_airbag/processor/minidump.h"
#include "processor/pathname_stripper.h"
namespace google_airbag {

View file

@ -70,7 +70,7 @@
#include <string>
#include "google/symbol_supplier.h"
#include "google_airbag/processor/symbol_supplier.h"
namespace google_airbag {

View file

@ -39,7 +39,7 @@
#include "processor/range_map-inl.h"
#include "processor/source_line_resolver.h"
#include "google/stack_frame.h"
#include "google_airbag/processor/stack_frame.h"
#include "processor/linked_ptr.h"
#include "processor/scoped_ptr.h"
#include "processor/stack_frame_info.h"

View file

@ -36,7 +36,7 @@
#include <string>
#include <ext/hash_map>
#include "google/airbag_types.h"
#include "google_airbag/common/airbag_types.h"
namespace google_airbag {

View file

@ -30,7 +30,7 @@
#include <stdio.h>
#include <string>
#include "processor/source_line_resolver.h"
#include "google/stack_frame.h"
#include "google_airbag/processor/stack_frame.h"
#include "processor/linked_ptr.h"
#include "processor/scoped_ptr.h"
#include "processor/stack_frame_info.h"

View file

@ -40,7 +40,7 @@
#include <string>
#include "google/airbag_types.h"
#include "google_airbag/common/airbag_types.h"
namespace google_airbag {

View file

@ -34,12 +34,12 @@
// Author: Mark Mentovai
#include "processor/stackwalker.h"
#include "google/call_stack.h"
#include "google/stack_frame.h"
#include "google/symbol_supplier.h"
#include "google_airbag/processor/stackwalker.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/minidump.h"
#include "google_airbag/processor/stack_frame.h"
#include "google_airbag/processor/symbol_supplier.h"
#include "processor/linked_ptr.h"
#include "processor/minidump.h"
#include "processor/scoped_ptr.h"
#include "processor/source_line_resolver.h"
#include "processor/stack_frame_info.h"

View file

@ -35,9 +35,9 @@
#include "processor/stackwalker_ppc.h"
#include "google/call_stack.h"
#include "google/stack_frame_cpu.h"
#include "processor/minidump.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/minidump.h"
#include "google_airbag/processor/stack_frame_cpu.h"
namespace google_airbag {

View file

@ -39,9 +39,9 @@
#define PROCESSOR_STACKWALKER_PPC_H__
#include "google/airbag_types.h"
#include "processor/stackwalker.h"
#include "processor/minidump_format.h"
#include "google_airbag/common/airbag_types.h"
#include "google_airbag/common/minidump_format.h"
#include "google_airbag/processor/stackwalker.h"
namespace google_airbag {

View file

@ -39,12 +39,12 @@
#include <cstdio>
#include "google/airbag_types.h"
#include "google/call_stack.h"
#include "google/stack_frame.h"
#include "google/stack_frame_cpu.h"
#include "processor/memory_region.h"
#include "processor/minidump_format.h"
#include "google_airbag/common/airbag_types.h"
#include "google_airbag/common/minidump_format.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 "processor/scoped_ptr.h"
using google_airbag::CallStack;

View file

@ -37,10 +37,10 @@
#include "processor/postfix_evaluator-inl.h"
#include "processor/stackwalker_x86.h"
#include "google/call_stack.h"
#include "google/stack_frame_cpu.h"
#include "google_airbag/processor/call_stack.h"
#include "google_airbag/processor/minidump.h"
#include "google_airbag/processor/stack_frame_cpu.h"
#include "processor/linked_ptr.h"
#include "processor/minidump.h"
#include "processor/stack_frame_info.h"
namespace google_airbag {

View file

@ -39,9 +39,9 @@
#define PROCESSOR_STACKWALKER_X86_H__
#include "google/airbag_types.h"
#include "processor/stackwalker.h"
#include "processor/minidump_format.h"
#include "google_airbag/common/airbag_types.h"
#include "google_airbag/common/minidump_format.h"
#include "google_airbag/processor/stackwalker.h"
namespace google_airbag {