]> git.siccegge.de Git - frida/frida.git/blobdiff - src/disassembler/llvm/LLVMDisassembler.cxx
Remove whitespace around printed instruction
[frida/frida.git] / src / disassembler / llvm / LLVMDisassembler.cxx
index 990ed4f53c19c6f24255d2fb735d1bedb4ba8722..b97f93f7df0618d5bf2ca460d6e071726f5ecfe9 100644 (file)
@@ -3,6 +3,7 @@
 #include "core/InformationManager.hxx"
 #include "core/Function.hxx"
 #include "core/BasicBlock.hxx"
 #include "core/InformationManager.hxx"
 #include "core/Function.hxx"
 #include "core/BasicBlock.hxx"
+#include <boost/algorithm/string.hpp>
 
 #include <stack>
 #include <algorithm>
 
 #include <stack>
 #include <algorithm>
@@ -563,7 +564,7 @@ std::vector<Instruction> LLVMDisassembler<ELFT>::getInstructions(const BasicBloc
                                stream << std::hex << (base_address + jmptarget);
                                ref = stream.str();
                        }
                                stream << std::hex << (base_address + jmptarget);
                                ref = stream.str();
                        }
-                       result.push_back(Instruction(current_address + base_address, s.str(),
+                       result.push_back(Instruction(current_address + base_address, boost::algorithm::trim_copy(s.str()),
                                                     std::vector<uint8_t>(bytes, bytes+inst_size), ref));
                } else {
                        LOG4CXX_WARN(logger, "Invalid byte at" << std::hex << current_address + base_address);
                                                     std::vector<uint8_t>(bytes, bytes+inst_size), ref));
                } else {
                        LOG4CXX_WARN(logger, "Invalid byte at" << std::hex << current_address + base_address);