3084N/A/*
3206N/A * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3084N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3084N/A *
3084N/A * This code is free software; you can redistribute it and/or modify it
3084N/A * under the terms of the GNU General Public License version 2 only, as
3084N/A * published by the Free Software Foundation.
3084N/A *
3084N/A * This code is distributed in the hope that it will be useful, but WITHOUT
3084N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3084N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3084N/A * version 2 for more details (a copy is included in the LICENSE file that
3084N/A * accompanied this code).
3084N/A *
3084N/A * You should have received a copy of the GNU General Public License version
3084N/A * 2 along with this work; if not, write to the Free Software Foundation,
3084N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3084N/A *
3084N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3084N/A * or visit www.oracle.com if you need additional information or have any
3084N/A * questions.
3084N/A *
3084N/A */
3084N/A
3084N/A#ifndef OS_BSD_VM_DECODER_MACHO_HPP
3084N/A#define OS_BSD_VM_DECODER_MACHO_HPP
3084N/A
3084N/A#ifdef __APPLE__
3084N/A
3084N/A#include "utilities/decoder.hpp"
3084N/A
3206N/A// Just a placehold for now, a real implementation should derive
3206N/A// from AbstractDecoder
3924N/Aclass MachODecoder : public AbstractDecoder {
3924N/A public:
3084N/A MachODecoder() { }
3084N/A ~MachODecoder() { }
3924N/A virtual bool can_decode_C_frame_in_vm() const {
3924N/A return true;
3924N/A }
3924N/A virtual bool demangle(const char* symbol, char* buf, int buflen);
3924N/A virtual bool decode(address pc, char* buf, int buflen, int* offset,
3924N/A const void* base);
3924N/A virtual bool decode(address pc, char* buf, int buflen, int* offset,
3924N/A const char* module_path = NULL) {
3924N/A ShouldNotReachHere();
3924N/A return false;
3924N/A }
3924N/A
3924N/A private:
3924N/A void * mach_find_command(struct mach_header_64 * mach_base, uint32_t command_wanted);
3924N/A char * mach_find_in_stringtable(char *strtab, uint32_t tablesize, int strx_wanted);
3084N/A};
3084N/A
3084N/A#endif
3084N/A
3084N/A#endif // OS_BSD_VM_DECODER_MACHO_HPP
3084N/A