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 SHARE_VM_UTILITIES_DECODER_ELF_HPP
3084N/A#define SHARE_VM_UTILITIES_DECODER_ELF_HPP
3084N/A
3084N/A#if !defined(_WINDOWS) && !defined(__APPLE__)
3084N/A
3084N/A#include "utilities/decoder.hpp"
3084N/A#include "utilities/elfFile.hpp"
3084N/A
3206N/Aclass ElfDecoder : public AbstractDecoder {
3084N/A
3084N/Apublic:
3084N/A ElfDecoder() {
3084N/A _opened_elf_files = NULL;
3084N/A _decoder_status = no_error;
3084N/A }
3084N/A ~ElfDecoder();
3084N/A
3084N/A bool can_decode_C_frame_in_vm() const { return true; }
3084N/A
3084N/A bool demangle(const char* symbol, char *buf, int buflen);
3084N/A bool decode(address addr, char *buf, int buflen, int* offset, const char* filepath = NULL);
3924N/A bool decode(address addr, char *buf, int buflen, int* offset, const void *base) {
3924N/A ShouldNotReachHere();
3924N/A return false;
3924N/A }
3084N/A
3084N/Aprivate:
3084N/A ElfFile* get_elf_file(const char* filepath);
3084N/A
3084N/Aprivate:
3084N/A ElfFile* _opened_elf_files;
3084N/A};
3084N/A
3084N/A#endif
3084N/A#endif // SHARE_VM_UTILITIES_DECODER_ELF_HPP