1// Copyright 2010 Google LLC 2// 3// Redistribution and use in source and binary forms, with or without 4// modification, are permitted provided that the following conditions are 5// met: 6// 7// * Redistributions of source code must retain the above copyright 8// notice, this list of conditions and the following disclaimer. 9// * Redistributions in binary form must reproduce the above 10// copyright notice, this list of conditions and the following disclaimer 11// in the documentation and/or other materials provided with the 12// distribution. 13// * Neither the name of Google LLC nor the names of its 14// contributors may be used to endorse or promote products derived from 15// this software without specific prior written permission. 16// 17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 29// process_state_proto.proto: A client proto representation of a process, 30// in a fully-digested state. 31// 32// Derived from earlier struct and class based models of a client-side 33// processed minidump found under src/google_breakpad/processor. The 34// file process_state.h holds the top level representation of this model, 35// supported by additional classes. We've added a proto representation 36// to ease serialization and parsing for server-side storage of crash 37// reports processed on the client. 38// 39// Author: Jess Gray 40 41syntax = "proto2"; 42 43package google_breakpad; 44 45// A proto representation of a process, in a fully-digested state. 46// See src/google_breakpad/processor/process_state.h 47message ProcessStateProto { 48 // Next value: 14 49 50 // The time-date stamp of the original minidump (time_t format) 51 optional int64 time_date_stamp = 1; 52 53 // The time-date stamp when the process was created (time_t format) 54 optional int64 process_create_time = 13; 55 56 message Crash { 57 // The type of crash. OS- and possibly CPU- specific. For example, 58 // "EXCEPTION_ACCESS_VIOLATION" (Windows), "EXC_BAD_ACCESS / 59 // KERN_INVALID_ADDRESS" (Mac OS X), "SIGSEGV" (other Unix). 60 required string reason = 1; 61 62 // If crash_reason implicates memory, the memory address that caused the 63 // crash. For data access errors, this will be the data address that 64 // caused the fault. For code errors, this will be the address of the 65 // instruction that caused the fault. 66 required int64 address = 2; 67 } 68 optional Crash crash = 2; 69 70 71 // If there was an assertion that was hit, a textual representation 72 // of that assertion, possibly including the file and line at which 73 // it occurred. 74 optional string assertion = 3; 75 76 // The index of the thread that requested a dump be written in the 77 // threads vector. If a dump was produced as a result of a crash, this 78 // will point to the thread that crashed. If the dump was produced as 79 // by user code without crashing, and the dump contains extended Breakpad 80 // information, this will point to the thread that requested the dump. 81 optional int32 requesting_thread = 4; 82 83 message Thread { 84 // Stack for the given thread 85 repeated StackFrame frames = 1; 86 } 87 88 // Stacks for each thread (except possibly the exception handler 89 // thread) at the time of the crash. 90 repeated Thread threads = 5; 91 92 // The modules that were loaded into the process represented by the 93 // ProcessState. 94 repeated CodeModule modules = 6; 95 96 // System Info: OS and CPU 97 98 // A string identifying the operating system, such as "Windows NT", 99 // "Mac OS X", or "Linux". If the information is present in the dump but 100 // its value is unknown, this field will contain a numeric value. If 101 // the information is not present in the dump, this field will be empty. 102 optional string os = 7; 103 104 // A short form of the os string, using lowercase letters and no spaces, 105 // suitable for use in a filesystem. Possible values are "windows", 106 // "mac", and "linux". Empty if the information is not present in the dump 107 // or if the OS given by the dump is unknown. The values stored in this 108 // field should match those used by MinidumpSystemInfo::GetOS. 109 optional string os_short = 8; 110 111 // A string identifying the version of the operating system, such as 112 // "5.1.2600 Service Pack 2" or "10.4.8 8L2127". If the dump does not 113 // contain this information, this field will be empty. 114 optional string os_version = 9; 115 116 // A string identifying the basic CPU family, such as "x86" or "ppc". 117 // If this information is present in the dump but its value is unknown, 118 // this field will contain a numeric value. If the information is not 119 // present in the dump, this field will be empty. The values stored in 120 // this field should match those used by MinidumpSystemInfo::GetCPU. 121 optional string cpu = 10; 122 123 // A string further identifying the specific CPU, such as 124 // "GenuineIntel level 6 model 13 stepping 8". If the information is not 125 // present in the dump, or additional identifying information is not 126 // defined for the CPU family, this field will be empty. 127 optional string cpu_info = 11; 128 129 // The number of processors in the system. Will be greater than one for 130 // multi-core systems. 131 optional int32 cpu_count = 12; 132 133 // Leave the ability to add the raw minidump to this representation 134} 135 136 137// Represents a single frame in a stack 138// See src/google_breakpad/processor/code_module.h 139message StackFrame { 140 // Next value: 8 141 142 // The program counter location as an absolute virtual address. For the 143 // innermost called frame in a stack, this will be an exact program counter 144 // or instruction pointer value. For all other frames, this will be within 145 // the instruction that caused execution to branch to a called function, 146 // but may not necessarily point to the exact beginning of that instruction. 147 required int64 instruction = 1; 148 149 // The module in which the instruction resides. 150 optional CodeModule module = 2; 151 152 // The function name, may be omitted if debug symbols are not available. 153 optional string function_name = 3; 154 155 // The start address of the function, may be omitted if debug symbols 156 // are not available. 157 optional int64 function_base = 4; 158 159 // The source file name, may be omitted if debug symbols are not available. 160 optional string source_file_name = 5; 161 162 // The (1-based) source line number, may be omitted if debug symbols are 163 // not available. 164 optional int32 source_line = 6; 165 166 // The start address of the source line, may be omitted if debug symbols 167 // are not available. 168 optional int64 source_line_base = 7; 169} 170 171 172// Carries information about code modules that are loaded into a process. 173// See src/google_breakpad/processor/code_module.h 174message CodeModule { 175 // Next value: 8 176 177 // The base address of this code module as it was loaded by the process. 178 optional int64 base_address = 1; 179 180 // The size of the code module. 181 optional int64 size = 2; 182 183 // The path or file name that the code module was loaded from. 184 optional string code_file = 3; 185 186 // An identifying string used to discriminate between multiple versions and 187 // builds of the same code module. This may contain a uuid, timestamp, 188 // version number, or any combination of this or other information, in an 189 // implementation-defined format. 190 optional string code_identifier = 4; 191 192 // The filename containing debugging information associated with the code 193 // module. If debugging information is stored in a file separate from the 194 // code module itself (as is the case when .pdb or .dSYM files are used), 195 // this will be different from code_file. If debugging information is 196 // stored in the code module itself (possibly prior to stripping), this 197 // will be the same as code_file. 198 optional string debug_file = 5; 199 200 // An identifying string similar to code_identifier, but identifies a 201 // specific version and build of the associated debug file. This may be 202 // the same as code_identifier when the debug_file and code_file are 203 // identical or when the same identifier is used to identify distinct 204 // debug and code files. 205 optional string debug_identifier = 6; 206 207 // A human-readable representation of the code module's version. 208 optional string version = 7; 209} 210