From aeffe1056f9ff6526d87a16ef55222899f5528f7 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Wed, 6 Mar 2013 14:04:42 +0000 Subject: Use stdint types everywhere R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/google_breakpad/processor/code_module.h | 6 +- src/google_breakpad/processor/code_modules.h | 2 +- src/google_breakpad/processor/exploitability.h | 2 +- src/google_breakpad/processor/memory_region.h | 12 +- src/google_breakpad/processor/minidump.h | 176 ++++++++++----------- src/google_breakpad/processor/minidump_processor.h | 2 +- src/google_breakpad/processor/process_state.h | 8 +- .../processor/source_line_resolver_interface.h | 2 +- src/google_breakpad/processor/stack_frame.h | 8 +- src/google_breakpad/processor/stack_frame_cpu.h | 4 +- src/google_breakpad/processor/stackwalker.h | 8 +- 11 files changed, 115 insertions(+), 115 deletions(-) (limited to 'src/google_breakpad/processor') diff --git a/src/google_breakpad/processor/code_module.h b/src/google_breakpad/processor/code_module.h index 24b88fba..4e892824 100644 --- a/src/google_breakpad/processor/code_module.h +++ b/src/google_breakpad/processor/code_module.h @@ -47,11 +47,11 @@ class CodeModule { virtual ~CodeModule() {} // The base address of this code module as it was loaded by the process. - // (u_int64_t)-1 on error. - virtual u_int64_t base_address() const = 0; + // (uint64_t)-1 on error. + virtual uint64_t base_address() const = 0; // The size of the code module. 0 on error. - virtual u_int64_t size() const = 0; + virtual uint64_t size() const = 0; // The path or file name that the code module was loaded from. Empty on // error. diff --git a/src/google_breakpad/processor/code_modules.h b/src/google_breakpad/processor/code_modules.h index 29c55d4e..a38579af 100644 --- a/src/google_breakpad/processor/code_modules.h +++ b/src/google_breakpad/processor/code_modules.h @@ -53,7 +53,7 @@ class CodeModules { // address, returns NULL. Ownership of the returned CodeModule is retained // by the CodeModules object; pointers returned by this method are valid for // comparison with pointers returned by the other Get methods. - virtual const CodeModule* GetModuleForAddress(u_int64_t address) const = 0; + virtual const CodeModule* GetModuleForAddress(uint64_t address) const = 0; // Returns the module corresponding to the main executable. If there is // no main executable, returns NULL. Ownership of the returned CodeModule diff --git a/src/google_breakpad/processor/exploitability.h b/src/google_breakpad/processor/exploitability.h index 225206d7..67255a3a 100644 --- a/src/google_breakpad/processor/exploitability.h +++ b/src/google_breakpad/processor/exploitability.h @@ -54,7 +54,7 @@ class Exploitability { ProcessState *process_state); ExploitabilityRating CheckExploitability(); - bool AddressIsAscii(u_int64_t); + bool AddressIsAscii(uint64_t); protected: Exploitability(Minidump *dump, diff --git a/src/google_breakpad/processor/memory_region.h b/src/google_breakpad/processor/memory_region.h index 15e23ddc..bd9755f5 100644 --- a/src/google_breakpad/processor/memory_region.h +++ b/src/google_breakpad/processor/memory_region.h @@ -50,10 +50,10 @@ class MemoryRegion { virtual ~MemoryRegion() {} // The base address of this memory region. - virtual u_int64_t GetBase() const = 0; + virtual uint64_t GetBase() const = 0; // The size of this memory region. - virtual u_int32_t GetSize() const = 0; + virtual uint32_t GetSize() const = 0; // Access to data of various sizes within the memory region. address // is a pointer to read, and it must lie within the memory region as @@ -63,10 +63,10 @@ class MemoryRegion { // program. Returns true on success. Fails and returns false if address // is out of the region's bounds (after considering the width of value), // or for other types of errors. - virtual bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value) const =0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value) const =0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value) const =0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value) const =0; + virtual bool GetMemoryAtAddress(uint64_t address, uint8_t* value) const = 0; + virtual bool GetMemoryAtAddress(uint64_t address, uint16_t* value) const = 0; + virtual bool GetMemoryAtAddress(uint64_t address, uint32_t* value) const = 0; + virtual bool GetMemoryAtAddress(uint64_t address, uint64_t* value) const = 0; }; diff --git a/src/google_breakpad/processor/minidump.h b/src/google_breakpad/processor/minidump.h index 0fe78443..18097714 100644 --- a/src/google_breakpad/processor/minidump.h +++ b/src/google_breakpad/processor/minidump.h @@ -154,7 +154,7 @@ class MinidumpStream : public MinidumpObject { // the MDRawDirectory record or other identifying record. A class // that implements MinidumpStream can compare expected_size to a // known size as an integrity check. - virtual bool Read(u_int32_t expected_size) = 0; + virtual bool Read(uint32_t expected_size) = 0; }; @@ -176,11 +176,11 @@ class MinidumpContext : public MinidumpStream { // identifying the CPU type that the context was collected from. The // returned value will identify the CPU only, and will have any other // MD_CONTEXT_* bits masked out. Returns 0 on failure. - u_int32_t GetContextCPU() const; + uint32_t GetContextCPU() const; // A convenience method to get the instruction pointer out of the // MDRawContext, since it varies per-CPU architecture. - bool GetInstructionPointer(u_int64_t* ip) const; + bool GetInstructionPointer(uint64_t* ip) const; // Returns raw CPU-specific context data for the named CPU type. If the // context data does not match the CPU type or does not exist, returns @@ -210,13 +210,13 @@ class MinidumpContext : public MinidumpStream { } context_; // Store this separately because of the weirdo AMD64 context - u_int32_t context_flags_; + uint32_t context_flags_; private: friend class MinidumpThread; friend class MinidumpException; - bool Read(u_int32_t expected_size); + bool Read(uint32_t expected_size); // Free the CPU-specific context structure. void FreeContext(); @@ -226,7 +226,7 @@ class MinidumpContext : public MinidumpStream { // CPU type in context_cpu_type. Returns false if the CPU type does not // match. Returns true if the CPU type matches or if the minidump does // not contain a system info stream. - bool CheckAgainstSystemInfo(u_int32_t context_cpu_type); + bool CheckAgainstSystemInfo(uint32_t context_cpu_type); }; @@ -243,28 +243,28 @@ class MinidumpMemoryRegion : public MinidumpObject, public: virtual ~MinidumpMemoryRegion(); - static void set_max_bytes(u_int32_t max_bytes) { max_bytes_ = max_bytes; } - static u_int32_t max_bytes() { return max_bytes_; } + static void set_max_bytes(uint32_t max_bytes) { max_bytes_ = max_bytes; } + static uint32_t max_bytes() { return max_bytes_; } // Returns a pointer to the base of the memory region. Returns the // cached value if available, otherwise, reads the minidump file and // caches the memory region. - const u_int8_t* GetMemory() const; + const uint8_t* GetMemory() const; // The address of the base of the memory region. - u_int64_t GetBase() const; + uint64_t GetBase() const; // The size, in bytes, of the memory region. - u_int32_t GetSize() const; + uint32_t GetSize() const; // Frees the cached memory region, if cached. void FreeMemory(); // Obtains the value of memory at the pointer specified by address. - bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value) const; - bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value) const; - bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value) const; - bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value) const; + bool GetMemoryAtAddress(uint64_t address, uint8_t* value) const; + bool GetMemoryAtAddress(uint64_t address, uint16_t* value) const; + bool GetMemoryAtAddress(uint64_t address, uint32_t* value) const; + bool GetMemoryAtAddress(uint64_t address, uint64_t* value) const; // Print a human-readable representation of the object to stdout. void Print(); @@ -281,19 +281,19 @@ class MinidumpMemoryRegion : public MinidumpObject, void SetDescriptor(MDMemoryDescriptor* descriptor); // Implementation for GetMemoryAtAddress - template bool GetMemoryAtAddressInternal(u_int64_t address, + template bool GetMemoryAtAddressInternal(uint64_t address, T* value) const; // The largest memory region that will be read from a minidump. The // default is 1MB. - static u_int32_t max_bytes_; + static uint32_t max_bytes_; // Base address and size of the memory region, and its position in the // minidump file. MDMemoryDescriptor* descriptor_; // Cached memory. - mutable vector* memory_; + mutable vector* memory_; }; @@ -319,7 +319,7 @@ class MinidumpThread : public MinidumpObject { // so a special getter is provided to retrieve this data from the // MDRawThread structure. Returns false if the thread ID cannot be // determined. - virtual bool GetThreadID(u_int32_t *thread_id) const; + virtual bool GetThreadID(uint32_t *thread_id) const; // Print a human-readable representation of the object to stdout. void Print(); @@ -348,10 +348,10 @@ class MinidumpThreadList : public MinidumpStream { public: virtual ~MinidumpThreadList(); - static void set_max_threads(u_int32_t max_threads) { + static void set_max_threads(uint32_t max_threads) { max_threads_ = max_threads; } - static u_int32_t max_threads() { return max_threads_; } + static uint32_t max_threads() { return max_threads_; } virtual unsigned int thread_count() const { return valid_ ? thread_count_ : 0; @@ -361,7 +361,7 @@ class MinidumpThreadList : public MinidumpStream { virtual MinidumpThread* GetThreadAtIndex(unsigned int index) const; // Random access to threads. - MinidumpThread* GetThreadByID(u_int32_t thread_id); + MinidumpThread* GetThreadByID(uint32_t thread_id); // Print a human-readable representation of the object to stdout. void Print(); @@ -372,23 +372,23 @@ class MinidumpThreadList : public MinidumpStream { private: friend class Minidump; - typedef map IDToThreadMap; + typedef map IDToThreadMap; typedef vector MinidumpThreads; - static const u_int32_t kStreamType = MD_THREAD_LIST_STREAM; + static const uint32_t kStreamType = MD_THREAD_LIST_STREAM; - bool Read(u_int32_t aExpectedSize); + bool Read(uint32_t aExpectedSize); // The largest number of threads that will be read from a minidump. The // default is 256. - static u_int32_t max_threads_; + static uint32_t max_threads_; // Access to threads using the thread ID as the key. IDToThreadMap id_to_thread_map_; // The list of threads. MinidumpThreads* threads_; - u_int32_t thread_count_; + uint32_t thread_count_; }; @@ -401,23 +401,23 @@ class MinidumpModule : public MinidumpObject, public: virtual ~MinidumpModule(); - static void set_max_cv_bytes(u_int32_t max_cv_bytes) { + static void set_max_cv_bytes(uint32_t max_cv_bytes) { max_cv_bytes_ = max_cv_bytes; } - static u_int32_t max_cv_bytes() { return max_cv_bytes_; } + static uint32_t max_cv_bytes() { return max_cv_bytes_; } - static void set_max_misc_bytes(u_int32_t max_misc_bytes) { + static void set_max_misc_bytes(uint32_t max_misc_bytes) { max_misc_bytes_ = max_misc_bytes; } - static u_int32_t max_misc_bytes() { return max_misc_bytes_; } + static uint32_t max_misc_bytes() { return max_misc_bytes_; } const MDRawModule* module() const { return valid_ ? &module_ : NULL; } // CodeModule implementation - virtual u_int64_t base_address() const { - return valid_ ? module_.base_of_image : static_cast(-1); + virtual uint64_t base_address() const { + return valid_ ? module_.base_of_image : static_cast(-1); } - virtual u_int64_t size() const { return valid_ ? module_.size_of_image : 0; } + virtual uint64_t size() const { return valid_ ? module_.size_of_image : 0; } virtual string code_file() const; virtual string code_identifier() const; virtual string debug_file() const; @@ -426,7 +426,7 @@ class MinidumpModule : public MinidumpObject, virtual const CodeModule* Copy() const; // The CodeView record, which contains information to locate the module's - // debugging information (pdb). This is returned as u_int8_t* because + // debugging information (pdb). This is returned as uint8_t* because // the data can be of types MDCVInfoPDB20* or MDCVInfoPDB70*, or it may be // of a type unknown to Breakpad, in which case the raw data will still be // returned but no byte-swapping will have been performed. Check the @@ -435,14 +435,14 @@ class MinidumpModule : public MinidumpObject, // MDCVInfoPDB70 by default. Returns a pointer to the CodeView record on // success, and NULL on failure. On success, the optional |size| argument // is set to the size of the CodeView record. - const u_int8_t* GetCVRecord(u_int32_t* size); + const uint8_t* GetCVRecord(uint32_t* size); // The miscellaneous debug record, which is obsolete. Current toolchains // do not generate this type of debugging information (dbg), and this // field is not expected to be present. Returns a pointer to the debugging // record on success, and NULL on failure. On success, the optional |size| // argument is set to the size of the debugging record. - const MDImageDebugMisc* GetMiscRecord(u_int32_t* size); + const MDImageDebugMisc* GetMiscRecord(uint32_t* size); // Print a human-readable representation of the object to stdout. void Print(); @@ -469,8 +469,8 @@ class MinidumpModule : public MinidumpObject, // The largest number of bytes that will be read from a minidump for a // CodeView record or miscellaneous debugging record, respectively. The // default for each is 1024. - static u_int32_t max_cv_bytes_; - static u_int32_t max_misc_bytes_; + static uint32_t max_cv_bytes_; + static uint32_t max_misc_bytes_; // True after a successful Read. This is different from valid_, which is // not set true until ReadAuxiliaryData also completes successfully. @@ -490,20 +490,20 @@ class MinidumpModule : public MinidumpObject, const string* name_; // Cached CodeView record - this is MDCVInfoPDB20 or (likely) - // MDCVInfoPDB70, or possibly something else entirely. Stored as a u_int8_t + // MDCVInfoPDB70, or possibly something else entirely. Stored as a uint8_t // because the structure contains a variable-sized string and its exact // size cannot be known until it is processed. - vector* cv_record_; + vector* cv_record_; // If cv_record_ is present, cv_record_signature_ contains a copy of the // CodeView record's first four bytes, for ease of determinining the // type of structure that cv_record_ contains. - u_int32_t cv_record_signature_; + uint32_t cv_record_signature_; - // Cached MDImageDebugMisc (usually not present), stored as u_int8_t + // Cached MDImageDebugMisc (usually not present), stored as uint8_t // because the structure contains a variable-sized string and its exact // size cannot be known until it is processed. - vector* misc_record_; + vector* misc_record_; }; @@ -516,16 +516,16 @@ class MinidumpModuleList : public MinidumpStream, public: virtual ~MinidumpModuleList(); - static void set_max_modules(u_int32_t max_modules) { + static void set_max_modules(uint32_t max_modules) { max_modules_ = max_modules; } - static u_int32_t max_modules() { return max_modules_; } + static uint32_t max_modules() { return max_modules_; } // CodeModules implementation. virtual unsigned int module_count() const { return valid_ ? module_count_ : 0; } - virtual const MinidumpModule* GetModuleForAddress(u_int64_t address) const; + virtual const MinidumpModule* GetModuleForAddress(uint64_t address) const; virtual const MinidumpModule* GetMainModule() const; virtual const MinidumpModule* GetModuleAtSequence( unsigned int sequence) const; @@ -543,19 +543,19 @@ class MinidumpModuleList : public MinidumpStream, typedef vector MinidumpModules; - static const u_int32_t kStreamType = MD_MODULE_LIST_STREAM; + static const uint32_t kStreamType = MD_MODULE_LIST_STREAM; - bool Read(u_int32_t expected_size); + bool Read(uint32_t expected_size); // The largest number of modules that will be read from a minidump. The // default is 1024. - static u_int32_t max_modules_; + static uint32_t max_modules_; // Access to modules using addresses as the key. - RangeMap *range_map_; + RangeMap *range_map_; MinidumpModules *modules_; - u_int32_t module_count_; + uint32_t module_count_; }; @@ -572,10 +572,10 @@ class MinidumpMemoryList : public MinidumpStream { public: virtual ~MinidumpMemoryList(); - static void set_max_regions(u_int32_t max_regions) { + static void set_max_regions(uint32_t max_regions) { max_regions_ = max_regions; } - static u_int32_t max_regions() { return max_regions_; } + static uint32_t max_regions() { return max_regions_; } unsigned int region_count() const { return valid_ ? region_count_ : 0; } @@ -584,7 +584,7 @@ class MinidumpMemoryList : public MinidumpStream { // Random access to memory regions. Returns the region encompassing // the address identified by address. - MinidumpMemoryRegion* GetMemoryRegionForAddress(u_int64_t address); + MinidumpMemoryRegion* GetMemoryRegionForAddress(uint64_t address); // Print a human-readable representation of the object to stdout. void Print(); @@ -595,18 +595,18 @@ class MinidumpMemoryList : public MinidumpStream { typedef vector MemoryDescriptors; typedef vector MemoryRegions; - static const u_int32_t kStreamType = MD_MEMORY_LIST_STREAM; + static const uint32_t kStreamType = MD_MEMORY_LIST_STREAM; explicit MinidumpMemoryList(Minidump* minidump); - bool Read(u_int32_t expected_size); + bool Read(uint32_t expected_size); // The largest number of memory regions that will be read from a minidump. // The default is 256. - static u_int32_t max_regions_; + static uint32_t max_regions_; // Access to memory regions using addresses as the key. - RangeMap *range_map_; + RangeMap *range_map_; // The list of descriptors. This is maintained separately from the list // of regions, because MemoryRegion doesn't own its MemoryDescriptor, it @@ -616,7 +616,7 @@ class MinidumpMemoryList : public MinidumpStream { // The list of regions. MemoryRegions *regions_; - u_int32_t region_count_; + uint32_t region_count_; }; @@ -638,7 +638,7 @@ class MinidumpException : public MinidumpStream { // so a special getter is provided to retrieve this data from the // MDRawExceptionStream structure. Returns false if the thread ID cannot // be determined. - bool GetThreadID(u_int32_t *thread_id) const; + bool GetThreadID(uint32_t *thread_id) const; MinidumpContext* GetContext(); @@ -648,11 +648,11 @@ class MinidumpException : public MinidumpStream { private: friend class Minidump; - static const u_int32_t kStreamType = MD_EXCEPTION_STREAM; + static const uint32_t kStreamType = MD_EXCEPTION_STREAM; explicit MinidumpException(Minidump* minidump); - bool Read(u_int32_t expected_size); + bool Read(uint32_t expected_size); MDRawExceptionStream exception_; MinidumpContext* context_; @@ -686,11 +686,11 @@ class MinidumpAssertion : public MinidumpStream { private: friend class Minidump; - static const u_int32_t kStreamType = MD_ASSERTION_INFO_STREAM; + static const uint32_t kStreamType = MD_ASSERTION_INFO_STREAM; explicit MinidumpAssertion(Minidump* minidump); - bool Read(u_int32_t expected_size); + bool Read(uint32_t expected_size); MDRawAssertionInfo assertion_; string expression_; @@ -743,9 +743,9 @@ class MinidumpSystemInfo : public MinidumpStream { private: friend class Minidump; - static const u_int32_t kStreamType = MD_SYSTEM_INFO_STREAM; + static const uint32_t kStreamType = MD_SYSTEM_INFO_STREAM; - bool Read(u_int32_t expected_size); + bool Read(uint32_t expected_size); // A string identifying the CPU vendor, if known. const string* cpu_vendor_; @@ -767,11 +767,11 @@ class MinidumpMiscInfo : public MinidumpStream { private: friend class Minidump; - static const u_int32_t kStreamType = MD_MISC_INFO_STREAM; + static const uint32_t kStreamType = MD_MISC_INFO_STREAM; explicit MinidumpMiscInfo(Minidump* minidump_); - bool Read(u_int32_t expected_size_); + bool Read(uint32_t expected_size_); MDRawMiscInfo misc_info_; }; @@ -790,8 +790,8 @@ class MinidumpBreakpadInfo : public MinidumpStream { // treatment, so special getters are provided to retrieve this data from // the MDRawBreakpadInfo structure. The getters return false if the thread // IDs cannot be determined. - bool GetDumpThreadID(u_int32_t *thread_id) const; - bool GetRequestingThreadID(u_int32_t *thread_id) const; + bool GetDumpThreadID(uint32_t *thread_id) const; + bool GetRequestingThreadID(uint32_t *thread_id) const; // Print a human-readable representation of the object to stdout. void Print(); @@ -799,11 +799,11 @@ class MinidumpBreakpadInfo : public MinidumpStream { private: friend class Minidump; - static const u_int32_t kStreamType = MD_BREAKPAD_INFO_STREAM; + static const uint32_t kStreamType = MD_BREAKPAD_INFO_STREAM; explicit MinidumpBreakpadInfo(Minidump* minidump_); - bool Read(u_int32_t expected_size_); + bool Read(uint32_t expected_size_); MDRawBreakpadInfo breakpad_info_; }; @@ -816,10 +816,10 @@ class MinidumpMemoryInfo : public MinidumpObject { const MDRawMemoryInfo* info() const { return valid_ ? &memory_info_ : NULL; } // The address of the base of the memory region. - u_int64_t GetBase() const { return valid_ ? memory_info_.base_address : 0; } + uint64_t GetBase() const { return valid_ ? memory_info_.base_address : 0; } // The size, in bytes, of the memory region. - u_int32_t GetSize() const { return valid_ ? memory_info_.region_size : 0; } + uint32_t GetSize() const { return valid_ ? memory_info_.region_size : 0; } // Return true if the memory protection allows execution. bool IsExecutable() const; @@ -854,7 +854,7 @@ class MinidumpMemoryInfoList : public MinidumpStream { unsigned int info_count() const { return valid_ ? info_count_ : 0; } - const MinidumpMemoryInfo* GetMemoryInfoForAddress(u_int64_t address) const; + const MinidumpMemoryInfo* GetMemoryInfoForAddress(uint64_t address) const; const MinidumpMemoryInfo* GetMemoryInfoAtIndex(unsigned int index) const; // Print a human-readable representation of the object to stdout. @@ -865,17 +865,17 @@ class MinidumpMemoryInfoList : public MinidumpStream { typedef vector MinidumpMemoryInfos; - static const u_int32_t kStreamType = MD_MEMORY_INFO_LIST_STREAM; + static const uint32_t kStreamType = MD_MEMORY_INFO_LIST_STREAM; explicit MinidumpMemoryInfoList(Minidump* minidump); - bool Read(u_int32_t expected_size); + bool Read(uint32_t expected_size); // Access to memory info using addresses as the key. - RangeMap *range_map_; + RangeMap *range_map_; MinidumpMemoryInfos* infos_; - u_int32_t info_count_; + uint32_t info_count_; }; @@ -896,15 +896,15 @@ class Minidump { virtual string path() const { return path_; } - static void set_max_streams(u_int32_t max_streams) { + static void set_max_streams(uint32_t max_streams) { max_streams_ = max_streams; } - static u_int32_t max_streams() { return max_streams_; } + static uint32_t max_streams() { return max_streams_; } - static void set_max_string_length(u_int32_t max_string_length) { + static void set_max_string_length(uint32_t max_string_length) { max_string_length_ = max_string_length; } - static u_int32_t max_string_length() { return max_string_length_; } + static uint32_t max_string_length() { return max_string_length_; } virtual const MDRawHeader* header() const { return valid_ ? &header_ : NULL; } @@ -916,7 +916,7 @@ class Minidump { // Returns true if the current position in the stream was not changed. // Returns false when the current location in the stream was changed and the // attempt to restore the original position failed. - bool GetContextCPUFlagsFromSystemInfo(u_int32_t* context_cpu_flags); + bool GetContextCPUFlagsFromSystemInfo(uint32_t* context_cpu_flags); // Reads the minidump file's header and top-level stream directory. // The minidump is expected to be positioned at the beginning of the @@ -980,7 +980,7 @@ class Minidump { // possibility, and consider using GetDirectoryEntryAtIndex (possibly // with GetDirectoryEntryCount) if expecting multiple streams of the same // type in a single minidump file. - bool SeekToStreamType(u_int32_t stream_type, u_int32_t* stream_length); + bool SeekToStreamType(uint32_t stream_type, uint32_t* stream_length); bool swap() const { return valid_ ? swap_ : false; } @@ -1003,7 +1003,7 @@ class Minidump { }; typedef vector MinidumpDirectoryEntries; - typedef map MinidumpStreamMap; + typedef map MinidumpStreamMap; template T* GetStream(T** stream); @@ -1013,7 +1013,7 @@ class Minidump { // The largest number of top-level streams that will be read from a minidump. // Note that streams are only read (and only consume memory) as needed, // when directed by the caller. The default is 128. - static u_int32_t max_streams_; + static uint32_t max_streams_; // The maximum length of a UTF-16 string that will be read from a minidump // in 16-bit words. The default is 1024. UTF-16 strings are converted diff --git a/src/google_breakpad/processor/minidump_processor.h b/src/google_breakpad/processor/minidump_processor.h index 0e10f40b..33cd0206 100644 --- a/src/google_breakpad/processor/minidump_processor.h +++ b/src/google_breakpad/processor/minidump_processor.h @@ -131,7 +131,7 @@ class MinidumpProcessor { // address when the crash was caused by problems such as illegal // instructions or divisions by zero, or a data address when the crash // was caused by a memory access violation. - static string GetCrashReason(Minidump* dump, u_int64_t* address); + static string GetCrashReason(Minidump* dump, uint64_t* address); // This function returns true if the passed-in error code is // something unrecoverable(i.e. retry should not happen). For diff --git a/src/google_breakpad/processor/process_state.h b/src/google_breakpad/processor/process_state.h index 8d71457b..780cb548 100644 --- a/src/google_breakpad/processor/process_state.h +++ b/src/google_breakpad/processor/process_state.h @@ -94,10 +94,10 @@ class ProcessState { void Clear(); // Accessors. See the data declarations below. - u_int32_t time_date_stamp() const { return time_date_stamp_; } + uint32_t time_date_stamp() const { return time_date_stamp_; } bool crashed() const { return crashed_; } string crash_reason() const { return crash_reason_; } - u_int64_t crash_address() const { return crash_address_; } + uint64_t crash_address() const { return crash_address_; } string assertion() const { return assertion_; } int requesting_thread() const { return requesting_thread_; } const vector* threads() const { return &threads_; } @@ -113,7 +113,7 @@ class ProcessState { friend class MinidumpProcessor; // The time-date stamp of the minidump (time_t format) - u_int32_t time_date_stamp_; + uint32_t time_date_stamp_; // True if the process crashed, false if the dump was produced outside // of an exception handler. @@ -129,7 +129,7 @@ class ProcessState { // the memory address that caused the crash. For data access errors, // this will be the data address that caused the fault. For code errors, // this will be the address of the instruction that caused the fault. - u_int64_t crash_address_; + uint64_t crash_address_; // If there was an assertion that was hit, a textual representation // of that assertion, possibly including the file and line at which diff --git a/src/google_breakpad/processor/source_line_resolver_interface.h b/src/google_breakpad/processor/source_line_resolver_interface.h index 4e9dd4b7..7b69b0d3 100644 --- a/src/google_breakpad/processor/source_line_resolver_interface.h +++ b/src/google_breakpad/processor/source_line_resolver_interface.h @@ -48,7 +48,7 @@ class CFIFrameInfo; class SourceLineResolverInterface { public: - typedef u_int64_t MemAddr; + typedef uint64_t MemAddr; virtual ~SourceLineResolverInterface() {} diff --git a/src/google_breakpad/processor/stack_frame.h b/src/google_breakpad/processor/stack_frame.h index e8803804..23e69bb4 100644 --- a/src/google_breakpad/processor/stack_frame.h +++ b/src/google_breakpad/processor/stack_frame.h @@ -85,7 +85,7 @@ struct StackFrame { // Return the actual return address, as saved on the stack or in a // register. See the comments for 'instruction', below, for details. - virtual u_int64_t ReturnAddress() const { return instruction; } + virtual uint64_t ReturnAddress() const { return instruction; } // The program counter location as an absolute virtual address. // @@ -108,7 +108,7 @@ struct StackFrame { // a register is fine for looking up the point of the call. On others, it // requires adjustment. ReturnAddress returns the address as saved by the // machine. - u_int64_t instruction; + uint64_t instruction; // The module in which the instruction resides. const CodeModule *module; @@ -118,7 +118,7 @@ struct StackFrame { // The start address of the function, may be omitted if debug symbols // are not available. - u_int64_t function_base; + uint64_t function_base; // The source file name, may be omitted if debug symbols are not available. string source_file_name; @@ -129,7 +129,7 @@ struct StackFrame { // The start address of the source line, may be omitted if debug symbols // are not available. - u_int64_t source_line_base; + uint64_t source_line_base; // Amount of trust the stack walker has in the instruction pointer // of this frame. diff --git a/src/google_breakpad/processor/stack_frame_cpu.h b/src/google_breakpad/processor/stack_frame_cpu.h index 34171f37..a9cf99b7 100644 --- a/src/google_breakpad/processor/stack_frame_cpu.h +++ b/src/google_breakpad/processor/stack_frame_cpu.h @@ -78,7 +78,7 @@ struct StackFrameX86 : public StackFrame { ~StackFrameX86(); // Overriden to return the return address as saved on the stack. - virtual u_int64_t ReturnAddress() const; + virtual uint64_t ReturnAddress() const; // Register state. This is only fully valid for the topmost frame in a // stack. In other frames, the values of nonvolatile registers may be @@ -151,7 +151,7 @@ struct StackFrameAMD64 : public StackFrame { StackFrameAMD64() : context(), context_validity(CONTEXT_VALID_NONE) {} // Overriden to return the return address as saved on the stack. - virtual u_int64_t ReturnAddress() const; + virtual uint64_t ReturnAddress() const; // Register state. This is only fully valid for the topmost frame in a // stack. In other frames, which registers are present depends on what diff --git a/src/google_breakpad/processor/stackwalker.h b/src/google_breakpad/processor/stackwalker.h index 401c2f62..9e678e3c 100644 --- a/src/google_breakpad/processor/stackwalker.h +++ b/src/google_breakpad/processor/stackwalker.h @@ -78,8 +78,8 @@ class Stackwalker { const CodeModules* modules, StackFrameSymbolizer* resolver_helper); - static void set_max_frames(u_int32_t max_frames) { max_frames_ = max_frames; } - static u_int32_t max_frames() { return max_frames_; } + static void set_max_frames(uint32_t max_frames) { max_frames_ = max_frames; } + static uint32_t max_frames() { return max_frames_; } protected: // system_info identifies the operating system, NULL or empty if unknown. @@ -104,7 +104,7 @@ class Stackwalker { // * This address is within a loaded module for which we have symbols, // and falls inside a function in that module. // Returns false otherwise. - bool InstructionAddressSeemsValid(u_int64_t address); + bool InstructionAddressSeemsValid(uint64_t address); // The default number of words to search through on the stack // for a return address. @@ -185,7 +185,7 @@ class Stackwalker { // The maximum number of frames Stackwalker will walk through. // This defaults to 1024 to prevent infinite loops. - static u_int32_t max_frames_; + static uint32_t max_frames_; }; } // namespace google_breakpad -- cgit v1.2.1