From 8a8a4cc33fa1b7ed7028c335156c05731f6ba2d1 Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Fri, 20 Mar 2015 13:50:28 +0100 Subject: [PATCH] Remove whitespace around printed instruction 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/disassembler/llvm/LLVMDisassembler.cxx b/src/disassembler/llvm/LLVMDisassembler.cxx index 990ed4f..b97f93f 100644 --- a/src/disassembler/llvm/LLVMDisassembler.cxx +++ b/src/disassembler/llvm/LLVMDisassembler.cxx @@ -3,6 +3,7 @@ #include "core/InformationManager.hxx" #include "core/Function.hxx" #include "core/BasicBlock.hxx" +#include #include #include @@ -563,7 +564,7 @@ std::vector LLVMDisassembler::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(bytes, bytes+inst_size), ref)); } else { LOG4CXX_WARN(logger, "Invalid byte at" << std::hex << current_address + base_address); -- 2.39.5