ELFSectionProgBits.hxx revision 6ea6f71f24bc6cf759b2458209f3ef86559c685a
1#ifndef ELF_SECTION_PROGBITS_HXX 2#define ELF_SECTION_PROGBITS_HXX 3 4#include "ELFTypes.h" 5 6#include <llvm/Support/Format.h> 7#include <llvm/Support/raw_ostream.h> 8 9#include "utils/raw_ostream.h" 10 11template <unsigned Bitwidth> 12void ELFSectionProgBits<Bitwidth>::print() const { 13 ELF_TYPE_INTRO_TO_TEMPLATE_SCOPE(Bitwidth); 14 15 using namespace llvm; 16 17 out() << '\n' << fillformat('=', 79) << '\n'; 18 out().changeColor(raw_ostream::WHITE, true); 19 out() << "ELF PROGBITS: " << this->section_header->getName() << '\n'; 20 out().resetColor(); 21 out() << fillformat('-', 79) << '\n'; 22 23 out() << " Size : " << this->size() << '\n'; 24 out() << " Start Address: " 25 << static_cast<addr_t>((size_t)this->buf) << '\n'; 26 out() << fillformat('-', 79) << '\n'; 27 28 dump_hex(this->buf, this->buf_size, 0, this->buf_size); 29 30 out() << fillformat('=', 79) << '\n'; 31} 32 33#endif // ELF_SECTION_PROGBITS_HXX 34