]> git.siccegge.de Git - frida/frida.git/commitdiff
Remove whitespace around printed instruction
authorChristoph Egger <Christoph.Egger@fau.de>
Fri, 20 Mar 2015 12:50:28 +0000 (13:50 +0100)
committerChristoph Egger <Christoph.Egger@fau.de>
Fri, 20 Mar 2015 12:50:28 +0000 (13:50 +0100)
Also fixes display of calls where the whole string was replaced by the
called function name instead of just the address

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 <boost/algorithm/string.hpp>
 
 #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();
                        }
-                       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);