JVMTI GetLocalVariableTable function support

Adds support for the JVMTI GetLocalVariableTable function. Also
enables the can_access_local_variables capability. Other functions
behind this capability will be added in next CL.

Tests follow in later CL.

Test: ./test.py --host -j50
Bug: 34414073
Bug: 36892980
Change-Id: I5a6746d3ae58f1c2b3c79c578f2622ead71d8990
diff --git a/runtime/openjdkjvmti/art_jvmti.h b/runtime/openjdkjvmti/art_jvmti.h
index 4d5bb95..a2259c7 100644
--- a/runtime/openjdkjvmti/art_jvmti.h
+++ b/runtime/openjdkjvmti/art_jvmti.h
@@ -204,6 +204,10 @@
 
 ALWAYS_INLINE
 static inline JvmtiUniquePtr<char[]> CopyString(jvmtiEnv* env, const char* src, jvmtiError* error) {
+  if (src == nullptr) {
+    JvmtiUniquePtr<char[]> ret = AllocJvmtiUniquePtr<char[]>(env, 0, error);
+    return ret;
+  }
   size_t len = strlen(src) + 1;
   JvmtiUniquePtr<char[]> ret = AllocJvmtiUniquePtr<char[]>(env, len, error);
   if (ret != nullptr) {
@@ -227,7 +231,7 @@
     .can_get_source_file_name                        = 1,
     .can_get_line_numbers                            = 1,
     .can_get_source_debug_extension                  = 1,
-    .can_access_local_variables                      = 0,
+    .can_access_local_variables                      = 1,
     .can_maintain_original_method_order              = 0,
     .can_generate_single_step_events                 = 1,
     .can_generate_exception_events                   = 0,