public class DebugEmitter extends Object implements GlueEmitter
Modifier and Type | Field and Description |
---|---|
protected JavaConfiguration |
cfg |
Constructor and Description |
---|
DebugEmitter() |
Modifier and Type | Method and Description |
---|---|
void |
beginDefines() |
void |
beginEmission(GlueEmitterControls controls)
Begin the emission of glue code.
|
void |
beginFunctions(TypeDictionary typedefDictionary,
TypeDictionary structDictionary,
Map<Type,Type> canonMap) |
void |
beginStructLayout()
Begins the process of computing field offsets and type sizes for
the structs to be emitted.
|
void |
beginStructs(TypeDictionary typedefDictionary,
TypeDictionary structDictionary,
Map<Type,Type> canonMap) |
protected JavaConfiguration |
createConfig()
Create the object that will read and store configuration information for
this JavaEmitter.
|
void |
emitDefine(ConstantDefinition def,
String optionalComment) |
Iterator<FunctionSymbol> |
emitFunctions(List<FunctionSymbol> originalCFunctions)
Emit glue code for the list of FunctionSymbols.
|
void |
emitSingleFunction(FunctionSymbol sym) |
void |
emitStruct(CompoundType t,
Type typedefType)
Emit glue code for the given CompoundType.
|
void |
endDefines() |
void |
endEmission()
Finish the emission of glue code.
|
void |
endFunctions() |
void |
endStructLayout()
Finishes the struct layout process.
|
void |
endStructs() |
JavaConfiguration |
getConfiguration() |
void |
layoutStruct(CompoundType t)
Lays out one struct which will be emitted later.
|
void |
readConfigurationFile(String filename) |
protected JavaConfiguration cfg
public void readConfigurationFile(String filename) throws IOException
readConfigurationFile
in interface GlueEmitter
IOException
public JavaConfiguration getConfiguration()
getConfiguration
in interface GlueEmitter
public void beginEmission(GlueEmitterControls controls)
GlueEmitter
beginEmission
in interface GlueEmitter
public void endEmission()
GlueEmitter
endEmission
in interface GlueEmitter
public void beginDefines()
beginDefines
in interface GlueEmitter
public void emitDefine(ConstantDefinition def, String optionalComment)
emitDefine
in interface GlueEmitter
optionalComment
- If optionalComment is non-null, the emitter can
emit that string as a comment providing extra information about the
define.public void endDefines()
endDefines
in interface GlueEmitter
public void beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap)
beginFunctions
in interface GlueEmitter
public Iterator<FunctionSymbol> emitFunctions(List<FunctionSymbol> originalCFunctions) throws Exception
GlueEmitter
emitFunctions
in interface GlueEmitter
Exception
public void emitSingleFunction(FunctionSymbol sym)
public void endFunctions()
endFunctions
in interface GlueEmitter
public void beginStructLayout() throws Exception
GlueEmitter
beginStructLayout
in interface GlueEmitter
Exception
public void layoutStruct(CompoundType t) throws Exception
GlueEmitter
layoutStruct
in interface GlueEmitter
Exception
public void endStructLayout() throws Exception
GlueEmitter
endStructLayout
in interface GlueEmitter
Exception
public void beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type,Type> canonMap)
beginStructs
in interface GlueEmitter
public void emitStruct(CompoundType t, Type typedefType)
GlueEmitter
emitStruct
in interface GlueEmitter
public void endStructs()
endStructs
in interface GlueEmitter
protected JavaConfiguration createConfig()