Skip to content

Commit 5f6083a

Browse files
Comments
1 parent 2301092 commit 5f6083a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lldb/source/Plugins/ObjectFile/XCOFF/ObjectFileXCOFF.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ bool ObjectFileXCOFF::MagicBytesMatch(DataBufferSP &data_sp,
164164
lldb::addr_t data_length) {
165165
lldb_private::DataExtractor data;
166166
data.SetData(data_sp, data_offset, data_length);
167+
168+
// Need to set this as XCOFF is only compatible with Big Endian
167169
data.SetByteOrder(eByteOrderBig);
168170
lldb::offset_t offset = 0;
169171
uint16_t magic = data.GetU16(&offset);
@@ -175,6 +177,7 @@ bool ObjectFileXCOFF::ParseHeader() {
175177
bool retVal = false;
176178
ModuleSP module_sp(GetModule());
177179
if (module_sp) {
180+
// Only 64-bit is supported for now
178181
if (m_binary->fileHeader64()->Magic == XCOFF::XCOFF64)
179182
retVal = true;
180183
}

0 commit comments

Comments
 (0)