Remove old JDWP implementation from ART

The old 'internal' JDWP implementation hasn't been used for a few
releases and it's a lot of code that's barely being tested and is at
risk of bit-rot. To simplify the runtime and remove potentially buggy
code this removes it.

We also needed to rewrite the DdmThreadNotification code since it
relied on the suspension functionality from the old debugger and was
generally unsafe.

Test: ./test.py --host
Test: atest --test-mapping cts/tests/jdwp/TEST_MAPPING
Test: atest --test-mapping cts/hostsidetests/jdwptunnel/TEST_MAPPING
Test: Manual ddms

Bug: 119034743

Change-Id: I775f310a009141296b730e4a6c2503506a329481
diff --git a/adbconnection/adbconnection.cc b/adbconnection/adbconnection.cc
index 2234ce4..c512b06 100644
--- a/adbconnection/adbconnection.cc
+++ b/adbconnection/adbconnection.cc
@@ -26,6 +26,8 @@
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/mutex.h"
+#include "base/socket_peer_is_trusted.h"
+#include "debugger.h"
 #include "jni/java_vm_ext.h"
 #include "jni/jni_env_ext.h"
 #include "mirror/throwable.h"
@@ -35,20 +37,24 @@
 #include "scoped_thread_state_change-inl.h"
 #include "well_known_classes.h"
 
-#include "jdwp/jdwp_priv.h"
-
 #include "fd_transport.h"
 
 #include "poll.h"
 
 #include <sys/ioctl.h>
 #include <sys/socket.h>
+#include <sys/uio.h>
 #include <sys/un.h>
 #include <sys/eventfd.h>
 #include <jni.h>
 
 namespace adbconnection {
 
+static constexpr size_t kJdwpHeaderLen = 11U;
+/* DDM support */
+static constexpr uint8_t kJdwpDdmCmdSet = 199U;  // 0xc7, or 'G'+128
+static constexpr uint8_t kJdwpDdmCmd = 1U;
+
 // Messages sent from the transport
 using dt_fd_forward::kListenStartMessage;
 using dt_fd_forward::kListenEndMessage;
@@ -333,7 +339,7 @@
   // the adb_write_event_fd_ will ensure that the adb_connection_socket_ will not go away until
   // after we have sent our data.
   static constexpr uint32_t kDdmPacketHeaderSize =
-      kJDWPHeaderLen       // jdwp command packet size
+      kJdwpHeaderLen       // jdwp command packet size
       + sizeof(uint32_t)   // Type
       + sizeof(uint32_t);  // length
   alignas(sizeof(uint32_t)) std::array<uint8_t, kDdmPacketHeaderSize> pkt;
@@ -352,9 +358,9 @@
   switch (packet_type) {
     case DdmPacketType::kCmd: {
       // Now the cmd-set
-      *(pkt_data++) = kJDWPDdmCmdSet;
+      *(pkt_data++) = kJdwpDdmCmdSet;
       // Now the command
-      *(pkt_data++) = kJDWPDdmCmd;
+      *(pkt_data++) = kJdwpDdmCmd;
       break;
     }
     case DdmPacketType::kReply: {