comparison src/share/vm/utilities/elfSymbolTable.hpp @ 4803:d7e3846464d0

7071311: Decoder enhancement Summary: Made decoder thread-safe Reviewed-by: coleenp, kamg
author zgu
date Tue, 17 Jan 2012 13:08:52 -0500
parents f08d439fab8c
children d2a62e0f25eb
comparison
equal deleted inserted replaced
4801:4f3ce9284781 4803:d7e3846464d0
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 * 22 *
23 */ 23 */
24 24
25 #ifndef __ELF_SYMBOL_TABLE_HPP 25 #ifndef SHARE_VM_UTILITIES_ELF_SYMBOL_TABLE_HPP
26 #define __ELF_SYMBOL_TABLE_HPP 26 #define SHARE_VM_UTILITIES_ELF_SYMBOL_TABLE_HPP
27 27
28 #if !defined(_WINDOWS) && !defined(__APPLE__) 28 #if !defined(_WINDOWS) && !defined(__APPLE__)
29 29
30 30
31 #include "memory/allocation.hpp" 31 #include "memory/allocation.hpp"
43 public: 43 public:
44 ElfSymbolTable(FILE* file, Elf_Shdr shdr); 44 ElfSymbolTable(FILE* file, Elf_Shdr shdr);
45 ~ElfSymbolTable(); 45 ~ElfSymbolTable();
46 46
47 // search the symbol that is nearest to the specified address. 47 // search the symbol that is nearest to the specified address.
48 Decoder::decoder_status lookup(address addr, int* stringtableIndex, int* posIndex, int* offset); 48 bool lookup(address addr, int* stringtableIndex, int* posIndex, int* offset);
49 49
50 Decoder::decoder_status get_status() { return m_status; }; 50 NullDecoder::decoder_status get_status() { return m_status; };
51 51
52 protected: 52 protected:
53 ElfSymbolTable* m_next; 53 ElfSymbolTable* m_next;
54 54
55 // holds a complete symbol table section if 55 // holds a complete symbol table section if
60 FILE* m_file; 60 FILE* m_file;
61 61
62 // section header 62 // section header
63 Elf_Shdr m_shdr; 63 Elf_Shdr m_shdr;
64 64
65 Decoder::decoder_status m_status; 65 NullDecoder::decoder_status m_status;
66 }; 66 };
67 67
68 #endif // _WINDOWS 68 #endif // _WINDOWS and _APPLE
69 69
70 #endif // __ELF_SYMBOL_TABLE_HPP 70 #endif // SHARE_VM_UTILITIES_ELF_SYMBOL_TABLE_HPP