xref: /aosp_15_r20/system/core/debuggerd/util.h (revision 00c7fec1bb09f3284aad6a6f96d2f63dfc3650ad)
1*00c7fec1SAndroid Build Coastguard Worker /*
2*00c7fec1SAndroid Build Coastguard Worker  * Copyright 2016, The Android Open Source Project
3*00c7fec1SAndroid Build Coastguard Worker  *
4*00c7fec1SAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
5*00c7fec1SAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
6*00c7fec1SAndroid Build Coastguard Worker  * You may obtain a copy of the License at
7*00c7fec1SAndroid Build Coastguard Worker  *
8*00c7fec1SAndroid Build Coastguard Worker  *     http://www.apache.org/licenses/LICENSE-2.0
9*00c7fec1SAndroid Build Coastguard Worker  *
10*00c7fec1SAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
11*00c7fec1SAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
12*00c7fec1SAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*00c7fec1SAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
14*00c7fec1SAndroid Build Coastguard Worker  * limitations under the License.
15*00c7fec1SAndroid Build Coastguard Worker  */
16*00c7fec1SAndroid Build Coastguard Worker 
17*00c7fec1SAndroid Build Coastguard Worker #pragma once
18*00c7fec1SAndroid Build Coastguard Worker 
19*00c7fec1SAndroid Build Coastguard Worker #include <functional>
20*00c7fec1SAndroid Build Coastguard Worker #include <string>
21*00c7fec1SAndroid Build Coastguard Worker #include <vector>
22*00c7fec1SAndroid Build Coastguard Worker 
23*00c7fec1SAndroid Build Coastguard Worker #include <sys/cdefs.h>
24*00c7fec1SAndroid Build Coastguard Worker #include <sys/types.h>
25*00c7fec1SAndroid Build Coastguard Worker 
26*00c7fec1SAndroid Build Coastguard Worker std::vector<std::string> get_command_line(pid_t pid);
27*00c7fec1SAndroid Build Coastguard Worker std::string get_process_name(pid_t pid);
28*00c7fec1SAndroid Build Coastguard Worker std::string get_thread_name(pid_t tid);
29*00c7fec1SAndroid Build Coastguard Worker 
30*00c7fec1SAndroid Build Coastguard Worker std::string get_timestamp();
31*00c7fec1SAndroid Build Coastguard Worker bool iterate_tids(pid_t, std::function<void(pid_t)>);
32