[Lldb-commits] [lldb] r247175 - Make sure to flush the stream to make sure the string is up to date when we query its size.
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 9 11:41:51 PDT 2015
Author: gclayton
Date: Wed Sep 9 13:41:50 2015
New Revision: 247175
URL: http://llvm.org/viewvc/llvm-project?rev=247175&view=rev
Log:
Make sure to flush the stream to make sure the string is up to date when we query its size.
Modified:
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=247175&r1=247174&r2=247175&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Wed Sep 9 13:41:50 2015
@@ -557,6 +557,7 @@ DisassemblerLLVMC::LLVMCDisassembler::Pr
llvm::raw_svector_ostream inst_stream(inst_string);
m_instr_printer_ap->printInst (&mc_inst, inst_stream, unused_annotations,
*m_subtarget_info_ap);
+ inst_stream.flush();
const size_t output_size = std::min(dst_len - 1, inst_string.size());
std::memcpy(dst, inst_string.data(), output_size);
dst[output_size] = '\0';
More information about the lldb-commits
mailing list