Remove debug output

This commit is contained in:
Théophile Bastian 2018-04-11 17:07:50 +02:00
parent 0eb6cad1ba
commit f25093ffce
2 changed files with 0 additions and 30 deletions

View file

@ -126,18 +126,14 @@ DwarfInterpret::reg_content_t DwarfInterpret::interpret_dw_register(
assert(dwarf_regnum != DW_FRAME_CFA_COL3);
reg_content_t cpu_content = 9;
cerr << "@@ Interpreting register ";
switch(dwarf_regnum) {
case lib::DWARF_X86_64_RIP:
cerr << "RIP";
cpu_content = (reg_content_t) ctx.rip;
break;
case lib::DWARF_X86_64_RBP:
cerr << "RBP";
cpu_content = (reg_content_t) ctx.rbp;
break;
case lib::DWARF_X86_64_RSP:
cerr << "RSP";
cpu_content = (reg_content_t) ctx.rsp;
break;
default:
@ -146,11 +142,6 @@ DwarfInterpret::reg_content_t DwarfInterpret::interpret_dw_register(
reg_content_t addr =
cpu_content + reg.register_plus_offset_r().second;
cerr << " = " << hex
<< cpu_content << " + offset = " << addr //<< " -> " << *addr
<< dec << endl;
return addr;
} break;
@ -160,11 +151,6 @@ DwarfInterpret::reg_content_t DwarfInterpret::interpret_dw_register(
int cfa_offset = reg.saved_at_offset_from_cfa_r();
reg_content_t addr = cfa_loc + cfa_offset;
reg_content_t value = *((reg_content_t*) addr);
cerr << "@@ Interpreting CFA offset: CFA is " << hex
<< cfa_loc << " + offset " << dec << cfa_offset << hex
<< " = " << addr
<< " -> " << value
<< dec << endl;
return value;
} break;
@ -194,12 +180,6 @@ DwarfInterpret::UnwindContext DwarfInterpret::get_current_unwind_context() {
get_cpu_register(REG_RSP, ctx.rsp);
get_cpu_register(REG_RBP, ctx.rbp);
cerr << "CREATING CONTEXT. %rsp=0x" << hex
<< ctx.rsp
<< ", %rbp=0x" << ctx.rbp
<< ", %rip=0x" << ctx.rip
<< dec << endl;
DwarfInterpret& dw = DwarfInterpret::acquire(ctx.rip);
return dw.unwind_context(ctx);
@ -216,10 +196,6 @@ DwarfInterpret::UnwindContext DwarfInterpret::unwind_context(
DwarfRow cur_row = dwarf_row_at(ctx.rip);
const core::Cie& cie = *cie_at(ctx.rip);
UnwindContext new_context;
cerr << "Obtaining previous context as reg "
<< cie.get_return_address_register_rule()
<< " at current IP = "
<< hex << ctx.rip << endl;
try {
new_context.rip = interpret_dw_register(
cur_row,
@ -229,7 +205,6 @@ DwarfInterpret::UnwindContext DwarfInterpret::unwind_context(
// An undefined RA means we've reached the end of the call stack
throw FirstUnwindFrame();
}
cerr << "Yielding " << hex << new_context.rip << dec << endl;
new_context.rbp = interpret_dw_register(
cur_row,
lib::DWARF_X86_64_RBP,
@ -284,9 +259,6 @@ const core::FrameSection::fde_iterator DwarfInterpret::fde_at(
if(responsible != nullptr)
return responsible->fde_at(pc);
cerr << "Extracting FDE with ";
map_entry.dump(cerr);
const core::FrameSection& fs = root_die->get_frame_section();
uintptr_t translated_pc = pc - pc_offset;
const auto& fde_it = fs.find_fde_for_pc(translated_pc);

View file

@ -25,7 +25,6 @@ MemoryMap::MemoryMap() {
string line;
while(getline(handle, line).good()) {
cerr << "## " << line << endl;
istringstream lstream(line);
MapEntry entry;
uintptr_t discard;
@ -51,7 +50,6 @@ MemoryMap::MemoryMap() {
rev_addr_map.insert(make_pair(entry.mem_region, map_entries.size()));
map_entries.push_back(entry);
}
cerr << endl;
handle.close();
}