Search in sources :

Example 1 with J9SourceDebugExtensionPointer

use of com.ibm.j9ddr.vm29.pointer.generated.J9SourceDebugExtensionPointer in project openj9 by eclipse.

the class J9BCUtil method dumpSourceDebugExtension.

private static void dumpSourceDebugExtension(PrintStream out, J9ROMClassPointer romClass, long flags) throws CorruptDataException {
    if (J9BuildFlags.opt_debugInfoServer) {
        U8Pointer current;
        U32 temp;
        if ((flags & J9BCTranslationData.BCT_StripDebugAttributes) == 0) {
            J9SourceDebugExtensionPointer sde = OptInfo.getSourceDebugExtensionForROMClass(romClass);
            if (!sde.isNull()) {
                temp = sde.size();
                if (!temp.eq(0)) {
                    current = U8Pointer.cast(sde.add(1));
                    out.append(String.format("  Source debug extension (%d bytes):    ", temp.longValue()));
                    out.append(nl);
                    while (!temp.eq(0)) {
                        temp = temp.sub(1);
                        U8 c = current.at(0);
                        current = current.add(1);
                        if (c.eq('\015')) {
                            if (!temp.eq(0)) {
                                if (current.at(0).eq('\012')) {
                                    current = current.add(1);
                                }
                                out.append(nl + "    ");
                            }
                        } else if (c.eq('\012')) {
                            out.append(nl + "    ");
                        } else {
                            out.append((char) c.intValue());
                        }
                    }
                }
            }
        }
    }
}
Also used : J9SourceDebugExtensionPointer(com.ibm.j9ddr.vm29.pointer.generated.J9SourceDebugExtensionPointer) U8(com.ibm.j9ddr.vm29.types.U8) U32(com.ibm.j9ddr.vm29.types.U32) U8Pointer(com.ibm.j9ddr.vm29.pointer.U8Pointer)

Aggregations

U8Pointer (com.ibm.j9ddr.vm29.pointer.U8Pointer)1 J9SourceDebugExtensionPointer (com.ibm.j9ddr.vm29.pointer.generated.J9SourceDebugExtensionPointer)1 U32 (com.ibm.j9ddr.vm29.types.U32)1 U8 (com.ibm.j9ddr.vm29.types.U8)1