summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Gao2016-10-18 20:17:52 -0500
committerJosh Gao2017-01-17 15:57:57 -0600
commitcbe70cb0a8cb0171f3802273050e851a47b090ed (patch)
tree87a2805f11d9fa5283fe169d9b155f5b08a94f85 /include
parent4c5c9db17b55bfcb2d62eec158440d0e794e30bb (diff)
downloadplatform-system-core-cbe70cb0a8cb0171f3802273050e851a47b090ed.tar.gz
platform-system-core-cbe70cb0a8cb0171f3802273050e851a47b090ed.tar.xz
platform-system-core-cbe70cb0a8cb0171f3802273050e851a47b090ed.zip
debuggerd: advance our amazing bet.
Remove debuggerd in favor of a helper process that gets execed by crashing processes. Bug: http://b/30705528 Test: debuggerd_test Change-Id: I9906c69473989cbf7fe5ea6cccf9a9c563d75906
Diffstat (limited to 'include')
-rw-r--r--include/cutils/debugger.h55
-rw-r--r--include/private/android_filesystem_config.h1
2 files changed, 1 insertions, 55 deletions
diff --git a/include/cutils/debugger.h b/include/cutils/debugger.h
deleted file mode 100644
index 20e8796b7..000000000
--- a/include/cutils/debugger.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef __CUTILS_DEBUGGER_H
18#define __CUTILS_DEBUGGER_H
19
20#include <sys/cdefs.h>
21#include <sys/types.h>
22
23#include "debuggerd/client.h"
24
25__BEGIN_DECLS
26
27/* Dumps a process backtrace, registers, and stack to a tombstone file (requires root).
28 * Stores the tombstone path in the provided buffer.
29 * Returns 0 on success, -1 on error.
30 */
31int dump_tombstone(pid_t tid, char* pathbuf, size_t pathlen);
32
33/* Dumps a process backtrace, registers, and stack to a tombstone file (requires root).
34 * Stores the tombstone path in the provided buffer.
35 * If reading debugger data from debuggerd ever takes longer than timeout_secs
36 * seconds, then stop and return an error.
37 * Returns 0 on success, -1 on error.
38 */
39int dump_tombstone_timeout(pid_t tid, char* pathbuf, size_t pathlen, int timeout_secs);
40
41/* Dumps a process backtrace only to the specified file (requires root).
42 * Returns 0 on success, -1 on error.
43 */
44int dump_backtrace_to_file(pid_t tid, int fd);
45
46/* Dumps a process backtrace only to the specified file (requires root).
47 * If reading debugger data from debuggerd ever takes longer than timeout_secs
48 * seconds, then stop and return an error.
49 * Returns 0 on success, -1 on error.
50 */
51int dump_backtrace_to_file_timeout(pid_t tid, int fd, int timeout_secs);
52
53__END_DECLS
54
55#endif /* __CUTILS_DEBUGGER_H */
diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h
index eb71fb82d..7db28d8f4 100644
--- a/include/private/android_filesystem_config.h
+++ b/include/private/android_filesystem_config.h
@@ -126,6 +126,7 @@
126#define AID_MEDIA_AUDIO 1055 /* GID for audio files on internal media storage */ 126#define AID_MEDIA_AUDIO 1055 /* GID for audio files on internal media storage */
127#define AID_MEDIA_VIDEO 1056 /* GID for video files on internal media storage */ 127#define AID_MEDIA_VIDEO 1056 /* GID for video files on internal media storage */
128#define AID_MEDIA_IMAGE 1057 /* GID for image files on internal media storage */ 128#define AID_MEDIA_IMAGE 1057 /* GID for image files on internal media storage */
129#define AID_TOMBSTONED 1058 /* tombstoned user */
129/* Changes to this file must be made in AOSP, *not* in internal branches. */ 130/* Changes to this file must be made in AOSP, *not* in internal branches. */
130 131
131#define AID_SHELL 2000 /* adb and debug shell user */ 132#define AID_SHELL 2000 /* adb and debug shell user */