< prev index next >

src/hotspot/share/compiler/abstractDisassembler.cpp

Print this page




  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 // AbstractDisassembler is the base class for
  27 // platform-specific Disassembler classes.
  28 
  29 #include "precompiled.hpp"
  30 #include "asm/assembler.inline.hpp"
  31 #include "compiler/abstractDisassembler.hpp"
  32 #include "oops/oop.inline.hpp"
  33 #include "utilities/debug.hpp"
  34 #include "utilities/ostream.hpp"
  35 
  36 // Default values for what is being printed as line prefix when disassembling a single instruction.
  37 // Can be overridden by command line parameter PrintAssemblyOptions.
  38 bool AbstractDisassembler::_show_data_hex      = true;
  39 bool AbstractDisassembler::_show_data_int      = false;
  40 bool AbstractDisassembler::_show_data_float    = false;
  41 bool AbstractDisassembler::_align_instr        = true;
  42 bool AbstractDisassembler::_show_pc            = true;
  43 bool AbstractDisassembler::_show_offset        = false;
  44 bool AbstractDisassembler::_show_structs       = true;
  45 bool AbstractDisassembler::_show_comment       = true;
  46 bool AbstractDisassembler::_show_block_comment = true;
  47 
  48 // set "true" to see what's in memory bit by bit
  49 // might prove cumbersome on platforms where instr_len is hard to find out
  50 bool AbstractDisassembler::_show_bytes         = false;
  51 
  52 // Return #bytes printed. Callers may use that for output alignment.
  53 // Print instruction address, and offset from blob begin.
  54 // Offset width (2, 4, 6, 8 bytes) is adapted to size of blob.
  55 // Working assumption: we are at st->bol() upon entry. If not, it's the
  56 //                     caller's responsibility to guarantee proper alignment.
  57 int AbstractDisassembler::print_location(address here, address begin, address end, outputStream* st, bool align, bool print_header) {
  58   const int     pos_0  = st->position();
  59 
  60   if (show_pc() || show_offset()) {
  61     st->print(" ");
  62   }
  63 
  64   if (show_pc()) {
  65     if (print_header) {
  66       st->print(" %*s", 18, "Address");




  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 // AbstractDisassembler is the base class for
  27 // platform-specific Disassembler classes.
  28 
  29 #include "precompiled.hpp"
  30 #include "asm/assembler.inline.hpp"
  31 #include "compiler/abstractDisassembler.hpp"
  32 #include "oops/oop.inline.hpp"
  33 #include "utilities/debug.hpp"
  34 #include "utilities/ostream.hpp"
  35 
  36 // Default values for what is being printed as line prefix when disassembling a single instruction.
  37 // Can be overridden by command line parameter PrintAssemblyOptions.
  38 bool AbstractDisassembler::_show_data_hex      = true;
  39 bool AbstractDisassembler::_show_data_int      = false;
  40 bool AbstractDisassembler::_show_data_float    = false;
  41 bool AbstractDisassembler::_align_instr        = false;
  42 bool AbstractDisassembler::_show_pc            = true;
  43 bool AbstractDisassembler::_show_offset        = false;
  44 bool AbstractDisassembler::_show_structs       = false;
  45 bool AbstractDisassembler::_show_comment       = false;
  46 bool AbstractDisassembler::_show_block_comment = false;
  47 
  48 // set "true" to see what's in memory bit by bit
  49 // might prove cumbersome on platforms where instr_len is hard to find out
  50 bool AbstractDisassembler::_show_bytes         = false;
  51 
  52 // Return #bytes printed. Callers may use that for output alignment.
  53 // Print instruction address, and offset from blob begin.
  54 // Offset width (2, 4, 6, 8 bytes) is adapted to size of blob.
  55 // Working assumption: we are at st->bol() upon entry. If not, it's the
  56 //                     caller's responsibility to guarantee proper alignment.
  57 int AbstractDisassembler::print_location(address here, address begin, address end, outputStream* st, bool align, bool print_header) {
  58   const int     pos_0  = st->position();
  59 
  60   if (show_pc() || show_offset()) {
  61     st->print(" ");
  62   }
  63 
  64   if (show_pc()) {
  65     if (print_header) {
  66       st->print(" %*s", 18, "Address");


< prev index next >