michael@0: // Copyright (c) 2010, Google Inc. michael@0: // All rights reserved. michael@0: // michael@0: // Redistribution and use in source and binary forms, with or without michael@0: // modification, are permitted provided that the following conditions are michael@0: // met: michael@0: // michael@0: // * Redistributions of source code must retain the above copyright michael@0: // notice, this list of conditions and the following disclaimer. michael@0: // * Redistributions in binary form must reproduce the above michael@0: // copyright notice, this list of conditions and the following disclaimer michael@0: // in the documentation and/or other materials provided with the michael@0: // distribution. michael@0: // * Neither the name of Google Inc. nor the names of its michael@0: // contributors may be used to endorse or promote products derived from michael@0: // this software without specific prior written permission. michael@0: // michael@0: // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS michael@0: // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT michael@0: // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR michael@0: // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT michael@0: // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@0: // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@0: // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, michael@0: // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY michael@0: // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT michael@0: // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE michael@0: // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. michael@0: michael@0: // process_state_proto.proto: A client proto representation of a process, michael@0: // in a fully-digested state. michael@0: // michael@0: // Derived from earlier struct and class based models of a client-side michael@0: // processed minidump found under src/google_breakpad/processor. The michael@0: // file process_state.h holds the top level representation of this model, michael@0: // supported by additional classes. We've added a proto representation michael@0: // to ease serialization and parsing for server-side storage of crash michael@0: // reports processed on the client. michael@0: // michael@0: // Author: Jess Gray michael@0: michael@0: syntax = "proto2"; michael@0: michael@0: package google_breakpad; michael@0: michael@0: // A proto representation of a process, in a fully-digested state. michael@0: // See src/google_breakpad/processor/process_state.h michael@0: message ProcessStateProto { michael@0: // Next value: 13 michael@0: michael@0: // The time-date stamp of the original minidump (time_t format) michael@0: optional int64 time_date_stamp = 1; michael@0: michael@0: message Crash { michael@0: // The type of crash. OS- and possibly CPU- specific. For example, michael@0: // "EXCEPTION_ACCESS_VIOLATION" (Windows), "EXC_BAD_ACCESS / michael@0: // KERN_INVALID_ADDRESS" (Mac OS X), "SIGSEGV" (other Unix). michael@0: required string reason = 1; michael@0: michael@0: // If crash_reason implicates memory, the memory address that caused the michael@0: // crash. For data access errors, this will be the data address that michael@0: // caused the fault. For code errors, this will be the address of the michael@0: // instruction that caused the fault. michael@0: required int64 address = 2; michael@0: } michael@0: optional Crash crash = 2; michael@0: michael@0: michael@0: // If there was an assertion that was hit, a textual representation michael@0: // of that assertion, possibly including the file and line at which michael@0: // it occurred. michael@0: optional string assertion = 3; michael@0: michael@0: // The index of the thread that requested a dump be written in the michael@0: // threads vector. If a dump was produced as a result of a crash, this michael@0: // will point to the thread that crashed. If the dump was produced as michael@0: // by user code without crashing, and the dump contains extended Breakpad michael@0: // information, this will point to the thread that requested the dump. michael@0: optional int32 requesting_thread = 4; michael@0: michael@0: message Thread { michael@0: // Stack for the given thread michael@0: repeated StackFrame frames = 1; michael@0: } michael@0: michael@0: // Stacks for each thread (except possibly the exception handler michael@0: // thread) at the time of the crash. michael@0: repeated Thread threads = 5; michael@0: michael@0: // The modules that were loaded into the process represented by the michael@0: // ProcessState. michael@0: repeated CodeModule modules = 6; michael@0: michael@0: // System Info: OS and CPU michael@0: michael@0: // A string identifying the operating system, such as "Windows NT", michael@0: // "Mac OS X", or "Linux". If the information is present in the dump but michael@0: // its value is unknown, this field will contain a numeric value. If michael@0: // the information is not present in the dump, this field will be empty. michael@0: optional string os = 7; michael@0: michael@0: // A short form of the os string, using lowercase letters and no spaces, michael@0: // suitable for use in a filesystem. Possible values are "windows", michael@0: // "mac", and "linux". Empty if the information is not present in the dump michael@0: // or if the OS given by the dump is unknown. The values stored in this michael@0: // field should match those used by MinidumpSystemInfo::GetOS. michael@0: optional string os_short = 8; michael@0: michael@0: // A string identifying the version of the operating system, such as michael@0: // "5.1.2600 Service Pack 2" or "10.4.8 8L2127". If the dump does not michael@0: // contain this information, this field will be empty. michael@0: optional string os_version = 9; michael@0: michael@0: // A string identifying the basic CPU family, such as "x86" or "ppc". michael@0: // If this information is present in the dump but its value is unknown, michael@0: // this field will contain a numeric value. If the information is not michael@0: // present in the dump, this field will be empty. The values stored in michael@0: // this field should match those used by MinidumpSystemInfo::GetCPU. michael@0: optional string cpu = 10; michael@0: michael@0: // A string further identifying the specific CPU, such as michael@0: // "GenuineIntel level 6 model 13 stepping 8". If the information is not michael@0: // present in the dump, or additional identifying information is not michael@0: // defined for the CPU family, this field will be empty. michael@0: optional string cpu_info = 11; michael@0: michael@0: // The number of processors in the system. Will be greater than one for michael@0: // multi-core systems. michael@0: optional int32 cpu_count = 12; michael@0: michael@0: // Leave the ability to add the raw minidump to this representation michael@0: } michael@0: michael@0: michael@0: // Represents a single frame in a stack michael@0: // See src/google_breakpad/processor/code_module.h michael@0: message StackFrame { michael@0: // Next value: 8 michael@0: michael@0: // The program counter location as an absolute virtual address. For the michael@0: // innermost called frame in a stack, this will be an exact program counter michael@0: // or instruction pointer value. For all other frames, this will be within michael@0: // the instruction that caused execution to branch to a called function, michael@0: // but may not necessarily point to the exact beginning of that instruction. michael@0: required int64 instruction = 1; michael@0: michael@0: // The module in which the instruction resides. michael@0: optional CodeModule module = 2; michael@0: michael@0: // The function name, may be omitted if debug symbols are not available. michael@0: optional string function_name = 3; michael@0: michael@0: // The start address of the function, may be omitted if debug symbols michael@0: // are not available. michael@0: optional int64 function_base = 4; michael@0: michael@0: // The source file name, may be omitted if debug symbols are not available. michael@0: optional string source_file_name = 5; michael@0: michael@0: // The (1-based) source line number, may be omitted if debug symbols are michael@0: // not available. michael@0: optional int32 source_line = 6; michael@0: michael@0: // The start address of the source line, may be omitted if debug symbols michael@0: // are not available. michael@0: optional int64 source_line_base = 7; michael@0: } michael@0: michael@0: michael@0: // Carries information about code modules that are loaded into a process. michael@0: // See src/google_breakpad/processor/code_module.h michael@0: message CodeModule { michael@0: // Next value: 8 michael@0: michael@0: // The base address of this code module as it was loaded by the process. michael@0: optional int64 base_address = 1; michael@0: michael@0: // The size of the code module. michael@0: optional int64 size = 2; michael@0: michael@0: // The path or file name that the code module was loaded from. michael@0: optional string code_file = 3; michael@0: michael@0: // An identifying string used to discriminate between multiple versions and michael@0: // builds of the same code module. This may contain a uuid, timestamp, michael@0: // version number, or any combination of this or other information, in an michael@0: // implementation-defined format. michael@0: optional string code_identifier = 4; michael@0: michael@0: // The filename containing debugging information associated with the code michael@0: // module. If debugging information is stored in a file separate from the michael@0: // code module itself (as is the case when .pdb or .dSYM files are used), michael@0: // this will be different from code_file. If debugging information is michael@0: // stored in the code module itself (possibly prior to stripping), this michael@0: // will be the same as code_file. michael@0: optional string debug_file = 5; michael@0: michael@0: // An identifying string similar to code_identifier, but identifies a michael@0: // specific version and build of the associated debug file. This may be michael@0: // the same as code_identifier when the debug_file and code_file are michael@0: // identical or when the same identifier is used to identify distinct michael@0: // debug and code files. michael@0: optional string debug_identifier = 6; michael@0: michael@0: // A human-readable representation of the code module's version. michael@0: optional string version = 7; michael@0: }