diff options
author | Chris Johns <chrisj@rtems.org> | 2012-12-15 23:19:21 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2012-12-15 23:19:21 +1100 |
commit | 1ce126d3fef1a7ad6129997b1a8b492d5c286183 (patch) | |
tree | c6a0cdd7ee22ea3c4ad101479d5a4101f5c7ddc1 | |
parent | 7c02253d5df3347a0ff85e43fd2a9dca0955b55f (diff) |
Debug trace changes.
-rw-r--r-- | rld-elf.cpp | 7 | ||||
-rw-r--r-- | rld-files.cpp | 12 | ||||
-rw-r--r-- | rld-rap.cpp | 2 | ||||
-rw-r--r-- | rld-symbols.cpp | 2 |
4 files changed, 12 insertions, 11 deletions
diff --git a/rld-elf.cpp b/rld-elf.cpp index 5abab28..5cfcc8f 100644 --- a/rld-elf.cpp +++ b/rld-elf.cpp @@ -188,9 +188,10 @@ namespace rld } if (rld::verbose () >= RLD_VERBOSE_FULL_DEBUG) - std::cout << "elf::section: " << name () + std::cout << "elf::section: index=" << index () + << " name='" << name () << "'" << " size=" << size () - << " align=" << shdr.sh_addralign + << " align=" << alignment () << " flags=0x" << std::hex << flags () << std::dec << std::endl; } @@ -815,7 +816,7 @@ namespace rld bool weak, bool global) { - if (rld::verbose () >= RLD_VERBOSE_DETAILS) + if (rld::verbose () >= RLD_VERBOSE_TRACE_SYMS) std::cout << "elf:get-syms: unresolved:" << unresolved << " local:" << local << " weak:" << weak diff --git a/rld-files.cpp b/rld-files.cpp index e8b3b17..5996c95 100644 --- a/rld-files.cpp +++ b/rld-files.cpp @@ -363,7 +363,7 @@ namespace rld if (path.empty ()) throw rld::error ("No file name", "open:" + path); - if (rld::verbose () >= RLD_VERBOSE_DETAILS) + if (rld::verbose () >= RLD_VERBOSE_TRACE) std::cout << "image::open: " << name (). full () << " refs:" << references_ + 1 << " writable:" << (char*) (writable_ ? "yes" : "no") @@ -394,7 +394,7 @@ namespace rld { if (references_ > 0) { - if (rld::verbose () >= RLD_VERBOSE_DETAILS) + if (rld::verbose () >= RLD_VERBOSE_TRACE) std::cout << "image::close: " << name ().full () << " refs:" << references_ << std::endl; @@ -1111,14 +1111,14 @@ namespace rld void object::load_symbols (rld::symbols::table& symbols, bool local) { - if (rld::verbose () >= RLD_VERBOSE_DETAILS) + if (rld::verbose () >= RLD_VERBOSE_TRACE) std::cout << "object:load-sym: " << name ().full () << std::endl; rld::symbols::pointers syms; elf ().get_symbols (syms, false, local); - if (rld::verbose () >= RLD_VERBOSE_DETAILS) + if (rld::verbose () >= RLD_VERBOSE_TRACE) std::cout << "object:load-sym: exported: total " << syms.size () << std::endl; @@ -1142,7 +1142,7 @@ namespace rld elf ().get_symbols (syms, true); - if (rld::verbose () >= RLD_VERBOSE_DETAILS) + if (rld::verbose () >= RLD_VERBOSE_TRACE) std::cout << "object:load-sym: unresolved: total " << syms.size () << std::endl; @@ -1166,7 +1166,7 @@ namespace rld void object::load_relocations () { - if (rld::verbose () >= RLD_VERBOSE_DETAILS) + if (rld::verbose () >= RLD_VERBOSE_TRACE) std::cout << "object:load-relocs: " << name ().full () << std::endl; elf ().load_relocations (); diff --git a/rld-rap.cpp b/rld-rap.cpp index 3733f79..af3ca18 100644 --- a/rld-rap.cpp +++ b/rld-rap.cpp @@ -626,7 +626,7 @@ namespace rld std::for_each (bss.begin (), bss.end (), section_merge (*this, secs[rap_bss])); - if (rld::verbose () >= RLD_VERBOSE_TRACE) + if (rld::verbose () >= RLD_VERBOSE_DETAILS) { std::cout << "rap:object: " << obj.name ().full () << std::endl; output ("text", secs[rap_text].size, text); diff --git a/rld-symbols.cpp b/rld-symbols.cpp index c35e218..0ea7425 100644 --- a/rld-symbols.cpp +++ b/rld-symbols.cpp @@ -250,7 +250,7 @@ namespace rld out << std::setw (4) << index_ << ' ' << binding << ' ' << type - << ' ' << std::setw(2) << es.st_shndx + << ' ' << std::setw(6) << es.st_shndx << " 0x" << std::setw (8) << std::setfill ('0') << std::hex << es.st_value << std::dec << std::setfill (' ') |