blob: 2c7156bcb3d61ba4d8662e19ba53fe30d5618a1d [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
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 Gaofc4fb212021-02-10 16:59:50 -080030
31 reserved 20 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080032}
33
34enum Architecture {
35 ARM32 = 0;
36 ARM64 = 1;
37 X86 = 2;
38 X86_64 = 3;
Josh Gaofc4fb212021-02-10 16:59:50 -080039
40 reserved 4 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080041}
42
43message 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 Gaofc4fb212021-02-10 16:59:50 -080056
57 reserved 10 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080058}
59
60message Cause {
61 string human_readable = 1;
Josh Gaofc4fb212021-02-10 16:59:50 -080062
63 reserved 2 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080064}
65
66message Register {
67 string name = 1;
68 uint64 u64 = 2;
Josh Gaofc4fb212021-02-10 16:59:50 -080069
70 reserved 3 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080071}
72
73message 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 Gaofc4fb212021-02-10 16:59:50 -080079
80 reserved 6 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080081}
82
83message 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 Gaofc4fb212021-02-10 16:59:50 -080094
95 reserved 9 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -080096}
97
98message MemoryDump {
99 string register_name = 1;
100 string mapping_name = 2;
101 uint64 begin_address = 3;
102 bytes memory = 4;
Josh Gaofc4fb212021-02-10 16:59:50 -0800103
104 reserved 5 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800105}
106
107message 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 Gaofc4fb212021-02-10 16:59:50 -0800119
120 reserved 10 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800121}
122
123message FD {
124 int32 fd = 1;
125 string path = 2;
126 string owner = 3;
127 uint64 tag = 4;
Josh Gaofc4fb212021-02-10 16:59:50 -0800128
129 reserved 5 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800130}
131
132message LogBuffer {
133 string name = 1;
134 repeated LogMessage logs = 2;
Josh Gaofc4fb212021-02-10 16:59:50 -0800135
136 reserved 3 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800137}
138
139message 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 Gaofc4fb212021-02-10 16:59:50 -0800146
147 reserved 7 to 999;
Josh Gao76e1e302021-01-26 15:53:11 -0800148}