Package javax.tools.diagnostics.image

Examples of javax.tools.diagnostics.image.ImagePointer


      return scanRegion(imageStartAddress, imageEndAddress, imageSection);
    }
  }
 
  private boolean scanRegion(long start, long end, ImageSection imageSection){
    ImagePointer imagePointer = imageSection.getBaseAddress();
    long i;
    if (0 != start%findAtt.boundary) {
      i = start - start%findAtt.boundary + findAtt.boundary;
    } else {
      i = start;
View Full Code Here


        out.error("Specified length is invalid");
        return;
      }
    }
   
    ImagePointer imagePointerBase = imageAddressSpace.getPointer(addressInDecimal);
   
    String asciiChars = "";
   
    long i;
    for (i = 0; i < numBytesToPrint; i++){
      ImagePointer imagePointer = imagePointerBase.add(i);
      //stringBuffer.append(Long.toHexString(addressInDecimal+i)+":\t");
      //stringBuffer.append(Long.toHexString(imagePointer.getAddress())+":\t");
      try {
        Byte byteValue = new Byte(imagePointer.getByteAt(0));
        asciiIndex = (int) byteValue.byteValue();
        if (asciiIndex < 0) {
          asciiIndex += 256;
        }
       
        String rawHexString = Integer.toHexString(byteValue.intValue());
        String fixedHexString = fixHexStringLength(rawHexString);
       
        String hexText = fixedHexString;
        if (0 == i%4){
          hexText = " "+hexText;
        }
       
        if (0 == i%16){
          hexText  = "\n"+Long.toHexString(imagePointer.getAddress())+":"+hexText;
          asciiChars = "  |";
        }
       
        stringBuffer.append(hexText);
       
        asciiChars += Utils.byteToAscii.substring(asciiIndex,asciiIndex+1);
        if (15 == i%16 && i != 0){
          asciiChars += "|";
          //System.out.println("****"+asciiChars);
          stringBuffer.append(asciiChars)
        }
      }catch (MemoryAccessException e) {
        out.error("Address not in memory - 0x"
            + Long.toHexString(imagePointer.getAddress()));
        return;
      }catch (CorruptDataException e) {
        out.error("Dump data is corrupted");
        return;
      }
View Full Code Here

TOP

Related Classes of javax.tools.diagnostics.image.ImagePointer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.