summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-04-13 23:17:23 +0000
committerGreg Clayton <gclayton@apple.com>2013-04-13 23:17:23 +0000
commit9594f4c8183ec59f8c9e35620fe52540060eb8aa (patch)
treedfb739e90608335bb91fda8e51c9d8aa83e31ca2 /lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h
parent2f293915040315b5bc9a4606d113a86034298078 (diff)
downloadbcm5719-llvm-9594f4c8183ec59f8c9e35620fe52540060eb8aa.tar.gz
bcm5719-llvm-9594f4c8183ec59f8c9e35620fe52540060eb8aa.zip
Fixed issues with the way ELF symbols are parsed:
- Do not add symbols with no names - Make sure that symbols from ELF symbol tables know that the byte size is correct. Previously the symbols would calculate their sizes by looking for the next symbol and take symbols that had zero size and make them have invalid sizes. - Added the ability to dump raw ELF symbols by adding a Dump method to ELFSymbol Also removed some unused code from lldb_private::Symtab. llvm-svn: 179466
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h b/lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h
index 77e5cda3980..11ab1dcef44 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h
+++ b/lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h
@@ -244,6 +244,16 @@ struct ELFSymbol
st_info = (binding << 4) + (type & 0x0F);
}
+ static const char *
+ bindingToCString(unsigned char binding);
+
+ static const char *
+ typeToCString(unsigned char type);
+
+ static const char *
+ sectionIndexToCString(elf_half shndx,
+ const lldb_private::SectionList *section_list);
+
/// Parse an ELFSymbol entry from the given DataExtractor starting at
/// position \p offset. The address size of the DataExtractor determines if
/// a 32 or 64 bit object is to be parsed.
@@ -260,6 +270,12 @@ struct ELFSymbol
/// True if the ELFSymbol was successfully read and false otherwise.
bool
Parse(const lldb_private::DataExtractor &data, lldb::offset_t *offset);
+
+ void
+ Dump (lldb_private::Stream *s,
+ uint32_t idx,
+ const lldb_private::DataExtractor *strtab_data,
+ const lldb_private::SectionList *section_list);
};
//------------------------------------------------------------------------------
OpenPOWER on IntegriCloud