Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
Josh Gao | d3df0ae | 2021-02-01 14:35:30 -0800 | [diff] [blame] | 3 | option java_package = "com.android.server.os"; |
| 4 | option java_outer_classname = "TombstoneProtos"; |
| 5 | |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 6 | // NOTE TO OEMS: |
| 7 | // If you add custom fields to this proto, do not use numbers in the reserved range. |
| 8 | |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 9 | message Tombstone { |
| 10 | Architecture arch = 1; |
| 11 | string build_fingerprint = 2; |
| 12 | string revision = 3; |
| 13 | string timestamp = 4; |
| 14 | |
| 15 | uint32 pid = 5; |
| 16 | uint32 tid = 6; |
| 17 | uint32 uid = 7; |
| 18 | string selinux_label = 8; |
| 19 | |
| 20 | string process_name = 9; |
| 21 | |
| 22 | Signal signal_info = 10; |
| 23 | string abort_message = 14; |
| 24 | Cause cause = 15; |
| 25 | |
| 26 | map<uint32, Thread> threads = 16; |
| 27 | repeated MemoryMapping memory_mappings = 17; |
| 28 | repeated LogBuffer log_buffers = 18; |
| 29 | repeated FD open_fds = 19; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 30 | |
| 31 | reserved 20 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | enum Architecture { |
| 35 | ARM32 = 0; |
| 36 | ARM64 = 1; |
| 37 | X86 = 2; |
| 38 | X86_64 = 3; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 39 | |
| 40 | reserved 4 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | message Signal { |
| 44 | int32 number = 1; |
| 45 | string name = 2; |
| 46 | |
| 47 | int32 code = 3; |
| 48 | string code_name = 4; |
| 49 | |
| 50 | bool has_sender = 5; |
| 51 | int32 sender_uid = 6; |
| 52 | int32 sender_pid = 7; |
| 53 | |
| 54 | bool has_fault_address = 8; |
| 55 | uint64 fault_address = 9; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 56 | |
| 57 | reserved 10 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | message Cause { |
| 61 | string human_readable = 1; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 62 | |
| 63 | reserved 2 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | message Register { |
| 67 | string name = 1; |
| 68 | uint64 u64 = 2; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 69 | |
| 70 | reserved 3 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 71 | } |
| 72 | |
| 73 | message Thread { |
| 74 | int32 id = 1; |
| 75 | string name = 2; |
| 76 | repeated Register registers = 3; |
| 77 | repeated BacktraceFrame current_backtrace = 4; |
| 78 | repeated MemoryDump memory_dump = 5; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 79 | |
| 80 | reserved 6 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 81 | } |
| 82 | |
| 83 | message BacktraceFrame { |
| 84 | uint64 rel_pc = 1; |
| 85 | uint64 pc = 2; |
| 86 | uint64 sp = 3; |
| 87 | |
| 88 | string function_name = 4; |
| 89 | uint64 function_offset = 5; |
| 90 | |
| 91 | string file_name = 6; |
| 92 | uint64 file_map_offset = 7; |
| 93 | string build_id = 8; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 94 | |
| 95 | reserved 9 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 96 | } |
| 97 | |
| 98 | message MemoryDump { |
| 99 | string register_name = 1; |
| 100 | string mapping_name = 2; |
| 101 | uint64 begin_address = 3; |
| 102 | bytes memory = 4; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 103 | |
| 104 | reserved 5 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | message MemoryMapping { |
| 108 | uint64 begin_address = 1; |
| 109 | uint64 end_address = 2; |
| 110 | uint64 offset = 3; |
| 111 | |
| 112 | bool read = 4; |
| 113 | bool write = 5; |
| 114 | bool execute = 6; |
| 115 | |
| 116 | string mapping_name = 7; |
| 117 | string build_id = 8; |
| 118 | uint64 load_bias = 9; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 119 | |
| 120 | reserved 10 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 121 | } |
| 122 | |
| 123 | message FD { |
| 124 | int32 fd = 1; |
| 125 | string path = 2; |
| 126 | string owner = 3; |
| 127 | uint64 tag = 4; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 128 | |
| 129 | reserved 5 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | message LogBuffer { |
| 133 | string name = 1; |
| 134 | repeated LogMessage logs = 2; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 135 | |
| 136 | reserved 3 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | message LogMessage { |
| 140 | string timestamp = 1; |
| 141 | uint32 pid = 2; |
| 142 | uint32 tid = 3; |
| 143 | uint32 priority = 4; |
| 144 | string tag = 5; |
| 145 | string message = 6; |
Josh Gao | fc4fb21 | 2021-02-10 16:59:50 -0800 | [diff] [blame] | 146 | |
| 147 | reserved 7 to 999; |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 148 | } |