Have JavaFrameRootInfo give more info about provenance of root.

It can be useful to differentiate between java frame roots being the
methods declaring class, from a proxy method, being unknown due to
an imprecise walk or being indeterminable. This passes that
information with the Vreg.

Test: ./test.py --host
Bug: 134162467

Change-Id: I74842d3eeedee5c836511e046652502a53de0f7e
diff --git a/openjdkjvmti/ti_heap.cc b/openjdkjvmti/ti_heap.cc
index 0c06ae1..81d1fc7 100644
--- a/openjdkjvmti/ti_heap.cc
+++ b/openjdkjvmti/ti_heap.cc
@@ -1039,7 +1039,9 @@
           }
 
           auto& java_info = static_cast<const art::JavaFrameRootInfo&>(info);
-          ref_info->stack_local.slot = static_cast<jint>(java_info.GetVReg());
+          size_t vreg = java_info.GetVReg();
+          ref_info->stack_local.slot = static_cast<jint>(
+              vreg <= art::JavaFrameRootInfo::kMaxVReg ? vreg : -1);
           const art::StackVisitor* visitor = java_info.GetVisitor();
           ref_info->stack_local.location =
               static_cast<jlocation>(visitor->GetDexPc(/* abort_on_failure= */ false));