diff src/share/vm/utilities/decoder.cpp @ 6258:3b01d0321dfa

7186778: MachO decoder implementation for MacOSX Summary: Implementation of decoder for Apple's MacOSX. The implementation is based on the patch provided by Kevin Walls. Reviewed-by: coleenp, kamg, kevinw
author zgu
date Mon, 30 Jul 2012 10:25:52 -0400
parents db006a85bf91
children b9a9ed0f8eeb
line wrap: on
line diff
--- a/src/share/vm/utilities/decoder.cpp	Thu Jul 19 06:24:46 2012 -0700
+++ b/src/share/vm/utilities/decoder.cpp	Mon Jul 30 10:25:52 2012 -0400
@@ -91,6 +91,18 @@
   return decoder->decode(addr, buf, buflen, offset, modulepath);
 }
 
+bool Decoder::decode(address addr, char* buf, int buflen, int* offset, const void* base) {
+  assert(_shared_decoder_lock != NULL, "Just check");
+  bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;
+  MutexLockerEx locker(error_handling_thread ? NULL : _shared_decoder_lock, true);
+  AbstractDecoder* decoder = error_handling_thread ?
+    get_error_handler_instance(): get_shared_instance();
+  assert(decoder != NULL, "null decoder");
+
+  return decoder->decode(addr, buf, buflen, offset, base);
+}
+
+
 bool Decoder::demangle(const char* symbol, char* buf, int buflen) {
   assert(_shared_decoder_lock != NULL, "Just check");
   bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;