mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Create an atom with just the data that failed to disassemble.
Patch by Stephen Checkoway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192827 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -135,11 +135,13 @@ void MCObjectDisassembler::buildSectionAtoms(MCModule *Module) {
|
||||
Text->addInst(Inst, InstSize);
|
||||
InvalidData = 0;
|
||||
} else {
|
||||
assert(InstSize && "getInstruction() consumed no bytes");
|
||||
if (!InvalidData) {
|
||||
Text = 0;
|
||||
InvalidData = Module->createDataAtom(CurAddr, EndAddr);
|
||||
InvalidData = Module->createDataAtom(CurAddr, CurAddr+InstSize - 1);
|
||||
}
|
||||
InvalidData->addData(Contents[Index]);
|
||||
for (uint64_t I = 0; I < InstSize; ++I)
|
||||
InvalidData->addData(Contents[Index+I]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user