summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debuggerd/debuggerd.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/debuggerd/debuggerd.cpp b/debuggerd/debuggerd.cpp
index b84a4e5..e0a864d 100644
--- a/debuggerd/debuggerd.cpp
+++ b/debuggerd/debuggerd.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#define LOG_TAG "DEBUG"
+
#include <stdio.h>
#include <errno.h>
#include <signal.h>
@@ -84,11 +86,13 @@ static void wait_for_user_action(const debugger_request_t &request) {
"* and start gdbclient:\n"
"*\n"
"* gdbclient %s :5039 %d\n"
+ "* or\n"
+ "* dddclient %s :5039 %d\n"
"*\n"
"* Wait for gdb to start, then press the VOLUME DOWN key\n"
"* to let the process continue crashing.\n"
"********************************************************",
- request.pid, exe, request.tid);
+ request.pid, exe, request.tid, exe, request.tid);
// Wait for VOLUME DOWN.
if (init_getevent() == 0) {
@@ -258,7 +262,19 @@ static bool should_attach_gdb(debugger_request_t* request) {
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;
+ if (debug_uid >= 0 && request->uid <= (uid_t)debug_uid) {
+ return true;
+ } else {
+ /* External docs say to use 10,000 but more is likely needed; be helpful. */
+ if (request->uid > (uid_t)debug_uid) {
+ ALOGI("request->uid:%d > property debug.db.uid:%d; NOT waiting for gdb.",
+ request->uid, debug_uid);
+ } else {
+ ALOGI("property debug.db.uid not set; NOT waiting for gdb.");
+ ALOGI("HINT: adb shell setprop debug.db.uid 100000");
+ ALOGI("HINT: adb forward tcp:5039 tcp:5039");
+ }
+ }
}
return false;
}