Mercurial > hg > truffle
comparison src/os/bsd/vm/decoder_machO.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 | db006a85bf91 |
children |
comparison
equal
deleted
inserted
replaced
6236:950ed41429e5 | 6258:3b01d0321dfa |
---|---|
29 | 29 |
30 #include "utilities/decoder.hpp" | 30 #include "utilities/decoder.hpp" |
31 | 31 |
32 // Just a placehold for now, a real implementation should derive | 32 // Just a placehold for now, a real implementation should derive |
33 // from AbstractDecoder | 33 // from AbstractDecoder |
34 class MachODecoder : public NullDecoder { | 34 class MachODecoder : public AbstractDecoder { |
35 public: | 35 public: |
36 MachODecoder() { } | 36 MachODecoder() { } |
37 ~MachODecoder() { } | 37 ~MachODecoder() { } |
38 virtual bool can_decode_C_frame_in_vm() const { | |
39 return true; | |
40 } | |
41 virtual bool demangle(const char* symbol, char* buf, int buflen); | |
42 virtual bool decode(address pc, char* buf, int buflen, int* offset, | |
43 const void* base); | |
44 virtual bool decode(address pc, char* buf, int buflen, int* offset, | |
45 const char* module_path = NULL) { | |
46 ShouldNotReachHere(); | |
47 return false; | |
48 } | |
49 | |
50 private: | |
51 void * mach_find_command(struct mach_header_64 * mach_base, uint32_t command_wanted); | |
52 char * mach_find_in_stringtable(char *strtab, uint32_t tablesize, int strx_wanted); | |
38 }; | 53 }; |
39 | 54 |
40 #endif | 55 #endif |
41 | 56 |
42 #endif // OS_BSD_VM_DECODER_MACHO_HPP | 57 #endif // OS_BSD_VM_DECODER_MACHO_HPP |