summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2015-01-13 19:07:12 -0800
committerChristopher Ferris <cferris@google.com>2015-01-14 15:24:33 -0800
commit5f2ff6a9106083e2a79b8600a0bf6a5341c6ca38 (patch)
tree61eaf30da95ea0ec85df406eda8ffc2805fb6ba5 /include
parentf2bd3fdd190fc1234913febfe254f8bcc4e675da (diff)
downloadsystem_core-5f2ff6a9106083e2a79b8600a0bf6a5341c6ca38.zip
system_core-5f2ff6a9106083e2a79b8600a0bf6a5341c6ca38.tar.gz
system_core-5f2ff6a9106083e2a79b8600a0bf6a5341c6ca38.tar.bz2
Add timed versions of stack dumping functions.
Under some unknown circumstances, debuggerd could become unresponsive. If you try and take a bugreport during this time, it will hang forever. Adding functions that have a timeout will allow dumpstate to stop if dumping is taking too long. Bug: 18766581 Change-Id: I85053b8dcfe6224e2b64b4d8f7f2ef448b3cda34
Diffstat (limited to 'include')
-rw-r--r--include/cutils/debugger.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/cutils/debugger.h b/include/cutils/debugger.h
index 4bcc8e6..bae687d 100644
--- a/include/cutils/debugger.h
+++ b/include/cutils/debugger.h
@@ -64,11 +64,26 @@ typedef struct {
*/
int dump_tombstone(pid_t tid, char* pathbuf, size_t pathlen);
+/* Dumps a process backtrace, registers, and stack to a tombstone file (requires root).
+ * Stores the tombstone path in the provided buffer.
+ * If reading debugger data from debuggerd ever takes longer than timeout_secs
+ * seconds, then stop and return an error.
+ * Returns 0 on success, -1 on error.
+ */
+int dump_tombstone_timeout(pid_t tid, char* pathbuf, size_t pathlen, int timeout_secs);
+
/* Dumps a process backtrace only to the specified file (requires root).
* Returns 0 on success, -1 on error.
*/
int dump_backtrace_to_file(pid_t tid, int fd);
+/* Dumps a process backtrace only to the specified file (requires root).
+ * If reading debugger data from debuggerd ever takes longer than timeout_secs
+ * seconds, then stop and return an error.
+ * Returns 0 on success, -1 on error.
+ */
+int dump_backtrace_to_file_timeout(pid_t tid, int fd, int timeout_secs);
+
#ifdef __cplusplus
}
#endif