public abstract class DwarfSectionImpl extends BasicProgbitsSectionImpl
Modifier and Type | Field and Description |
---|---|
protected boolean |
debug |
protected long |
debugAddress |
protected int |
debugBase |
protected long |
debugTextBase |
protected DwarfDebugInfo |
dwarfSections |
protected static byte[] |
scratch
A scratch buffer used during computation of a section's size.
|
Constructor and Description |
---|
DwarfSectionImpl(DwarfDebugInfo dwarfSections) |
Modifier and Type | Method and Description |
---|---|
boolean |
contentByteArrayCreated()
Check whether the contents byte array has been sized and created.
|
abstract void |
createContent()
Creates the target byte[] array used to define the section contents.
|
protected int |
debugStringIndex(String str) |
protected void |
enableLog(org.graalvm.compiler.debug.DebugContext context,
int pos) |
protected int |
getCUIndex(ClassEntry classEntry) |
protected int |
getDeoptCUIndex(ClassEntry classEntry) |
Set<BuildDependency> |
getDependencies(Map<ObjectFile.Element,LayoutDecisionMap> decisions)
Implementing this method allows to declare dependencies to other Sections (i.e.
|
protected int |
getFieldDeclarationIndex(StructureTypeEntry entry,
String fieldName) |
protected int |
getIndirectLayoutIndex(ClassEntry classEntry) |
protected int |
getIndirectTypeIndex(String typeName) |
protected int |
getLayoutIndex(ClassEntry classEntry) |
protected int |
getLineIndex(ClassEntry classEntry) |
protected int |
getLinePrologueSize(ClassEntry classEntry) |
protected int |
getLineSectionSize(ClassEntry classEntry) |
protected int |
getMethodDeclarationIndex(ClassEntry classEntry,
String methodName) |
byte[] |
getOrDecideContent(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided,
byte[] contentHint)
Implement this method to deliver the content of the section.
|
int |
getOrDecideSize(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided,
int sizeHint)
Implement this method to provide the size of this section.
|
protected Iterable<? extends ClassEntry> |
getPrimaryClasses() |
abstract String |
getSectionName()
Identify this debug section by name.
|
protected int |
getTypeIndex(String typeName) |
protected Stream<? extends TypeEntry> |
getTypes() |
boolean |
isAArch64() |
boolean |
isLoadable()
Whether this section is loaded into memory at runtime.
|
protected boolean |
littleEndian() |
protected void |
log(org.graalvm.compiler.debug.DebugContext context,
String format,
Object... args) |
protected TypeEntry |
lookupType(String typeName) |
protected void |
patchLength(int lengthPos,
byte[] buffer,
int pos) |
protected int |
putAsciiStringBytes(String s,
byte[] buffer,
int pos) |
protected int |
putAsciiStringBytes(String s,
int startChar,
byte[] buffer,
int p) |
protected int |
putByte(byte b,
byte[] buffer,
int p) |
protected int |
putInt(int i,
byte[] buffer,
int p) |
protected int |
putLong(long l,
byte[] buffer,
int p) |
protected int |
putRelocatableCodeOffset(long l,
byte[] buffer,
int p) |
protected int |
putRelocatableHeapOffset(long l,
byte[] buffer,
int p) |
protected int |
putShort(short s,
byte[] buffer,
int p) |
protected int |
putSLEB(long val,
byte[] buffer,
int p) |
protected int |
putULEB(long val,
byte[] buffer,
int p) |
protected void |
setCUIndex(ClassEntry classEntry,
int pos) |
protected void |
setDeoptCUIndex(ClassEntry classEntry,
int pos) |
protected void |
setFieldDeclarationIndex(StructureTypeEntry entry,
String fieldName,
int pos) |
protected void |
setIndirectLayoutIndex(ClassEntry classEntry,
int pos) |
protected void |
setIndirectTypeIndex(TypeEntry typeEntry,
int pos) |
protected void |
setLayoutIndex(ClassEntry classEntry,
int pos) |
protected void |
setLineIndex(ClassEntry classEntry,
int pos) |
protected void |
setLinePrologueSize(ClassEntry classEntry,
int pos) |
protected void |
setLineSectionSize(ClassEntry classEntry,
int pos) |
protected void |
setMethodDeclarationIndex(ClassEntry classEntry,
String methodName,
int pos) |
protected void |
setTypeIndex(TypeEntry typeEntry,
int pos) |
abstract LayoutDecision.Kind[] |
targetSectionKinds()
Identify the layout properties of the target section which need to have been decided before
the contents of this section can be created.
|
abstract String |
targetSectionName()
Identify the section after which this debug section needs to be ordered when sizing and
creating content.
|
protected String |
uniqueDebugString(String str) |
protected void |
verboseLog(org.graalvm.compiler.debug.DebugContext context,
String format,
Object... args) |
protected int |
writeAbbrevCode(long code,
byte[] buffer,
int pos) |
protected int |
writeAttrAddress(long address,
byte[] buffer,
int pos) |
protected int |
writeAttrData1(byte value,
byte[] buffer,
int pos) |
protected int |
writeAttrData2(short value,
byte[] buffer,
int pos) |
protected int |
writeAttrData4(int value,
byte[] buffer,
int pos) |
protected int |
writeAttrData8(long value,
byte[] buffer,
int pos) |
protected int |
writeAttrNull(byte[] buffer,
int pos) |
int |
writeAttrRefAddr(int value,
byte[] buffer,
int p) |
abstract void |
writeContent(org.graalvm.compiler.debug.DebugContext debugContext)
Populates the byte[] array used to contain the section contents.
|
protected int |
writeFlag(byte flag,
byte[] buffer,
int pos) |
protected int |
writeTag(long code,
byte[] buffer,
int pos) |
getAlignment, getContent, getElement, getElements, getMemSize, getOrCreateRelocationElement, markRelocationSite, markRelocationSite, setContent
getDecisions, getOrDecideOffset, getOrDecideVaddr, getOwner, isReferenceable, setElement
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDecisions, getOrDecideOffset, getOrDecideVaddr, isReferenceable, setElement
protected DwarfDebugInfo dwarfSections
protected boolean debug
protected long debugTextBase
protected long debugAddress
protected int debugBase
protected static final byte[] scratch
public DwarfSectionImpl(DwarfDebugInfo dwarfSections)
public boolean isAArch64()
public abstract void createContent()
public abstract void writeContent(org.graalvm.compiler.debug.DebugContext debugContext)
public boolean contentByteArrayCreated()
public boolean isLoadable()
ElementImpl
isLoadable
in interface ElementImpl
isLoadable
in class BasicProgbitsSectionImpl
protected void enableLog(org.graalvm.compiler.debug.DebugContext context, int pos)
protected void log(org.graalvm.compiler.debug.DebugContext context, String format, Object... args)
protected void verboseLog(org.graalvm.compiler.debug.DebugContext context, String format, Object... args)
protected boolean littleEndian()
protected int putByte(byte b, byte[] buffer, int p)
protected int putShort(short s, byte[] buffer, int p)
protected int putInt(int i, byte[] buffer, int p)
protected int putLong(long l, byte[] buffer, int p)
protected int putRelocatableCodeOffset(long l, byte[] buffer, int p)
protected int putRelocatableHeapOffset(long l, byte[] buffer, int p)
protected int putULEB(long val, byte[] buffer, int p)
protected int putSLEB(long val, byte[] buffer, int p)
protected int putAsciiStringBytes(String s, byte[] buffer, int pos)
protected int putAsciiStringBytes(String s, int startChar, byte[] buffer, int p)
protected void patchLength(int lengthPos, byte[] buffer, int pos)
protected int writeAbbrevCode(long code, byte[] buffer, int pos)
protected int writeTag(long code, byte[] buffer, int pos)
protected int writeFlag(byte flag, byte[] buffer, int pos)
protected int writeAttrAddress(long address, byte[] buffer, int pos)
protected int writeAttrData8(long value, byte[] buffer, int pos)
protected int writeAttrData4(int value, byte[] buffer, int pos)
protected int writeAttrData2(short value, byte[] buffer, int pos)
protected int writeAttrData1(byte value, byte[] buffer, int pos)
public int writeAttrRefAddr(int value, byte[] buffer, int p)
protected int writeAttrNull(byte[] buffer, int pos)
public abstract String targetSectionName()
public abstract LayoutDecision.Kind[] targetSectionKinds()
public abstract String getSectionName()
public int getOrDecideSize(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided, int sizeHint)
ElementImpl
getOrDecideSize
in interface ElementImpl
getOrDecideSize
in class BasicProgbitsSectionImpl
public byte[] getOrDecideContent(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided, byte[] contentHint)
ElementImpl
getOrDecideContent
in interface ElementImpl
getOrDecideContent
in class BasicProgbitsSectionImpl
public Set<BuildDependency> getDependencies(Map<ObjectFile.Element,LayoutDecisionMap> decisions)
ElementImpl
getDependencies
in interface ElementImpl
getDependencies
in class BasicProgbitsSectionImpl
protected Iterable<? extends ClassEntry> getPrimaryClasses()
protected int debugStringIndex(String str)
protected int getTypeIndex(String typeName)
protected void setTypeIndex(TypeEntry typeEntry, int pos)
protected int getIndirectTypeIndex(String typeName)
protected void setIndirectTypeIndex(TypeEntry typeEntry, int pos)
protected int getCUIndex(ClassEntry classEntry)
protected void setCUIndex(ClassEntry classEntry, int pos)
protected int getDeoptCUIndex(ClassEntry classEntry)
protected void setDeoptCUIndex(ClassEntry classEntry, int pos)
protected int getLineIndex(ClassEntry classEntry)
protected void setLineIndex(ClassEntry classEntry, int pos)
protected int getLineSectionSize(ClassEntry classEntry)
protected void setLineSectionSize(ClassEntry classEntry, int pos)
protected int getLinePrologueSize(ClassEntry classEntry)
protected void setLinePrologueSize(ClassEntry classEntry, int pos)
protected int getLayoutIndex(ClassEntry classEntry)
protected void setIndirectLayoutIndex(ClassEntry classEntry, int pos)
protected int getIndirectLayoutIndex(ClassEntry classEntry)
protected void setLayoutIndex(ClassEntry classEntry, int pos)
protected void setFieldDeclarationIndex(StructureTypeEntry entry, String fieldName, int pos)
protected int getFieldDeclarationIndex(StructureTypeEntry entry, String fieldName)
protected void setMethodDeclarationIndex(ClassEntry classEntry, String methodName, int pos)
protected int getMethodDeclarationIndex(ClassEntry classEntry, String methodName)