use of com.ibm.dtfj.image.ImageStackFrame in project openj9 by eclipse.
the class J9DDRImageThread method getStackFrames.
/* (non-Javadoc)
* @see com.ibm.dtfj.image.ImageThread#getStackFrames()
*/
public Iterator<?> getStackFrames() throws DataUnavailable {
List<? extends IOSStackFrame> frames = thread.getStackFrames();
List<ImageStackFrame> dtfjFrames = new ArrayList<ImageStackFrame>(frames.size());
for (IOSStackFrame thisFrame : frames) {
dtfjFrames.add(new J9DDRImageStackFrame(process, thisFrame, this));
}
return dtfjFrames.iterator();
}
use of com.ibm.dtfj.image.ImageStackFrame in project openj9 by eclipse.
the class ImageStackFrameComparator method testEquals.
// getBasePointer()
// getProcedureAddress()
// getProcedureName()
public void testEquals(Object ddrObject, Object jextractObject, int members) {
ImageStackFrame ddrImageStackFrame = (ImageStackFrame) ddrObject;
ImageStackFrame jextractStackFrame = (ImageStackFrame) jextractObject;
ImagePointerComparator imagePointerComparator = new ImagePointerComparator();
// getBasePointer()
if ((BASE_POINTER & members) != 0)
imagePointerComparator.testComparatorEquals(ddrImageStackFrame, jextractStackFrame, "getBasePointer");
// getProcedureAddress()
if ((PROCEDURE_ADDRESS & members) != 0)
imagePointerComparator.testComparatorEquals(ddrImageStackFrame, jextractStackFrame, "getProcedureAddress");
// getProcedureName()
if ((PROCEDURE_NAME & members) != 0)
testJavaEquals(ddrImageStackFrame, jextractStackFrame, "getProcedureName");
}
use of com.ibm.dtfj.image.ImageStackFrame in project openj9 by eclipse.
the class InfoThreadCommand method printStackFrameInfo.
private void printStackFrameInfo(ImageThread it) {
Iterator itStackFrame;
ImageStackFrame isf;
try {
itStackFrame = it.getStackFrames();
} catch (DataUnavailable d) {
out.print(" native stack frames: " + Exceptions.getDataUnavailableString() + "\n");
return;
}
out.print(" native stack frames:");
out.print("\n");
while (itStackFrame.hasNext()) {
Object o = itStackFrame.next();
if (o instanceof CorruptData) {
out.print(" <corrupt stack frame: " + ((CorruptData) o).toString() + ">\n");
continue;
}
isf = (ImageStackFrame) o;
out.print(" bp: ");
try {
out.print(toAdjustedHex(isf.getBasePointer().getAddress()));
} catch (CorruptDataException e) {
if (getArtifactType() == ArtifactType.javacore) {
// javacore does not provide native stack base pointers, show as unavailable, not corrupt
out.print(Exceptions.getDataUnavailableString());
} else {
out.print(Exceptions.getCorruptDataExceptionString());
}
}
out.print(" pc: ");
try {
out.print(toAdjustedHex(isf.getProcedureAddress().getAddress()));
} catch (CorruptDataException e) {
out.print(Exceptions.getCorruptDataExceptionString());
}
out.print(" ");
try {
out.print(isf.getProcedureName());
} catch (CorruptDataException e) {
out.print(Exceptions.getCorruptDataExceptionString());
}
out.print("\n");
}
}
Aggregations