src/share/vm/utilities/elfFile.hpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -20,12 +20,12 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
-#ifndef __ELF_FILE_HPP
-#define __ELF_FILE_HPP
+#ifndef SHARE_VM_UTILITIES_ELF_FILE_HPP
+#define SHARE_VM_UTILITIES_ELF_FILE_HPP
#if !defined(_WINDOWS) && !defined(__APPLE__)
#if defined(__OpenBSD__)
#include <sys/exec_elf.h>
@@ -81,16 +81,16 @@
// Beware, this code is called from vm error reporting code, when vm is already
// in "error" state, so there are scenarios, lookup will fail. We want this
// part of code to be very defensive, and bait out if anything went wrong.
class ElfFile: public CHeapObj {
- friend class Decoder;
+ friend class ElfDecoder;
public:
ElfFile(const char* filepath);
~ElfFile();
- const char* decode(address addr, int* offset);
+ bool decode(address addr, char* buf, int buflen, int* offset);
const char* filepath() {
return m_filepath;
}
bool same_elf_file(const char* filepath) {
@@ -117,12 +117,13 @@
void add_symbol_table(ElfSymbolTable* table);
// return a string table at specified section index
ElfStringTable* get_string_table(int index);
- // look up an address and return the nearest symbol
- const char* look_up(Elf_Shdr shdr, address addr, int* offset);
+protected:
+ ElfFile* next() const { return m_next; }
+ void set_next(ElfFile* file) { m_next = file; }
protected:
ElfFile* m_next;
private:
@@ -142,6 +143,6 @@
Decoder::decoder_status m_status;
};
#endif // _WINDOWS
-#endif // __ELF_FILE_HPP
+#endif // SHARE_VM_UTILITIES_ELF_FILE_HPP