Skip to content

Commit

Permalink
Update commented-out debug print statements.
Browse files Browse the repository at this point in the history
After some refactoring to remove "using namespace std", some of the
commented-out debug statements no longer worked when uncommenting
them.  This commit updates those debug statements.
  • Loading branch information
morehouse committed Apr 19, 2017
1 parent add39de commit e45b323
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dyninstAPI/src/Relocation/CodeBuffer.C
Expand Up @@ -315,10 +315,10 @@ void CodeBuffer::updateLabel(unsigned id, Address offset, bool &regenerate) {
if (!l.valid()) return;

//relocation_cerr << "\t Updating label " << id
// << " -> " << hex << offset << dec << endl;
// << " -> " << std::hex << offset << std::dec << endl;
if (l.addr != offset) {
//relocation_cerr << "\t\t Old value " << hex << labels_[id].addr
// << ", regenerating!" << dec << endl;
//relocation_cerr << "\t\t Old value " << std::hex << labels_[id].addr
// << ", regenerating!" << std::dec << endl;
regenerate = true;
}
l.addr = offset;
Expand All @@ -342,15 +342,15 @@ Address CodeBuffer::predictedAddr(unsigned id) {
switch(label.type) {
case Label::Absolute:
//relocation_cerr << "\t\t Requested predicted addr for " << id
// << ", label is absolute, ret " << hex << label.addr << dec << endl;
// << ", label is absolute, ret " << std::hex << label.addr << std::dec << endl;
return label.addr;
case Label::Relative:
assert(gen_.startAddr());
assert(gen_.startAddr() != (Address) -1);
//relocation_cerr << "\t\t Requested predicted addr for " << id
// << ", label is relative, ret " << hex << label.addr + gen_.startAddr()
// << ", label is relative, ret " << std::hex << label.addr + gen_.startAddr()
// << " = " << label.addr << " + " << gen_.startAddr()
// << dec << endl;
// << std::dec << endl;
return label.addr + gen_.startAddr();
case Label::Estimate: {
// In this case we want to adjust the address by
Expand All @@ -363,11 +363,11 @@ Address CodeBuffer::predictedAddr(unsigned id) {
if (label.iteration < curIteration_)
ret += shift_;
//relocation_cerr << "\t\t Requested predicted addr for " << id
// << ", label is relative, ret " << hex << ret
// << ", label is relative, ret " << std::hex << ret
// << " = " << label.addr << " + " << gen_.startAddr()
// << " + (" << label.iteration << " < "
// << curIteration_ << ") ? " << shift_
// << " : 0" << dec << endl;
// << " : 0" << std::dec << endl;
return ret;
}
default:
Expand Down

0 comments on commit e45b323

Please sign in to comment.