mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
macho-dump: Add support for dumping string table data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120217 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <string>
|
||||
#include "llvm/ADT/InMemoryStruct.h"
|
||||
#include "llvm/ADT/OwningPtr.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Object/MachOFormat.h"
|
||||
|
||||
namespace llvm {
|
||||
@@ -59,6 +60,8 @@ private:
|
||||
bool Is64Bit;
|
||||
/// Whether the object is swapped endianness from the host.
|
||||
bool IsSwappedEndian;
|
||||
/// Whether the string table has been registered.
|
||||
bool HasStringTable;
|
||||
|
||||
/// The cached information on the load commands.
|
||||
LoadCommandInfo *LoadCommands;
|
||||
@@ -68,6 +71,9 @@ private:
|
||||
macho::Header Header;
|
||||
macho::Header64Ext Header64Ext;
|
||||
|
||||
/// Cache string table information.
|
||||
StringRef StringTable;
|
||||
|
||||
private:
|
||||
MachOObject(MemoryBuffer *Buffer, bool IsLittleEndian, bool Is64Bit);
|
||||
|
||||
@@ -96,6 +102,17 @@ public:
|
||||
return Is64Bit ? macho::Header64Size : macho::Header32Size;
|
||||
}
|
||||
|
||||
/// @}
|
||||
/// @name String Table Data
|
||||
/// @{
|
||||
|
||||
StringRef getStringTableData() const {
|
||||
assert(HasStringTable && "String table has not been registered!");
|
||||
return StringTable;
|
||||
}
|
||||
|
||||
void RegisterStringTable(macho::SymtabLoadCommand &SLC);
|
||||
|
||||
/// @}
|
||||
/// @name Object Header Access
|
||||
/// @{
|
||||
|
Reference in New Issue
Block a user