1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/crashreporter/google-breakpad/src/processor/proto/process_state.proto Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,207 @@ 1.4 +// Copyright (c) 2010, Google Inc. 1.5 +// All rights reserved. 1.6 +// 1.7 +// Redistribution and use in source and binary forms, with or without 1.8 +// modification, are permitted provided that the following conditions are 1.9 +// met: 1.10 +// 1.11 +// * Redistributions of source code must retain the above copyright 1.12 +// notice, this list of conditions and the following disclaimer. 1.13 +// * Redistributions in binary form must reproduce the above 1.14 +// copyright notice, this list of conditions and the following disclaimer 1.15 +// in the documentation and/or other materials provided with the 1.16 +// distribution. 1.17 +// * Neither the name of Google Inc. nor the names of its 1.18 +// contributors may be used to endorse or promote products derived from 1.19 +// this software without specific prior written permission. 1.20 +// 1.21 +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1.22 +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1.23 +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1.24 +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1.25 +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.26 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.27 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1.28 +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1.29 +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1.30 +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1.31 +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1.32 + 1.33 +// process_state_proto.proto: A client proto representation of a process, 1.34 +// in a fully-digested state. 1.35 +// 1.36 +// Derived from earlier struct and class based models of a client-side 1.37 +// processed minidump found under src/google_breakpad/processor. The 1.38 +// file process_state.h holds the top level representation of this model, 1.39 +// supported by additional classes. We've added a proto representation 1.40 +// to ease serialization and parsing for server-side storage of crash 1.41 +// reports processed on the client. 1.42 +// 1.43 +// Author: Jess Gray 1.44 + 1.45 +syntax = "proto2"; 1.46 + 1.47 +package google_breakpad; 1.48 + 1.49 +// A proto representation of a process, in a fully-digested state. 1.50 +// See src/google_breakpad/processor/process_state.h 1.51 +message ProcessStateProto { 1.52 + // Next value: 13 1.53 + 1.54 + // The time-date stamp of the original minidump (time_t format) 1.55 + optional int64 time_date_stamp = 1; 1.56 + 1.57 + message Crash { 1.58 + // The type of crash. OS- and possibly CPU- specific. For example, 1.59 + // "EXCEPTION_ACCESS_VIOLATION" (Windows), "EXC_BAD_ACCESS / 1.60 + // KERN_INVALID_ADDRESS" (Mac OS X), "SIGSEGV" (other Unix). 1.61 + required string reason = 1; 1.62 + 1.63 + // If crash_reason implicates memory, the memory address that caused the 1.64 + // crash. For data access errors, this will be the data address that 1.65 + // caused the fault. For code errors, this will be the address of the 1.66 + // instruction that caused the fault. 1.67 + required int64 address = 2; 1.68 + } 1.69 + optional Crash crash = 2; 1.70 + 1.71 + 1.72 + // If there was an assertion that was hit, a textual representation 1.73 + // of that assertion, possibly including the file and line at which 1.74 + // it occurred. 1.75 + optional string assertion = 3; 1.76 + 1.77 + // The index of the thread that requested a dump be written in the 1.78 + // threads vector. If a dump was produced as a result of a crash, this 1.79 + // will point to the thread that crashed. If the dump was produced as 1.80 + // by user code without crashing, and the dump contains extended Breakpad 1.81 + // information, this will point to the thread that requested the dump. 1.82 + optional int32 requesting_thread = 4; 1.83 + 1.84 + message Thread { 1.85 + // Stack for the given thread 1.86 + repeated StackFrame frames = 1; 1.87 + } 1.88 + 1.89 + // Stacks for each thread (except possibly the exception handler 1.90 + // thread) at the time of the crash. 1.91 + repeated Thread threads = 5; 1.92 + 1.93 + // The modules that were loaded into the process represented by the 1.94 + // ProcessState. 1.95 + repeated CodeModule modules = 6; 1.96 + 1.97 + // System Info: OS and CPU 1.98 + 1.99 + // A string identifying the operating system, such as "Windows NT", 1.100 + // "Mac OS X", or "Linux". If the information is present in the dump but 1.101 + // its value is unknown, this field will contain a numeric value. If 1.102 + // the information is not present in the dump, this field will be empty. 1.103 + optional string os = 7; 1.104 + 1.105 + // A short form of the os string, using lowercase letters and no spaces, 1.106 + // suitable for use in a filesystem. Possible values are "windows", 1.107 + // "mac", and "linux". Empty if the information is not present in the dump 1.108 + // or if the OS given by the dump is unknown. The values stored in this 1.109 + // field should match those used by MinidumpSystemInfo::GetOS. 1.110 + optional string os_short = 8; 1.111 + 1.112 + // A string identifying the version of the operating system, such as 1.113 + // "5.1.2600 Service Pack 2" or "10.4.8 8L2127". If the dump does not 1.114 + // contain this information, this field will be empty. 1.115 + optional string os_version = 9; 1.116 + 1.117 + // A string identifying the basic CPU family, such as "x86" or "ppc". 1.118 + // If this information is present in the dump but its value is unknown, 1.119 + // this field will contain a numeric value. If the information is not 1.120 + // present in the dump, this field will be empty. The values stored in 1.121 + // this field should match those used by MinidumpSystemInfo::GetCPU. 1.122 + optional string cpu = 10; 1.123 + 1.124 + // A string further identifying the specific CPU, such as 1.125 + // "GenuineIntel level 6 model 13 stepping 8". If the information is not 1.126 + // present in the dump, or additional identifying information is not 1.127 + // defined for the CPU family, this field will be empty. 1.128 + optional string cpu_info = 11; 1.129 + 1.130 + // The number of processors in the system. Will be greater than one for 1.131 + // multi-core systems. 1.132 + optional int32 cpu_count = 12; 1.133 + 1.134 + // Leave the ability to add the raw minidump to this representation 1.135 +} 1.136 + 1.137 + 1.138 +// Represents a single frame in a stack 1.139 +// See src/google_breakpad/processor/code_module.h 1.140 +message StackFrame { 1.141 + // Next value: 8 1.142 + 1.143 + // The program counter location as an absolute virtual address. For the 1.144 + // innermost called frame in a stack, this will be an exact program counter 1.145 + // or instruction pointer value. For all other frames, this will be within 1.146 + // the instruction that caused execution to branch to a called function, 1.147 + // but may not necessarily point to the exact beginning of that instruction. 1.148 + required int64 instruction = 1; 1.149 + 1.150 + // The module in which the instruction resides. 1.151 + optional CodeModule module = 2; 1.152 + 1.153 + // The function name, may be omitted if debug symbols are not available. 1.154 + optional string function_name = 3; 1.155 + 1.156 + // The start address of the function, may be omitted if debug symbols 1.157 + // are not available. 1.158 + optional int64 function_base = 4; 1.159 + 1.160 + // The source file name, may be omitted if debug symbols are not available. 1.161 + optional string source_file_name = 5; 1.162 + 1.163 + // The (1-based) source line number, may be omitted if debug symbols are 1.164 + // not available. 1.165 + optional int32 source_line = 6; 1.166 + 1.167 + // The start address of the source line, may be omitted if debug symbols 1.168 + // are not available. 1.169 + optional int64 source_line_base = 7; 1.170 +} 1.171 + 1.172 + 1.173 +// Carries information about code modules that are loaded into a process. 1.174 +// See src/google_breakpad/processor/code_module.h 1.175 +message CodeModule { 1.176 + // Next value: 8 1.177 + 1.178 + // The base address of this code module as it was loaded by the process. 1.179 + optional int64 base_address = 1; 1.180 + 1.181 + // The size of the code module. 1.182 + optional int64 size = 2; 1.183 + 1.184 + // The path or file name that the code module was loaded from. 1.185 + optional string code_file = 3; 1.186 + 1.187 + // An identifying string used to discriminate between multiple versions and 1.188 + // builds of the same code module. This may contain a uuid, timestamp, 1.189 + // version number, or any combination of this or other information, in an 1.190 + // implementation-defined format. 1.191 + optional string code_identifier = 4; 1.192 + 1.193 + // The filename containing debugging information associated with the code 1.194 + // module. If debugging information is stored in a file separate from the 1.195 + // code module itself (as is the case when .pdb or .dSYM files are used), 1.196 + // this will be different from code_file. If debugging information is 1.197 + // stored in the code module itself (possibly prior to stripping), this 1.198 + // will be the same as code_file. 1.199 + optional string debug_file = 5; 1.200 + 1.201 + // An identifying string similar to code_identifier, but identifies a 1.202 + // specific version and build of the associated debug file. This may be 1.203 + // the same as code_identifier when the debug_file and code_file are 1.204 + // identical or when the same identifier is used to identify distinct 1.205 + // debug and code files. 1.206 + optional string debug_identifier = 6; 1.207 + 1.208 + // A human-readable representation of the code module's version. 1.209 + optional string version = 7; 1.210 +}