Ejemplo n.º 1
0
 public void printInfo() {
   System.out.println("Vertex:");
   System.out.println("Address:" + this.addr.toString() + " Long value:" + this.addr.getValue());
   if (ins != null) {
     System.out.println("Instruction:" + ins.getName());
     for (int j = 0; j < ins.getOperandCount(); j++) {
       String op = "";
       if (ins.getOperand(j).getClass().getSimpleName().equals("X86PCRelativeAddress")) {
         // long start = this.addr.getValueOperand();
         op =
             ""
                 + ((X86PCRelativeAddress) ins.getOperand(j))
                     .getEffectiveValue(this.addr.getValue());
       } else op = ins.getOperand(j).toString();
       System.out.println("Operand number " + j + " is " + op);
     }
   } else System.out.println("This instruction is not yet processed");
   System.out.print("Type: ");
   for (int i = 0; i < this.size; i++) {
     System.out.print(type[i] + " ");
     if (type[i] == 7) this.printTraceList();
     if (type[i] == 4) this.printTraceLoop();
   }
   System.out.println();
   System.out.println("-------------------------------------------------------------------");
 }
Ejemplo n.º 2
0
 /**
  * Get the string representation of the specified assembly instruction assuming it is located at
  * the given address.
  *
  * @param addr a virtual address
  * @param instr an assembly instruction
  * @return a string representation of the assembly code at the given address
  */
 public String getInstructionString(AbsoluteAddress addr, Instruction instr) {
   if (instr == null) return "NON_EXISTENT";
   return instr.toString(addr.getValue(), symbolFinder(addr));
 }