hotspot/src/share/vm/runtime/os.cpp
changeset 24457 0e20b36df5c4
parent 24424 2658d7834c6e
child 25056 5ad92b0d1beb
--- a/hotspot/src/share/vm/runtime/os.cpp	Thu May 15 17:38:50 2014 -0400
+++ b/hotspot/src/share/vm/runtime/os.cpp	Thu May 15 18:23:26 2014 -0400
@@ -1097,11 +1097,15 @@
 
   }
 
-  // Check if in metaspace.
-  if (ClassLoaderDataGraph::contains((address)addr)) {
-    // Use addr->print() from the debugger instead (not here)
-    st->print_cr(INTPTR_FORMAT
-                 " is pointing into metadata", addr);
+  // Check if in metaspace and print types that have vptrs (only method now)
+  if (Metaspace::contains(addr)) {
+    if (Method::has_method_vptr((const void*)addr)) {
+      ((Method*)addr)->print_value_on(st);
+      st->cr();
+    } else {
+      // Use addr->print() from the debugger instead (not here)
+      st->print_cr(INTPTR_FORMAT " is pointing into metadata", addr);
+    }
     return;
   }