Merge "init/ueventd: adds wildcard matching for ueventd rules"
diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp
index 725fd54..952b58e 100755
--- a/debuggerd/tombstone.cpp
+++ b/debuggerd/tombstone.cpp
@@ -343,8 +343,9 @@
   }
 }
 
-static void dump_map(log_t* log, const backtrace_map_t* map) {
-  _LOG(log, logtype::MAPS, "    %" PRIPTR "-%" PRIPTR " %c%c%c %s\n", map->start, map->end,
+static void dump_map(log_t* log, const backtrace_map_t* map, bool fault_addr) {
+  _LOG(log, logtype::MAPS, "%s%" PRIPTR "-%" PRIPTR " %c%c%c %s\n",
+         (fault_addr? "--->" : "    "), map->start, map->end,
          (map->flags & PROT_READ) ? 'r' : '-', (map->flags & PROT_WRITE) ? 'w' : '-',
          (map->flags & PROT_EXEC) ? 'x' : '-', map->name.c_str());
 }
@@ -366,10 +367,18 @@
     return;
   }
 
-  _LOG(log, logtype::MAPS, "\nmemory map:\n");
+  _LOG(log, logtype::MAPS, "\nmemory map: (fault address prefixed with --->)\n");
 
+  bool found_map = false;
   for (BacktraceMap::const_iterator it = map->begin(); it != map->end(); ++it) {
-    dump_map(log, &*it);
+    bool in_map = addr >= (*it).start && addr < (*it).end;
+    dump_map(log, &*it, in_map);
+    if(in_map) {
+      found_map = true;
+    }
+  }
+  if(!found_map) {
+    _LOG(log, logtype::ERROR, "\nFault address was not in any map!");
   }
 }
 
diff --git a/healthd/healthd.cpp b/healthd/healthd.cpp
index 9b84c3e..d30e771 100644
--- a/healthd/healthd.cpp
+++ b/healthd/healthd.cpp
@@ -126,7 +126,7 @@
         KLOG_ERROR(LOG_TAG, "uevent_init: uevent_open_socket failed\n");
 }
 
-#define UEVENT_MSG_LEN 1024
+#define UEVENT_MSG_LEN 2048
 static void uevent_event(void) {
     char msg[UEVENT_MSG_LEN+2];
     char *cp;