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