< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java

Print this page

384     throws UnmappedAddressException, UnalignedAddressException {
385     return readCInteger(address, machDesc.getAddressSize(), true);
386   }
387 
388   protected long readCompOopAddressValue(long address)
389     throws UnmappedAddressException, UnalignedAddressException {
390     long value = readCInteger(address, getHeapOopSize(), true);
391     if (value != 0) {
392       // See oop.inline.hpp decode_heap_oop
393       value = (long)(narrowOopBase + (long)(value << narrowOopShift));
394     }
395     return value;
396   }
397 
398   protected long readCompKlassAddressValue(long address)
399     throws UnmappedAddressException, UnalignedAddressException {
400     long value;
401     if (VM.getVM().isCompactObjectHeadersEnabled()) {
402       // With compact headers, the compressed Klass* is currently read from the mark
403       // word. We need to load the whole mark, and shift the upper parts.
404       value = readCInteger(address, machDesc.getAddressSize(), true);
405       value = value >>> Mark.getKlassShift();
406     } else {
407       value = readCInteger(address, getKlassPtrSize(), true);
408     }
409     if (value != 0) {
410       value = (long)(narrowKlassBase + (long)(value << narrowKlassShift));
411     }
412     return value;
413   }
414 
415   /** Can be called by subclasses but can not be overridden */
416   protected final void checkConfigured() {
417     if (machDesc == null) {
418       throw new RuntimeException("MachineDescription must have been set by this point");
419     }
420     if (utils == null) {
421       throw new RuntimeException("DebuggerUtilities must have been set by this point");
422     }
423   }
424 

384     throws UnmappedAddressException, UnalignedAddressException {
385     return readCInteger(address, machDesc.getAddressSize(), true);
386   }
387 
388   protected long readCompOopAddressValue(long address)
389     throws UnmappedAddressException, UnalignedAddressException {
390     long value = readCInteger(address, getHeapOopSize(), true);
391     if (value != 0) {
392       // See oop.inline.hpp decode_heap_oop
393       value = (long)(narrowOopBase + (long)(value << narrowOopShift));
394     }
395     return value;
396   }
397 
398   protected long readCompKlassAddressValue(long address)
399     throws UnmappedAddressException, UnalignedAddressException {
400     long value;
401     if (VM.getVM().isCompactObjectHeadersEnabled()) {
402       // With compact headers, the compressed Klass* is currently read from the mark
403       // word. We need to load the whole mark, and shift the upper parts.
404       value = readCInteger(address, jintSize, true);
405       value = value >>> Mark.getKlassShift();
406     } else {
407       value = readCInteger(address, getKlassPtrSize(), true);
408     }
409     if (value != 0) {
410       value = (long)(narrowKlassBase + (long)(value << narrowKlassShift));
411     }
412     return value;
413   }
414 
415   /** Can be called by subclasses but can not be overridden */
416   protected final void checkConfigured() {
417     if (machDesc == null) {
418       throw new RuntimeException("MachineDescription must have been set by this point");
419     }
420     if (utils == null) {
421       throw new RuntimeException("DebuggerUtilities must have been set by this point");
422     }
423   }
424 
< prev index next >