Support late-attach of libjdwp.so agent.

For android we will need to attach a debugger to an already running
app. To support this we add an Agent_OnAttach method that will load
the JDWP agent late. No real special processing is needed for this,
merely needing to suppress the sending any instigating event back to
the client, since there wasn't one.

We also disallow 'suspend=y' since there is no good way to support it
for agents that got loaded with OnAttach.

Test: adb forward tcp:5005 tcp:12345 &&
      adb shell cmd activity attach-agent \
        com.example.android.displayingbitmaps \
        /system/lib64/libjdwp.so=transport=dt_socket,server=y,suspend=n,address=12345
Test: Begin remote-debugging session on Android-studio with target
      being localhost:5005.

Bug: 62821960

Change-Id: Id6f9770122328e7b75bc7b1d5c9e891d4dde8569
1 file changed