src/share/vm/utilities/elfSymbolTable.cpp
Print this page
@@ -48,11 +48,11 @@
m_status = Decoder::file_invalid;
os::free(m_symbols);
m_symbols = NULL;
}
}
- if (m_status == Decoder::no_error) {
+ if (!Decoder::is_error(m_status)) {
memcpy(&m_shdr, &shdr, sizeof(Elf_Shdr));
}
} else {
m_status = Decoder::file_invalid;
}
@@ -66,17 +66,17 @@
if (m_next != NULL) {
delete m_next;
}
}
-Decoder::decoder_status ElfSymbolTable::lookup(address addr, int* stringtableIndex, int* posIndex, int* offset) {
+bool ElfSymbolTable::lookup(address addr, int* stringtableIndex, int* posIndex, int* offset) {
assert(stringtableIndex, "null string table index pointer");
assert(posIndex, "null string table offset pointer");
assert(offset, "null offset pointer");
- if (m_status != Decoder::no_error) {
- return m_status;
+ if (Decoder::is_error(m_status)) {
+ return false;
}
address pc = 0;
size_t sym_size = sizeof(Elf_Sym);
assert((m_shdr.sh_size % sym_size) == 0, "check size");
@@ -96,11 +96,11 @@
} else {
long cur_pos;
if ((cur_pos = ftell(m_file)) == -1 ||
fseek(m_file, m_shdr.sh_offset, SEEK_SET)) {
m_status = Decoder::file_invalid;
- return m_status;
+ return false;
}
Elf_Sym sym;
for (int index = 0; index < count; index ++) {
if (fread(&sym, sym_size, 1, m_file) == 1) {
@@ -113,14 +113,14 @@
*stringtableIndex = m_shdr.sh_link;
}
}
} else {
m_status = Decoder::file_invalid;
- return m_status;
+ return false;
}
}
fseek(m_file, cur_pos, SEEK_SET);
}
- return m_status;
+ return true;
}
#endif // _WINDOWS