summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-05-21 00:44:42 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-05-21 00:44:42 +0000
commite7faaa6688bcc04f31f17284a6449de8ed98adbc (patch)
tree8ed6385b9e974a4b1566ed76e617cb90176d13f6
parent54254008badbbf6340916f968028239e53e92837 (diff)
downloadbcm5719-llvm-e7faaa6688bcc04f31f17284a6449de8ed98adbc.tar.gz
bcm5719-llvm-e7faaa6688bcc04f31f17284a6449de8ed98adbc.zip
When in non-raw mode and edis fails to parse the tokens of the instruction, output
the raw disassembly so that the opcode aligns with the edis'ed disassembly. llvm-svn: 131773
-rw-r--r--lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
index 9889484821e..c2e0ef288f4 100644
--- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
+++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp
@@ -369,7 +369,16 @@ InstructionLLVM::Dump
if (EDGetInstString(&str, m_inst)) // 0 on success
return;
- s->Write(str, strlen(str) - 1);
+ if (raw)
+ s->Write(str, strlen(str) - 1);
+ else
+ {
+ // EDis fails to parse the tokens of this inst. Need to align this
+ // raw disassembly with the rest of output.
+ llvm::StringRef raw_disasm(str);
+ StripSpaces(raw_disasm);
+ s->PutCString(raw_disasm.str().c_str());
+ }
}
}
OpenPOWER on IntegriCloud