comparison src/share/vm/utilities/decoder.hpp @ 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 d2a62e0f25eb
children 38f750491293
comparison
equal deleted inserted replaced
6236:950ed41429e5 6258:3b01d0321dfa
45 45
46 // decode an pc address to corresponding function name and an offset from the beginning of 46 // decode an pc address to corresponding function name and an offset from the beginning of
47 // the function 47 // the function
48 virtual bool decode(address pc, char* buf, int buflen, int* offset, 48 virtual bool decode(address pc, char* buf, int buflen, int* offset,
49 const char* modulepath = NULL) = 0; 49 const char* modulepath = NULL) = 0;
50 virtual bool decode(address pc, char* buf, int buflen, int* offset, const void* base) = 0;
51
50 // demangle a C++ symbol 52 // demangle a C++ symbol
51 virtual bool demangle(const char* symbol, char* buf, int buflen) = 0; 53 virtual bool demangle(const char* symbol, char* buf, int buflen) = 0;
52 // if the decoder can decode symbols in vm 54 // if the decoder can decode symbols in vm
53 virtual bool can_decode_C_frame_in_vm() const = 0; 55 virtual bool can_decode_C_frame_in_vm() const = 0;
54 56
80 virtual bool decode(address pc, char* buf, int buflen, int* offset, 82 virtual bool decode(address pc, char* buf, int buflen, int* offset,
81 const char* modulepath = NULL) { 83 const char* modulepath = NULL) {
82 return false; 84 return false;
83 } 85 }
84 86
87 virtual bool decode(address pc, char* buf, int buflen, int* offset, const void* base) {
88 return false;
89 }
90
85 virtual bool demangle(const char* symbol, char* buf, int buflen) { 91 virtual bool demangle(const char* symbol, char* buf, int buflen) {
86 return false; 92 return false;
87 } 93 }
88 94
89 virtual bool can_decode_C_frame_in_vm() const { 95 virtual bool can_decode_C_frame_in_vm() const {
93 99
94 100
95 class Decoder : AllStatic { 101 class Decoder : AllStatic {
96 public: 102 public:
97 static bool decode(address pc, char* buf, int buflen, int* offset, const char* modulepath = NULL); 103 static bool decode(address pc, char* buf, int buflen, int* offset, const char* modulepath = NULL);
104 static bool decode(address pc, char* buf, int buflen, int* offset, const void* base);
98 static bool demangle(const char* symbol, char* buf, int buflen); 105 static bool demangle(const char* symbol, char* buf, int buflen);
99 static bool can_decode_C_frame_in_vm(); 106 static bool can_decode_C_frame_in_vm();
100 107
101 // shutdown shared instance 108 // shutdown shared instance
102 static void shutdown(); 109 static void shutdown();