blob: 57a3b3e6206c0326c48fdbbd0643b54cc79a6ff1 [file] [log] [blame]
Josh Gao76e1e302021-01-26 15:53:11 -08001syntax = "proto3";
2
Josh Gaod3df0ae2021-02-01 14:35:30 -08003option java_package = "com.android.server.os";
4option java_outer_classname = "TombstoneProtos";
5
Josh Gaofc4fb212021-02-10 16:59:50 -08006// NOTE TO OEMS:
7// If you add custom fields to this proto, do not use numbers in the reserved range.
8
Josh Gao76e1e302021-01-26 15:53:11 -08009message 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
Josh Gaodbb83de2021-03-01 23:13:13 -080022 // Process uptime in seconds.
23 uint32 process_uptime = 20;
24
Josh Gao76e1e302021-01-26 15:53:11 -080025 Signal signal_info = 10;
26 string abort_message = 14;
27 Cause cause = 15;
28
29 map<uint32, Thread> threads = 16;
30 repeated MemoryMapping memory_mappings = 17;
31 repeated LogBuffer log_buffers = 18;
32 repeated FD open_fds = 19;
Josh Gaofc4fb212021-02-10 16:59:50 -080033
Josh Gaodbb83de2021-03-01 23:13:13 -080034 reserved 21 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080035}
36
37enum Architecture {
38 ARM32 = 0;
39 ARM64 = 1;
40 X86 = 2;
41 X86_64 = 3;
Josh Gaofc4fb212021-02-10 16:59:50 -080042
43 reserved 4 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080044}
45
46message Signal {
47 int32 number = 1;
48 string name = 2;
49
50 int32 code = 3;
51 string code_name = 4;
52
53 bool has_sender = 5;
54 int32 sender_uid = 6;
55 int32 sender_pid = 7;
56
57 bool has_fault_address = 8;
58 uint64 fault_address = 9;
Josh Gaofc4fb212021-02-10 16:59:50 -080059
60 reserved 10 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080061}
62
63message Cause {
64 string human_readable = 1;
Josh Gaofc4fb212021-02-10 16:59:50 -080065
66 reserved 2 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080067}
68
69message Register {
70 string name = 1;
71 uint64 u64 = 2;
Josh Gaofc4fb212021-02-10 16:59:50 -080072
73 reserved 3 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080074}
75
76message Thread {
77 int32 id = 1;
78 string name = 2;
79 repeated Register registers = 3;
80 repeated BacktraceFrame current_backtrace = 4;
81 repeated MemoryDump memory_dump = 5;
Josh Gaofc4fb212021-02-10 16:59:50 -080082
83 reserved 6 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080084}
85
86message BacktraceFrame {
87 uint64 rel_pc = 1;
88 uint64 pc = 2;
89 uint64 sp = 3;
90
91 string function_name = 4;
92 uint64 function_offset = 5;
93
94 string file_name = 6;
95 uint64 file_map_offset = 7;
96 string build_id = 8;
Josh Gaofc4fb212021-02-10 16:59:50 -080097
98 reserved 9 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080099}
100
101message MemoryDump {
102 string register_name = 1;
103 string mapping_name = 2;
104 uint64 begin_address = 3;
105 bytes memory = 4;
Josh Gaofc4fb212021-02-10 16:59:50 -0800106
107 reserved 5 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800108}
109
110message MemoryMapping {
111 uint64 begin_address = 1;
112 uint64 end_address = 2;
113 uint64 offset = 3;
114
115 bool read = 4;
116 bool write = 5;
117 bool execute = 6;
118
119 string mapping_name = 7;
120 string build_id = 8;
121 uint64 load_bias = 9;
Josh Gaofc4fb212021-02-10 16:59:50 -0800122
123 reserved 10 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800124}
125
126message FD {
127 int32 fd = 1;
128 string path = 2;
129 string owner = 3;
130 uint64 tag = 4;
Josh Gaofc4fb212021-02-10 16:59:50 -0800131
132 reserved 5 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800133}
134
135message LogBuffer {
136 string name = 1;
137 repeated LogMessage logs = 2;
Josh Gaofc4fb212021-02-10 16:59:50 -0800138
139 reserved 3 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800140}
141
142message LogMessage {
143 string timestamp = 1;
144 uint32 pid = 2;
145 uint32 tid = 3;
146 uint32 priority = 4;
147 string tag = 5;
148 string message = 6;
Josh Gaofc4fb212021-02-10 16:59:50 -0800149
150 reserved 7 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800151}