New property that determines when to wait for gdb.

Use debug.debuggerd.wait_for_gdb being set to non-zero to
determine if debuggerd should stop and wait for someone to
attach gdb to the crashing process.

Bug: 22233908
Change-Id: Id55a1572b479a70d395b7270392ce6fb70dbfdca
This commit is contained in:
Christopher Ferris 2015-07-01 15:42:05 -07:00
parent 41a0654e2a
commit d79f2bebcc

View file

@ -236,10 +236,7 @@ static int read_request(int fd, debugger_request_t* out_request) {
static bool should_attach_gdb(debugger_request_t* request) {
if (request->action == DEBUGGER_ACTION_CRASH) {
char value[PROPERTY_VALUE_MAX];
property_get("debug.db.uid", value, "-1");
int debug_uid = atoi(value);
return debug_uid >= 0 && request->uid <= (uid_t)debug_uid;
return property_get_bool("debug.debuggerd.wait_for_gdb", false);
}
return false;
}