From ca57dc86c7f6faaf449033c584583cb70bff526b Mon Sep 17 00:00:00 2001 From: jdh8d <jdh8d@git.zephyr-software.com> Date: Mon, 10 Oct 2016 20:45:37 +0000 Subject: [PATCH] print format fixing Former-commit-id: 735fbca09aaf9326a8fefc23574b1797f762d902 --- tools/selective_cfi/color_map.cpp | 9 +++++---- tools/selective_cfi/scfi_instr.cpp | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/selective_cfi/color_map.cpp b/tools/selective_cfi/color_map.cpp index f152a59cd..fa61fa3bc 100644 --- a/tools/selective_cfi/color_map.cpp +++ b/tools/selective_cfi/color_map.cpp @@ -55,8 +55,9 @@ bool ColoredInstructionNonces_t::create() { Instruction_t* target=*it2; color_assignments[target][slot_no]=v; - cout<<"Setting [slot][color] for "<<target->GetBaseID()<<":"<<target->getDisassembly() - <<"=["<<v.GetPosition()<<"]["<<hex<<v.GetNonceValue()<<dec<<"]"<<endl; + cout<<"Setting slot[-"<<hex<<v.GetPosition()<<"]=color["<<hex<<v.GetNonceValue()<<dec<<"]" + << " for "<<hex<<target->GetBaseID()<<":"<<target->getDisassembly() + << endl; } // and we're done with this ICFS @@ -79,8 +80,8 @@ bool ColoredInstructionNonces_t::create() if(insn->GetIBTargets()) { v=GetColorOfIB(insn); - cout<<"IB assigned [slot][color] for "<<insn->GetBaseID()<<":"<<insn->getDisassembly() - <<"=["<<v.GetPosition()<<"]["<<hex<<v.GetNonceValue()<<dec<<"]"<<endl; + cout<<"IB assigned " <<"slot[-"<<v.GetPosition()<<"]=color["<<hex<<v.GetNonceValue()<<dec<<"]" + << " for "<<insn->GetBaseID()<<":"<<insn->getDisassembly() << endl; used_icfs.insert(*insn->GetIBTargets()); diff --git a/tools/selective_cfi/scfi_instr.cpp b/tools/selective_cfi/scfi_instr.cpp index 1a2e4a5ed..1291d37d3 100644 --- a/tools/selective_cfi/scfi_instr.cpp +++ b/tools/selective_cfi/scfi_instr.cpp @@ -1375,7 +1375,7 @@ bool SCFI_Instrument::add_libdl_as_needed_support() index++; } - +#if 0 cout<<".dynamic contents after scfi update:"<<hex<<endl; const string &dynstr_contents=dynamic_scoop->GetContents(); for(unsigned int i=0;i<dynstr_contents.size(); i+=16) @@ -1383,6 +1383,7 @@ bool SCFI_Instrument::add_libdl_as_needed_support() cout<<*(long long*) &dynstr_contents.c_str()[i] <<" " <<*(long long*) &dynstr_contents.c_str()[i+8] <<endl; } +#endif return true; -- GitLab